UIAutomation with code coverage

前端 未结 2 1882
我在风中等你
我在风中等你 2021-02-06 09:01

I am currently automating our iOS testing on jenkins. So far I had no problems with running unit tests, converting OCUnit into JUnit and generating code coverage in Cobertura fo

2条回答
  •  暖寄归人
    2021-02-06 09:28

    From my understanding code coverage files get generated when the app quits, but you can't just kill the simulator.

    Have you tried creating a separate target for your app where you have the info.plist property "UIApplicationExitsOnSuspend" set to true?

    There is a slightly wider problem, however. The generated coverage files aren't cumulative and get overwritten each time the application quits. So, depending on how your tests are structured (i.e. are you killing and starting the app for each distinct test) then you may struggle to get decent code coverage.

提交回复
热议问题