Why is unit testing so essential?

When managing a project, your main goals are to deliver on time, within scope and budget. Any amount of uncertainty is unwelcome, and this is where unit testing can be of high value.

pyramide infoscope

Everyone agrees that testing is an important part of software development: it secures the project’s quality, and ensures the software behaves correctly. However, as delivery cycles accelerate, so does the testing. If using continuous integration, for example, tests are carried out daily. As the payoff of manual testing is often negligible, test automation is one way of making things more efficient. So why not start with your unit tests?

The first step couldn’t be simpler: start with having your developers write unit tests! Using indicators and reports to monitor your level of test coverage and how it evolves, they will allow to determine if your team is implementing unit testing correctly or not. Whereas 100% coverage may be neither useful nor desirable and certainly doesn’t guarantee zero bugs, 20% is certainly too low. Using Test Driven Development (TDD), where the developer writes the test before starting the feature’s development, could also be worth experimenting with.

Once you are satisfied with your level of test coverage, the automation part can be managed with a tool like Jenkins, enabling you to more easily monitor the state of your project. Other advantages include fewer regressions (nice to know when delivering to production) and easier identification of a bug’s origin.

As automated unit tests are so easy to set up, it’s a simple and efficient way to enhance project monitoring. Having them running on a daily basis limits the risk of having something go wrong and realizing when too late. The control you can gain as a project manager is invaluable.

Give yourself a chance to manage your IT projects efficiently