For the last eleven months I was part of the team that worked on Philips HUE 2.0 app for iPhone. (While being employed by Sogeti)
We worked using TDD for this project. I did have some experience with writing Unit test, however that was still in iOS 6/7 so really some time ago. And there we only wrote them to test some business logic, like sorting of account number.
The TDD in this project is whole other ballgame. It is way harder to do TDD, the biggest pitfall is making your test case too big, so you lose context. Make your test small, so it is clear why you write the test.
Another problem I saw happening is that developers tend to try to test UIKit objects, in my opinion you should test that piece of code that you wrote. The moment you try to recreate a complete UITableView in the setup of your test, you need to reconsider. Maybe place this test in the UI test framework, wether that is Apple’s or another i.e Calabash.
While doing the TDD, I was wondering about the release process and the troubles we always seem to encounter. Wether this release was for a sprint demo, or for a beta test does not matter. The problems I saw where always the same:
- “Is this the right commit to use for the demo / release?”
- “Shoot, the signing is again not working!! Why, oh why does Apple do this to me?”
- “I hate releasing?
- “Shoot, still some regression on this build and the demo is in, like, 10 minutes”
- Big panic every time a release is needed.
In ending up doing the build needed on some developers Mac, who has the most chance of luck in getting the release build. Sound familiar? Well, to it was sounding more and more familiar. And I started to think about a solution to this, it should be possible to setup a work flow where can make releasing a non-issue, so we, the team, can focus on what we do best, create and improve features in your beloved app. DevOps to the rescue! Thanks to the experience I have in System Engineering I was able to come up with a Continuous Delivery plan, that will make releasing easy peasy!
There are a lot of different tools available that help releasing easy. For iOS specific there is Fastlane, Fastlane can really help and provides a lot of different sub-tools. It is really easy in setting up and using it results in on simple command.
However I do feel that there is a lot of overlap in what the different tools do. And you really have to think about what you want to achieve and what tool (sub-tool of the tool) fits the bill best. Trying to use all sub-tools is a waste of time, in my opinion, since it will most likely not fit for 100%. It is better to have the overlap, then trying and failing to get the last step in that one tool.
I’m thinking in writing a couple of pieces on this subject, where I can merge all the different issues that needed to be solved in order in getting the releasing easier, without loosing measurable quality.