Test Driven Development

BLOG XII.

What is Test Driven Development? It can be defined as practice of code for developers to write the new code if the test is failed. The main goal of the TDD is to make your code simpler, clearer and without any bug and it allows the developer to maintain less documentation. There are several steps to achieve the goal.

Resultado de imagen para tdd image
  1. Implement or design how to test your code so you can specify and validate what your code would do.

How to perform TDD Test

Following steps define how to perform TDD test,

  1. Add a test
  2. Check for the failure
  3. Write some code
  4. Run tests and Refactor code
  5. Repeat
  6. Cycle

TDD cycle defines

  1. Implement a test
  2. Run it
  3. Refactor the code
  4. Repeat process

But why do we use TDD instead of Traditional Testing?

  • TDD helps you to build your confidence about the code
  • Achieve 100% coverage test. Every single line of code is tested, unlike traditional testing.
  • Ensures that your system actually meets requirements defined for it. 

So in conclusion:

  • It promotes confirmatory testing of your application code and detailed specification.
  • Both acceptance test (detailed requirements) and developer tests (unit test) are inputs for TDD.
  • TDD makes the code simpler and clear. It allows the developer to maintain less documentation.

Here is a link for more information about TDD:
https://www.guru99.com/test-driven-development.html

Dejar un comentario

Diseña un sitio como este con WordPress.com
Comenzar