Shortcomings
- Test-driven development is difficult to use in situations where full functional tests are required to determine success or failure. Examples of these are user interfaces, programs that work with databases, and some that depend on specific network configurations. TDD encourages developers to put the minimum amount of code into such modules and to maximize the logic that is in testable library code, using fakes and mocks to represent the outside world.
- Management support is essential. Without the entire organization believing that test-driven development is going to improve the product, management may feel that time spent writing tests is wasted.
- Unit tests created in a test-driven development environment are typically created by the developer who will also write the code that is being tested. The tests may therefore share the same blind spots with the code: If, for example, a developer does not realize that certain input parameters must be checked, most likely neither the test nor the code will verify these input parameters. If the developer misinterprets the requirements specification for the module being developed, both the tests and the code will be wrong.
- The high number of passing unit tests may bring a false sense of security, resulting in fewer additional software testing activities, such as integration testing and compliance testing.
- The tests themselves become part of the maintenance overhead of a project. Badly written tests, for example ones that include hard-coded error strings or which are themselves prone to failure, are expensive to maintain. This is especially the case with Fragile Tests. There is a risk that tests that regularly generate false failures will be ignored, so that when a real failure occurs it may not be detected. It is possible to write tests for low and easy maintenance, for example by the reuse of error strings, and this should be a goal during the code refactoring phase described above.
- The level of coverage and testing detail achieved during repeated TDD cycles cannot easily be re-created at a later date. Therefore these original tests become increasingly precious as time goes by. If a poor architecture, a poor design or a poor testing strategy leads to a late change that makes dozens of existing tests fail, it is important that they are individually fixed. Merely deleting, disabling or rashly altering them can lead to undetectable holes in the test coverage.
Read more about this topic: Test-driven Development
Famous quotes containing the word shortcomings:
“My mother and father are the only people on the whole planet for whom I will never begrudge a thing. Should I achieve great things, it is the work of their hands; they are splendid people and their absolute love of their children places them above the highest praise. It cloaks all of their shortcomings, shortcomings that may have resulted from a difficult life.”
—Anton Pavlovich Chekhov (18601904)
“No shortcomings of other people cause us to be more intolerant than those which are caricatures of our own.”
—Franz Grillparzer (17911872)
“The higher, the more exalted the society, the greater is its culture and refinement, and the less does gossip prevail. People in such circles find too much of interest in the world of art and literature and science to discuss, without gloating over the shortcomings of their neighbors.”
—Mrs. H. O. Ward (18241899)