4

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?

Mike Mertsock
  • 11,825
  • 7
  • 42
  • 75
fish potato
  • 5,319
  • 6
  • 27
  • 32

2 Answers2

0

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.

Community
  • 1
  • 1
Mike Mertsock
  • 11,825
  • 7
  • 42
  • 75
0

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.

lukestringer90
  • 492
  • 7
  • 16
  • lukestringer: I can't find any information on how to pipe that information into Phabricator -- are you able to elaborate on that at all? – Matt H. Jan 30 '15 at 09:59