How to output xml test results when running the GUI on device?

64 views
Skip to first unread message

Olivia

unread,
Feb 19, 2013, 1:09:07 PM2/19/13
to ghu...@googlegroups.com
I decided to try GHUnit because my unit tests need some UI elements in order to pass and GHUnit allows UI testing on iOS.
Now I need to run the tests on device. The only way I could find from your instructions is to use command line but then the UI doesn't start and my tests fail (or did I miss something?).

I managed to install my app (with GHUnit) on device automatically, start it and run the tests automatically (so with GUI). Now my remaining issue is how to output the results?
If I pass the environment variables in the xcode build command, they are not taken into consideration: 
WRITE_JUNIT_XML=JUNIT_XML_DIR=tmp/olivia xcodebuild clean build -project "${UNITTEST_DIR}/$UNIT_TEST_APP/$UNIT_TEST_APP.xcodeproj" -target "Tests" etc...

How can I run the GUI on HW and still output xml files?

I do everything automatically with Jenkins job and shell scripts. I cannot use Xcode.

Thanks for your help!

Joshua Moody

unread,
Mar 6, 2013, 12:26:54 PM3/6/13
to ghu...@googlegroups.com

Now I need to run the tests on device. The only way I could find from your instructions is to use command line but then the UI doesn't start and my tests fail (or did I miss something?).

you can run the test target on a device from Xcode.  is that what you are asking?
 
I managed to install my app (with GHUnit) on device automatically, start it and run the tests automatically (so with GUI). Now my remaining issue is how to output the results?

sounds like you figured out how to get the ghunit test target running on a device from the command line.
 
If I pass the environment variables in the xcode build command, they are not taken into consideration: 
WRITE_JUNIT_XML=JUNIT_XML_DIR=tmp/olivia xcodebuild clean build -project "${UNITTEST_DIR}/$UNIT_TEST_APP/$UNIT_TEST_APP.xcodeproj" -target "Tests" etc...

How can I run the GUI on HW and still output xml files?

I do everything automatically with Jenkins job and shell scripts. I cannot use Xcode.

Thanks for your help!
 
since i don't know how you launch the app on the device from the command line, i am not going to be able help much.  i do think that the log files will be written _on the device_ so you will need to figure out how to access them.  post more details, i might be able to help.

as an aside, i use jenkins for continuous integration.  i do not bother doing automated unit testing on devices, just in the simulators.  i _do_ use automated UI testing using calabash-ios and lesspainful.com


 
Reply all
Reply to author
Forward
0 new messages