Subscribe by Email

Monday, May 7, 2012

What is meant by traditional unit test-driven development?

With the growing number of benefits of the test driven development it is becoming choice of a million programmers worldwide! More and more software developers are now checking in to use this option.
In the past years the test driven development was not much in use since it was considered to be a development strategy related to the test first programming concepts of the extreme programming or XP that is an agile software development process.
But later when the test driven development was established as an individual and distinct software development process, it began to be widely accepted. Rules and regulations were formulated for this newly discovered development methodology which made it a completely independent software development process. 

Types of Test Driven Development

Later on as the time passed by, two types of test driven development were discovered namely:
  1. Acceptance test driven development process and
  2. Traditional unit test driven development process
This article is focussed up on the latter test driven development type i.e., the traditional unit test driven development process. 
But before we start our discussion regarding the traditional unit test driven development process, let us brief up ourselves with the concepts of the test driven development process so that you will have an easy and effective grasp of what the traditional unit test driven development process really is. 

Steps in Test Driven Development

Test driven development makes use of development cycles that are quite shorter than the generally used software development cycles. These development cycles are comprised of the following steps:
  1. Addition of tests
  2. Execution of all the tests to see if they fail or not.
  3. Writing of the code by which the tests will pass.
  4. Execution of the automated test cases and check whether they succeed or not.
  5. Re-factoring of the code
  6. Repetition of all the above steps.

Styles in Test Driven Development

The test driven development can be carried out according to many defined styles like:
  1. Keep it simple stupid (KISS)
  2. You ain’t gonna need it (YAGNI)
  3. Fake it till you make it
Whichever development style is followed, there are two common steps for every development style:
  1. Write the tests first
  2. First fail the test cases

Traditional Unit Test Driven Development

- Traditional unit test driven development (UTDD) are the result of the advance practices of the test driven development.
- Automated acceptance test cases are created based on the criteria specified by the customers or clients.
- They are used to drive the traditional unit test driven development which in turn ensures that an automated mechanism to check whether the software product meet all the requirements is available to the customers.  

- Traditional test driven development process involves the creation of automated unit tests that are meant to expose the requirements of the software system or application.
- These tests have to fail obviously since the requirements have not been implemented yet. 
- The software developer then has to write code by virtue of which the tests will pass. 
- One thing to be noted is that the test driven development tests are not the same as the unit tests though the two may appear to be similar on the surface. 
- Unit tests are meant for the testing of a piece of code in isolation. 
- On the other hand, a TDD test is meant for driving the design of the software application or program and expresses what that application is meant to do before the actual production of the source code. 
- The traditional unit test driven development grew out of some aspect of the waterfall model. 

No comments:

Facebook activity