Running FlexUnit4 tests in Hudson with ant - ant

I'm just starting to try figure out how to go about continuous integration and test driven development, specifically in Flex 4.
I'd like to run FlexUnit4 tests from an ant script initiated in Hudson. I can get hudson to compile my app but how do I then go about running/seeing results of my tests?

I did get this working, based on these answers I got from over on the adobe forums:
http://forums.adobe.com/thread/504046?tstart=0
http://forums.adobe.com/thread/505090?tstart=0

We run our flash/flex tests on hudson by using the command-line AIR test runner that is running a wrapped version of our flash/flex test application and having that write out a file in the jUnit file format. Hudson can make a nice visualisation if you use that format.
If you are on a linux host you've got to remember to set up Xvfb to give AIR a 'screen', otherwise it will not work.
Google 'hudson air unittest' or for example http://www.subotnik.com/blog/?p=100 for more.

One of the developers from the FlexUnit4 team has suggested a solution using ant/maven on the adobe forums. I'm trying this out now.

Related

Where to write code in Appium iOS test automation software?

I am new to automation and trying to use Appium(Mac app) for writing test scripts on iOS app.
I have managed to load my app successfully on Appium and also used Appium Inspector.
There is a Record button which records my actions in Appium inspector.
However, my question is how do I save these recorded scripts for reuse?
Secondly, I also want to manually write test scripts using Java, but currently don't know where to write code using Appium Mac app.
I have read the starter guide on Appium website and seen some videos but cannot find any app usage related information.
Any help(links, tutorial video) will be appreciated.
P.S. I do not use Selenium.
My suggestion is to not use the record feature in Appium, it's not stable and hard to maintain.
You can write your java-automation-code on Eclipse/intellij(and all java IDE)
You have a lot of information on internet, you can start here:
Appium - Git - Sample - java
Try to make it run, and take it from there.
You always can ask at discuss.appium.io and see examples.
Good luck, hope it's helps a little.
You can use any programming language supported by Appium where you feel better.
Setup environment and create test scripts. you can learn from:
Appium
Jave Sample
You can write your script in the same way as you used to right in Selenium means you can choose any IDE (in my case I'm working on Eclipse Juno) and then just pass all the capabilities if you will use TestNG framework then run as TestNG.

How to get code coverage in Xcode 6?

My tests are XCTests and I'm using Objective-C instead of Swift.
I've seen some articles that tackle the topic, but the seem focused on older versions of Xcode, for example:
Visualizing Code Coverage with Xcode
Code Coverage Fixed for Xcode 5.1
What would be the recommended approach to get code coverage on Xcode 6? Does Apple have something built in for code coverage, maybe via Xcode CI via OSX Server?
Take a look at frankencover.it
Simple script that can be run from dev's cmd-line or CI build server.
Produces console output as well as a detailed report in HTML format. This can be viewed locally or published as an artifact by the build server.
Optionally includes a checker that will 'fail' the build if required coverage is not met. (Feedback only. This is a prompt to review coverage and look for useful tests that can be added or reduce the required amount. Either option may be correct. )
Free for both commercial and open-source projects. No hosting, sponsorship or subscription required.
Usage:
FTW, it has an easy-to-remember dogue-speak-esque command line interface:
groovy http://appsquickly.github.io/frankencover.it/with --source-dir MyProject/Source
Terminal Output:
HTML Report:
We use Xcoverage for this..Check on link below, if this helps..
Xcoverage
This is an update, From Xcode 6 Apple having in-build code coverage tool, But Have a look at coverStory it is easy to configure test locally before push.
And providing a line by line coverage.

iOS CI: How to run calabash tests using bots?

I am using Calabash to perform UI tests in my iOS app.
Calabash is chosen because tests could be written using Gherkin-style and I can use RubyMine.
Good things: any time during writing gherkin scenarios I can easily get a list of already implemented functions (like: When user successfully logged in) and also RubyMine will create functions for every new scenario. These are actually huge benefits.
Bad things: In addition to UI tests in Calabash I also have native unit tests which I run using bots, but I didn't figure out how run Calabash tests using bots on OS X Server.
So in ideal world I would like to have something what KIF does: bots could run UI tests and give nice OS X Server web page results, but at the same time I'd like to have all benefits of using Calabash + RubyMine
Or maybe there is a way to run calabash cucumber tests on OS X Server using bots? And I am not really comfortable using OS X Server for native unit tests and Jenkins for cucumber tests. I just want one tool do whole thing.
Any suggestions?
Create a new bot and set its Schmeme to your Calabash scheme, e.g., MyXcodeScheme-cal. Then for example add an iPhone in the testing tab as target.
But unfortunately a successful integration does not mean that the Calabash tests has passed - only that the test were executed! So the Calabash test results itself has to be investigated manually afterwards :S
:)

Good test runner for OCUnit/XCode Unit Tests

Is there a good GUI based test runner for the OCUnit/XCode 4 unit testing frameworks? I'm looking for a redlight/greenlight type GUI, maybe something that looks like the NUnit test runner. I found OCRunner, but it looks like it hasn't been maintained since 2009. It's unfortunate, because OCRunner looks like it was exactly what I was searching for. It loads on Lion, but I can't get it to pick up my test bundle and run it.
Any suggestions for an alternative or a way to get OCRunner to run on a unit test bundle against an iOS project?
*FYI - I'm running XCode 4 with the default unit testing bundle template
You should use GHUnit.
I've also managed it to run it automatically under Jenkins with the iOS Simulator. GHUnit can also export Jenkins valid XML's (JRun).

Resources for setting up Flex projects with Hudson

I'm looking into setting up a CI environment for our flex projects. I have very little experience in setting up an environment like this, but have read a lot about it and think we could benefit a lot from this in our projects. I do have experience with ANT and we're currently using it for our building. I've been looking at Hudson for a while and it looks really nice and simple while still having the power to support a proper CI environment.
So basically, my question is if anyone has experience in setting up Flex projects with Hudson? If so, please do share some info on issues, cost/benefit as well what kind of effort is required per project to get up and running with Hudson. I've googled for a while and can proudly say that I know more about both the Fast lexical analyzer and the Hudson River, but little more about the topic of this post =)
Just about anything that can be executed from a command line can be executed via hudson. If your flex app can be built via ant from the command line; it will work just fine in hudson.
This might be helpful:
http://www.subotnik.com/blog/?p=100

Resources