As it Matters in Battle
I’ve often thought of an iconic scene from the movie Braveheart and how it pertains to software development. The clip is entitled “As it Matters in Battle” and is shown here:
How in the world does this even relate to software development you may ask? Unit testing is one thing that comes to the front of my mind when I see this scene. You see, in unit testing the goal is to make sure that your software functions under all possible use cases that you care about. You can have a large suite of unit tests that really hammers your code. Maybe you even have 100% code coverage if you are really
The software I’m talking about is in the hands of a user, probably on a mobile device, tablet or a desktop computer. Think for a moment about all the possible things a user can do with your software. What about those unit tests? Did they handle mouse clicks? Touch events? Interaction with various operating systems on different devices? What about different versions of frameworks? Does your unit test suite run on similar hardware and specs to what your users are using? What about memory constraints or other limiting factors?
In my mind, unit tests are a “sanity check” for software and nothing more. Just because all your unit tests pass, does not mean your software is ready for battle. True testing involves using the software as a user would on the specific platform you are targeting – as it matters in battle. If you aren’t doing this type of testing before each release of your software, then your software may not be ready for battle. I’ve learned this lesson with my own app, You Doodle. Some things in the iOS simulator work differently on the device. Maybe I didn’t think the code I changed affected anything else so I sent a version off to Apple without testing everything. Ooops. Recently I broke brush opacity and glow and am still waiting for Apple to release my fixed version 🙂
Make sure to test your software on your actual device and make sure the key features work reliably, then your software has a good chance at working when it matters most – as it matters in battle.
Oh, and if you want to try You Doodle for your iOS device, Download You Doodle from the App Store here.
[…] As I’ve written earlier, I’m not the biggest fan of unit tests. They don’t often test user interaction, and they don’t test integration with other systems, which in my opinion, lessens their value. Manual and user testing I think are critical, especially for mobile apps, as well as integration testing with dependencies. […]