Test Driven Development

Automated unit testing is a way of ensuring that adding new features or making modifications to an application will not break the existing code/features.

By adding simple validation tests (many small tests, usually a separate test for each feature) as the software is developed, the desired behaviour of the software is locked down.

Unit tests provide the link between the software and its specification document. In fact, the tests become the specification.

When an application has a good test suite, the programmer can make radical changes to the system and have full confidence that these changes have successfully taken into account all the intricacies of the system; something that is increasingly hard to keep in mind the larger an application becomes.

Test Driven Development (TDD) is a methodology by which tests are programmed even before the functionality is coded. This carries the following benefits:

  1. The programmer is forced to think about behaviour and outcomes before he/she starts coding
  2. The test can be tested. By writing a test that fails initially (because the functionality does not exist yet), the logic of the test can be tested and debugged as the feature is developed. Thus making sure it fails correctly and for the right reasons so it can catch those pesky bugs in future.
  3. Coders tend to code less. i.e. tests help you to create simple, beautiful code that only does what it needs to. Less is definitely more in programming.

The figure below shows how testing plays a major role in keeping a the development process scalable. The benefits are immense: Project teams can be smaller, software can cost less to develop and take less time. Developers can code boldly and without fear.

Remember that unit testing is only one part of the formula. Many other techniques and methodologies play a role in differentiating a professional and well-organized development team from the also-rans such as:

  1. Selecting the right framework
  2. Staying up to date with the latest technology and trends
  3. Keeping things DRY (Don’t Repeat Yourself) by not repeating code, logic or data
  4. Source code management
  5. Model View Controller separation
  6. Many more…

Topics such as these will be covered in detail in our blog, offering insights into how we approach development and why we are a truly agile development company.

Process Management

Test Driven Development

Engineering Focused

© Copyright - Designed by Pexeto