Get Test Results Using Kiwi

I would like to publish test results for my iPhone application for my TestLink using XML-RPC.

I use Kiwi in my project, and now I want to get test results. Can I find out if the conditions of my test test have passed?

+4
source share
2 answers

Kiwi test results are written in much the same way as typical OCUnit test results, so there should be nothing special about exporting Kiwi test results compared to other Xcode testing platforms. With Xcode 4, a log file is created using:

~/Library/Developer/Xcode/DerivedData/(product_identifier)/TestResults/(timestamp).xctestresults/results.plist 

This plist file is in a simple format, with an array of dicts for each Kiwi specification. The “Test Identifier” and “Test Name” values ​​are generated by Kiwi by concatenating the strings in the (possibly nested) context and it declarations for each specification, and the “Test Result” value will be either Succeeded or Failed .

You might want to address some other issues (3 different links) in the Stack Overflow section, which discusses exporting Xcode results or testing automation or scripts.

0
source

If you don't mind running Kiwi tests from the command line, you can use xctool . This allows the contents of the tests that have been run (and their pass / fail status) to be output to a JSON file, which is (er) friendly to import into a third-party ticketing system such as Test Link, compared to the raw XC.

After installing xctool, run your tests as follows:

 xctool test \ -project ProjectName.xcodeproj/ \ -scheme SchemeName \ -reporter phabricator > ~/Desktop/test_results.json 

This will output a JSON file that can be imported directly into Phabricator , but you can run another script after you put JSON in the Test Link format can integrate.

0
source

Source: https://habr.com/ru/post/1401111/


All Articles