Test driven development: TDD /Test first development

avril 22, 2018

Test driven development: TDD /Test first development

Test driven development TDD /Test first development

Extreme programming (XP) emphasizes Test driven development (TDD)

Test Driven Development is primarily a design technique with a side effect of ensuring that your source code is

thoroughly unit tested.

However, there is more to testing than this.

You’ll still need to consider other agile testing techniques such as agile acceptance testing and investigative testing.

In fact, in XP the acceptance tests for a user story are specified by the project stakeholder(s) either before or in

parallel to the code being written, giving stakeholders the confidence that the system does in fact meet their

requirements.

Why use TDD

A significant advantage of Test Driven Development is that it enables you to take small steps when writing software.

For example, assume you add some new functional code, compile, and test it. Chances are pretty good that your

tests will be broken by defects that exist in the new code.

It is much easier to find, and then fix, those defects if you’ve written two new lines of code than two thousand.

The implication is that the faster your compiler and regression test suite, the more attractive it is to proceed in

smaller and smaller steps.

TDD tools

Following are some available tools to do TDD
Jmock
Junit
PHPUnit
TestNG
VBUnit
DocTest
GoogleTest
Selenium
PyUnit

 

Leave a Reply

You must be logged in to post a comment.