单元测试期间Xcode CI bot错误(Unexpected TestSuiteWillFinish)

the*_*ner 4 xcode continuous-integration unit-testing sentestingkit

我们最近使用iOS应用程序设置了一些Xcode机器人,以自动构建和测试我正在处理的应用程序.如果我只是构建和分析,构建过程工作正常.如果我将其设置为运行测试,则会以可变数量的错误结束Unexpected TestSuiteWillFinish.例如,最近一次运行显示:

运行测试套件TimeClockTestCase遇到错误(Unexpected TestCaseDidFinish)testParseResponseString遇到错误(Unexpected TestSuiteWillFinish)testGetIntegrationID遇到错误(意外的TestSuiteWillFinish)

之前的那个只有一个错误:

testAddChildObjectTypeTimeClockEvent遇到错误(意外的TestSuiteWillFinish)

无论显示什么错误,集成结果都会显示所有测试都已通过.如果我直接通过Xcode运行测试(而不是在服务器上运行bot),则没有错误并且传递相同数量的测试.

导致这些错误的原因是什么?如何消除它们?


这些是来自TimeClockTestCase的日志:

Test Suite 'TimeClockTestCase' started at 2014-02-23 23:11:09 +0000
2014-02-23 18:11:09.653 -0500 [TimeClockResponseCommand parseResponseString] [Line 74] W: Unsupported action number "3" in TIMECLOCK response command

Test Case '-[TimeClockTestCase testAddChildObjectTypeTimeClockEvent]' started.
Test Case '-[TimeClockTestCase testAddChildObjectTypeTimeClockEvent]' passed (0.000 seconds).
Test Case '-[TimeClockTestCase testAddChildObjectTypeTimeClockMode]' started.
Test Case '-[TimeClockTestCase testAddChildObjectTypeTimeClockMode]' passed (0.000 seconds).
Test Case '-[TimeClockTestCase testTimeclockEventColl]' started.
Test Case '-[TimeClockTestCase testTimeclockEventColl]' passed (0.000 seconds).
Test Case '-[TimeClockTestCase testTimeclockModeColl]' started.
Test Case '-[TimeClockTestCase testTimeclockModeColl]' passed (0.000 seconds).
Test Suite 'TimeClockTestCase' finished at 2014-02-23 23:11:09 +0000.
Run Code Online (Sandbox Code Playgroud)

Vas*_*ior 5

我得到了相同的随机行为.我能够确定我正在进行异步调用,并对其进行测试,这是导致这种随机性的原因Unexpected TestSuiteWillFinish.

正如我正在使用的那样Kiwi,我所做的是等待一些异步调用的结束,如此处所示(https://github.com/allending/Kiwi/wiki/Asynchronous-Testing),用于那些特定的异步调用.

希望这有帮助!