In order to get my Swift skills leveled up, I decided to start a new project called LifeList. I'm a birding enthusiast, and any serious birder will have a Life List of all the birds they've seen over their lifetime. I thought that creating an app to help me with that goal was something that was achievable and would keep me motivated.
I also wanted to apply the Apple suite of testing tools to see how they've progressed and how well they all work together. I started writing a few unit tests, all went well there. I also wrote a single UI test after finding a crash. It was nice to recreate the crash in a test, just to make sure it didn't happen again! It also led to extracting out some common code and wrapping it in a unit test.
I turned on Code Coverage for my app's scheme. That was a nice addition! Now I could see where I could/should be focusing my testing efforts.
However, I'm kind of a lazy programmer. I got tired of re-running all the tests all the time. But I know running all the tests at some point is valuable, I still wanted feedback if I broke something. I just didn't necessarily want to take the time to do it!
So I ended up installing Server on my laptop and setup an Xcode Bot to
- Clean up old build artifacts
- Build the app
- Run a static analysis
- Run the tests
- Consolidate the results (including code coverage) in a nice report
Its nice to be able to push code changes and within a few minutes know that I haven't affected the health of the app. What's better is that all that information is just a click or two away in Xcode!
On the surface its kind of strange to setup Xcode Server and do all this continuous integration and testing for a one man team. However, in another way it might be even more vital. I don't have anyone else around to do any of this work for me, and I want to spend most of my time actually writing code! We'll see how this setup goes as the project progresses.