Commits

Anonymous committed 025bb71

fixed wording and removed repitition

Comments (0)

Files changed (1)

_posts/2014-04-11-testing_your_chicken_code.md

 
 #### What does testing not give you?
 
-Tests for features can never prove that your code doesn't contain bugs. It is only an estimation. You write as much tests as needed to reach a level of confidence that you find sufficient.
+You write as much tests as needed to reach a level of confidence that you find sufficient.
 This level may be either perceived intuitively or measured. A common way to measure it is the, so called, code coverage analysis. An analyzer runs your tests and checks which code paths they exercise. The result may be used to derive a metric for the developer on when he/she has good enough tests. This approach has some obvious flaws and a 100% coverage says nothing about
 the quality of your tests. You can easily see that you can have tests that execute all of your code paths but simply do not verify their outputs. In this case you have 100% coverage, but actually
 zero confidence that the code is correct.
 
 Another aspect that must be emphasized is that tests can never prove the absence of bugs, possibly with the exception of regression tests. If tests have been written **after** a certain bug occurred you have a high probability that this specific bug has been fixed. Apart from these though, tests are by no means a proof for the absence of bugs.
 
-Tests are not a silver bullet and are not a replacement for good design and solid software engineering skills. Having great many tests that verify features of your application is comforting and all, but be assured that there will be a time when a bug pops up in your application. All your tests didn't do anything to prevent this bug. You're on your own now.
+Tests are not a silver bullet and are not a replacement for good design and solid software engineering skills. Having great many tests that verify features of your application is comforting and all, but be assured that there will be a time when a bug pops up in your application. All your tests didn't do anything to prevent it. You're on your own now.
 Now you actually have to understand your system, reason about it and figure out what went wrong. This is another crucial part of developing
 an application. You must make sure that you have a system that you can actually understand. Tests can help to develop such a system, as it has been shown that software that is easy to test is often also [simpler](http://www.infoq.com/presentations/Simple-Made-Easy), more focused and easier to comprehend.