Вопрос

We recently started new project and XCTest is our framework for unit testing. We also support ios6 in the way it works and looks as expected.

Unfortunately XCTest doesn't work for ios6. Do you think it is valuable to have possibility to run tests on ios6? Do you expect to get different output from it?

I can test ios6 specific code with injecting mocked OS versioning tool. So running tests on ios6 to check if-else cases specific to ios6 is not the proper answer for this question (let me know if I'm wrong)

Это было полезно?

Решение

It depends on what you're testing exactly, but as a general principle I'd have to say yes, it's worth it. Apple change quite a lot under the hood during iOS version changes and it's hard to know whether, for example, an internal bug fix or optimisation from iOS6 -> iOS7 might affect your test outcomes.

If your project supports iOS6, you really need to have your tests run on iOS6.

To get tests that run on iOS6, create a test target and select 'OCUnit' from the drop-down (XCTest is iOS7 only), or you can use something like GHUnit which also supports iOS6.

The mocking/injection thing sounds interesting but I don't think it's any replacement for properly running your tests on genuine iOS6 devices.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top