JasmineCorp Blogs
Updated Blogs
More .....


JCBid.com online auction Soap-boxes-display-case-of-60-pieces
Soap boxes display case of 60 pieces
JCBid.com online auction Natural-wood-craft-clothespins-display-case-of-60-pieces
Natural wood craft clothespins display c
JCBid.com online auction Pencil-tire-gauge-display-case-of-96-pieces
Pencil tire gauge display case of 96 pie
JCBid.com online auction Nylon-mesh-body-sponge-display-display-case-of-144-pieces
Nylon mesh body sponge display display c
JCBid.com online auction Plastic-craft-wiggly-eyes-display-case-of-84-pieces
Plastic craft wiggly eyes display case o
Blog by JasmineCorp | Create your own Blog

Bookmark and Share RSS Feed | Login           

Clevertester's Blog


My blog is providing information regarding software testing, beta testing, php testing, sql testing etc..........
 

Approaches to Agile Testing - Part 3- Test-Driven Development


By Austin Craig at 2010-09-14 02:19:47
Test-driven development is one of the core practices of Extreme Programming. The practice extends the feedback approach, and requires that you develop test cases before you develop code. Developers develop functionality to pass the existing test cases.

The test team then adds new test cases to test the existing functionality, and runs the entire test suite to ensure that the code fails (either because the existing functionality needs to be modified or because required functionality is not yet included). The developers then modify the functionality or create new functionality so that the code can withstand the failed test cases. This cycle continues until the test code passes all of the test cases that the team can create. The developers then refactor the functional code to remove any duplicate or dead code and make it more maintainable and extensible.

Test-driven development reverses the traditional development process. Instead of writing functional code first and then testing it, the team writes the test code before the functional code. The team does this in very small steps—one test and a small amount of corresponding functional code at a time. The developers do not write code for new functionality until a test fails because some functionality is not present. Only when a test is in place do developers do the work required to ensure that the test cases in the test suite pass. In subsequent iterations, when the team has the updated code and another set of test cases, the code may break several existing tests as well as the new tests. The developers continue to develop or modify the functionality to pass all of the test cases.

Test-driven development allows you to start with an unclear set of requirements and relies on the feedback loop between the developers and the customers for input on the requirements. The customer or a customer representative is the part of the core team and immediately provides feedback about the functionality. This practice ensures that the requirements evolve over the course of the project cycle. Testing before writing functional code ensures that the functional code addresses all of the requirements, without including unnecessary functionality.

With test-driven development, you do not need to have a well-defined architectural design before beginning the development phase, as you do with traditional development life cycle methodologies. Test-driven development allows you to tackle smaller problems first and then evolve the system as the requirements become more clear later in the project cycle.

Other advantages of test-driven development are as follows:

1. Test-driven development promotes loosely coupled and highly cohesive code, because the functionality is evolved in small steps. Each piece of the functionality needs to be self-sufficient in terms of the helper classes and the data that it acts on so that it can be successfully tested in isolation.

2. The test suite acts as documentation for the functional specification of the final system.

3. The system uses automated tests, which significantly reduce the time taken to retest the existing functionality for each new build of the system.

4. When a test fails, you have a clear idea of the tasks that you must perform to resolve the problem. You also have a clear measure of success when the test no longer fails. This increases your confidence that the system actually meets the customer requirements.

Test-driven development helps ensure that your source code is thoroughly unit tested. However, you still need to consider traditional testing techniques, such as functional testing, user acceptance testing, and system integration testing. Much of this testing can also be done early in your project. In fact, in Extreme Programming, 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 meets their requirements.

Visit Clevertester for more information about Beta Testing News, Quality Assurance News and Software Testing
Permalink | Comments (0)

Comments



To add a comment please login by clicking here

JC Store | JasmineCorp | JCBid |Software Development | Domain Registration | Hosting | Web Designing | Buy Books | Advertise with JCSearch | Whois | IP Locator | Add Search | Shopping | Store | Free Blogs | Free GuestBook | Free E-Cards | Free Games | Free Tutorials | Set as Home | Add to Favorite | Suggest a Site | Directory Our Portfolio | Terms of service | Free quote | Tell a Friend | Special Offer | Job Opportunities | games | Usenet Groups  
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
Register a Domain Name:
.com .us .info
.org .in .name
.net .biz .asia