Code driven testing is used to find venues when a given program will fail. A code driven test intends to test a program thoroughly, so that it fails the given test. Code is then updated and the test is carried out again until it passes. The process is then repeated for all other functional units of the program.
The code driven testing cycle can be divided into four steps:
Step 1: A test is added that is likely to fail the existing code.
Step 2. Test the program completely and see if it fails the code.
Step 3. Update the code so that it passes the test.
Step 4. Update code again if it still fails the test. Otherwise, repeat the entire process for the other functional elements of the program.
The flowchart below shows the code driven testing cycle:
Code driven testing is a common practice used in agile software development. Code units are prepared in advance and applied to the program later.
Code driven testing has the following advantages:
View all Courses