

If you've fundamentally misunderstood the requirements, you may need to rethink your entire program design. That said, it will likely cost you more time than a simple syntax or compile error. So long as you realize that you've misunderstood the project requirements (3) before writing code, the time you lose to this type of "bug" will be minimal. Syntax errors (1) and compile errors (2) are numbers one and two on the list because they are dead simple to identify and fix.

So why are automated test errors fourth on the list? Consequences of Automated Test ErrorsĮrrors that you catch during testing do not make it into your production code.
TORTOISEHG BUGS CODE
This is a great way to sharpen your thinking and ensure your code is meeting the system requirements. Automated testing will force you to resolve the differences between your two approaches.

Or, perhaps you will interpret the requirements differently when writing the test than you do when writing the code. Oftentimes, in the course of implementing your code you will realize that you forgot to account for some requirement in your test. Forced resolution of ambiguous requirements It's unlikely to have the same bug in your code and your test. It's possible to have a bug in both your code and your test. It's possible to have a bug in your test. It's possible to have a bug in your code. One major advantage of automated testing, though, is that it provides a natural double-check. In fact, the need to maintain two separate "code bases" (the actual code plus the tests) is a frequent criticism of automated testing generally. Yes, this means you need to check two different places to find the problem. There are two possible causes of a failing test: In other words, an automated test error is a failing test. This includes a variety of techniques:įor the purposes of this series, an automated test error is any automated test that is not passing. One of the best ways to reduce the number of runtime errors in your code is to use automated testing.
TORTOISEHG BUGS SOFTWARE
This is part 4 of a 7-part series comparing different kinds of software bugs.
