I would like to post the results of tests for my iPhone app to my TestLink using XML-RPC.
I use Kiwi in my project, and now I want to get the results of tests. Can I know whether the conditions on my testcase passed of failed?
I would like to post the results of tests for my iPhone app to my TestLink using XML-RPC.
I use Kiwi in my project, and now I want to get the results of tests. Can I know whether the conditions on my testcase passed of failed?
The results of Kiwi tests are recorded in basically the same way as the results of typical OCUnit tests, thus there shouldn't be anything special about exporting the results of Kiwi tests compared to other Xcode test frameworks. With Xcode 4, a log file is generated at:
~/Library/Developer/Xcode/DerivedData/(product_identifier)/TestResults/(timestamp).xctestresults/results.plist
This plist file has a simple format, with an array of dicts for each Kiwi spec. The "Test Identifier" and "Test Name" values are generated by Kiwi by concatenating strings in the (possibly nested) context
and it
declarations for each spec, and the "Test Result" value will either be Succeeded
or Failed
.
You might want to refer to some other questions (3 different links) on Stack Overflow that discuss exporting Xcode test results or automating/scripting testing.
If you don't mind running the Kiwi tests from the command line then you could use xctool. This allows you to output the contents of the tests that were run (and their pass/fail statuses) to a JSON file which is friendly(er) for importing into a third party ticketing system like Test Link compared to the raw XC.
After installing xctool run your tests like this:
xctool test \
-project ProjectName.xcodeproj/ \
-scheme SchemeName \
-reporter phabricator > ~/Desktop/test_results.json
That will output a JSON file which can be imported directly into Phabricator, but you could run another script after to put the JSON into in a format Test Link can integrate.