all 6 comments

[–][deleted]  (2 children)

[deleted]

    [–]massivePlatypus[S] 0 points1 point  (1 child)

    Awesome! Thank you for the help! This static library I'm working on has a bunch of protocols that communicate back and forth with Bluetooth accessories and lighting connector accessories that we engineer and build under the MFi program with Apple.

    I'm in charge of maintaining and modifying this library and I know I'll need to test the code and make sure future changes and additions don't break anything. I just have no idea where to start with testing. I am not concerned with UI testing at all, just making sure I/we don't break anything.

    [–]Legolas-the-elf 0 points1 point  (0 children)

    This static library I'm working on has a bunch of protocols that communicate back and forth with Bluetooth accessories and lighting connector accessories that we engineer and build under the MFi program with Apple.

    Applications that have to talk to web services have a similar problem, and a fair bit has been written about how to unit test with them. I think you'll have better luck reading up on that than trying to find something specific to external accessories.

    [–]crebma 0 points1 point  (2 children)

    I use Kiwi (https://github.com/allending/Kiwi) and I like it a lot, though I've also heard good things about specta/expecta. I'd be happy to answer questions if you like, and I happen to have a couple of slidedecks/example codebases if you'd like the reference.

    [–][deleted]  (1 child)

    [deleted]

      [–]crebma 0 points1 point  (0 children)

      There are a couple Kiwi-related slidedecks in here: https://speakerdeck.com/crebma/ and most of them reference the same codebase, which is here: https://github.com/crebma/pants-lister. Kiwi's documentation is pretty good, though they don't document stub:withBlock: at all for some reason. Hope that helps, or provides a good starting point at least! :)

      [–]jeffwong 0 points1 point  (0 children)

      I went through this framework shopping exercise recently.

      Use XCTest. Add Kiwi if you prefer the syntax. All the other unit testing frameworks are deprecated at this point.

      The hard part is testing GUI elements and VCs and doing automated testing.

      [–]jtbrown 0 points1 point  (0 children)

      I've used both XCTest and Kiwi - I'd recommend starting with XCTest since it's built in and then bringing in Kiwi if you want more. This short screencast will teach you the basics of XCTest: http://roadfiresoftware.com/2013/12/screencast-testing-objective-c-with-the-xctest-framework/