Introduction to TDD
Spanish version / Versión en Español Why test an application? Because it's the best way to find defects in software. Testing does not guarantee the application is free of bugs, but it allows us to detect them. Testing helps us create a higher quality product. A well written test gives us confidence to refactor the code it tests; if we break it, the test will fail. 1 - A taxonomy of tests Unit tests: They test a code block in isolation from its environment (project, solution, package, etc). In their most purist form, unit tests should not access any external dependency such as the file system, databases, external web services, special hardware, etc. This can be achieved via various techniques that we'll look at in a later post. The main reasons for these restrictions are to have real isolation of the test unit, and keeping unit tests fast. Fast unit tests are important in order to keep the TDD cycle fast and productive; if we bog them down with I/O, they wil...