8

We would like to integrate a tests suite in our iOS app. To have an overall idea, this app is using web services, is saving files on the device and has some complex navigation parts. The requirements: - run the tests suite with Jenkins - being able to launch the test suite on a set of devices and iOS versions - we don't expressly need something readable by non devs like Calabash proposes

We were thinking about doing some workflow testing (interaction bringing from one screen to another) and unit testing. We googled a bit but articles are often at least 2 years old which is like the Paleolithic period in the mobile world. But still, it gives some nice first inputs.

For Unit Testing, we were thinking about:

  • GHUnit
  • XCTest
  • Kiwi

For workflow testing, we were thinking about:

  • Zucchini
  • Calabash

Regarding all the mentionned requirements, does anybody see any advice to chose one framework or the other (or another proposition)?

Thank you for any feedback.

ps: by the way, some interesting articles we have found on the subject that can help: http://blog.lesspainful.com/2012/03/07/Calabash-iOS/ http://iosunittesting.com/faq/

Toka
  • 831
  • 7
  • 11
  • 1
    Possible duplicate of https://stackoverflow.com/questions/4114083/ios-tests-specs-tdd-bdd-and-integration-acceptance-testing – Gardner Bickford Apr 07 '14 at 23:55
  • This other post helps but is definitely again an old post in the Mobile world. It doesn't even mention Calabash for testing app workflow. On top of that, each project has particular requirements and not all frameworks are welcome. Thus we are looking for advices regarding our requirements. – Toka Apr 08 '14 at 09:08
  • For a recent discussion of that state of UI testing, and all of the tools, please see this talk on youtube from [MCE 2014: Drew Crawford - UI testing sucks](http://www.youtube.com/watch?v=h1TRkDSmnOc). – Gardner Bickford Apr 08 '14 at 17:32

1 Answers1

2

I recommend Kiwi for unit testing for several reasons:

  • It supports nested contexts that can each have their own setup and teardown blocks. This allows your tests to be more DRY. XCTest only has one setup and teardown method which is used for all the tests in a file. With Kiwi's nested contexts, you can have setup code that is performed before some but not all of your tests based on how you define the contexts.
  • Kiwi has great support for mocking/stubbing dependencies when needed. I have found it to be more robust than OCMock (mocked class methods with OCMock stuck around after the test if you forgot to call -stopMocking whereas Kiwi always makes sure to teardown mocked class methods after each test).

I am not experienced in workflow/application testing but I plan to eventually check out KIF and UIAutomation.

I would highly recommend looking at iOS Tests/Specs TDD/BDD and Integration & Acceptance Testing for a more comprehensive discussion of testing libraries.

Community
  • 1
  • 1
tboyce12
  • 1,341
  • 13
  • 28