Developing and Delivering Products Professionally / Continuous Quality -…
Developing and Delivering Products Professionally / Continuous Quality
If you are not doing Test First then you are doing it wrong!
Test Driven Development (TDD) and we can use it to meet more of our customer's expectations, minimise our maintenance costs, and get fewer regressions and bugs in production. Ultimately without working in a test first culture, you will be unable to do continuous delivery with any confidence.
Test-Driven Development (TDD) – Automated tests created before the code is written to validate that we need that code.
Acceptance Test Driven Development (ATDD) – Tests, either automated or manual, that validate business functionality
Behaviour Driven Development (BDD) – An automated test that validates a particular behaviour that you want your application to have.
The three virtues of Test First:
Business Validation – We have built what was asked for
The worst that can happen is that we built exactly what the customer asked for!
Developer Verification– What we have built works as we intended
You are not a professional if you do not do the due diligence necessary to validate what you have created works as intended and continuous to do so
Verification that changes have not broken original intent
"What's a good code coverage to have?"
It too depends on the context and isn’t a goal.
From an external point of view, customers experiencing bugs in production should be a rare occurrence
From internal point of view, developers should feel comfortable adding or changing functionality without being afraid of introducing bugs that slip into production
If you start with a low coverage, it’s far more effective to make writing unit tests for all new functionality part of your way of working. Combine this with identifying high-risk areas that are currently uncovered and write test for those areas. This way, you’ll soon reap the benefits and achieve the real goal: increase the quality of your software in an effective way.