Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

testing

What is code driven testing?

Hassaan Waqar

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.

Code driven testing cycle

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 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.

Benefits of code driven testing

Code driven testing has the following advantages:

  • Makes the code more reliable.
  • Covers a wider scope of code that has been tested.
  • Identifies errors in the initial phases of the software development cycle.
  • Tests public interfaces of the program.
  • Tests how the program reacts to various circumstances that can arise.

RELATED TAGS

testing

CONTRIBUTOR

Hassaan Waqar
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring