Test-driven development: Difference between revisions

Content deleted Content added
No edit summary
Tags: Reverted possible vandalism
m Reverted 1 edit by AllyeahIamNicer123w2 (talk) to last revision by Leonidlednev
Line 2:
{{Software development process}}
 
'''Test-driven development''' ('''TDD''') Unit tests created in a test-driven is a way of writing [[source code|code]] that involves writing an [[test automation|automated]] [[unit testing|unit-level]] [[test case]] that fails, then writing just enough code to make the test pass, then [[refactoring]] both the test code and the production code, then repeating with another new test case.
 
Alternative approaches to writing automated tests is to write all of the production code before starting on the test code or to write all of the test code before starting on the production code. With TDD, both are written together, therefore shortening debugging time necessities.<ref>{{Cite journal |last1=Parsa |first1=Saeed |last2=Zakeri-Nasrabadi |first2=Morteza |last3=Turhan |first3=Burak |date=2025-01-01 |title=Testability-driven development: An improvement to the TDD efficiency |url=https://www.sciencedirect.com/science/article/pii/S0920548924000461 |journal=Computer Standards & Interfaces |volume=91 |pages=103877 |doi=10.1016/j.csi.2024.103877 |issn=0920-5489}}</ref>
Line 325:
}}</ref>
 
'''Unit tests created in a test-driven''' development environment are typically created by the developer who is writing the code being tested. Therefore, the tests may share 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 those parameters. Another example: if the developer misinterprets the requirements for the module they are developing, the code and the unit tests they write will both be wrong in the same way. Therefore, the tests will pass, giving a false sense of correctness.
 
A 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]].
Line 387:
[[Category:Software development process]]
[[Category:Software testing]]
 
Hello, I am AllyeahIamNicer123w2, and this is a sample test