سؤال

I am working with a CI system, Jenkins, that calls a script to launch automated KIF tests on our iOS application.

While running, the application crashes because of an uncaught exception in our code in -[KIFTestActor runBlock:complete:timeout].

Unfortunately, no error is reported by the automated KIF tests, and so Jenkins incorrectly reports that the automated testing was a success. I had thought that perhaps abort(), which is in the stackcrawl, was causing the application to exit without an error code, so I registered a handler to catch uncaught exceptions and called _exit(-1) to make sure we were returning an error code. That was able to catch the exception and call _exit(-1), but the Jenkins job still thinks that everything passed.

Has anyone dealt with this before and figured how to deal with this?

I see this post to which no one has not yet responded.

This is how we launch the tests:

xcodebuild clean test -workspace MyApp.xcworkspace -scheme MyApp -destination OS=latest,name="iPhone Retina (4-inch)"

هل كانت مفيدة؟

المحلول

The only way we solved this was by parsing the output of the xcodebuild test command.

Thanks to the post by Leonardo Borges.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top