CSC/ECE 517 Fall 2009/wiki2 6 TDD

From Expertiza_Wiki
Jump to navigation Jump to search

Survey of "Driven Development" Methodologies

Software Development Methodology

According to 1 :

"A software development methodology is a framework used to structure, plan, and control the process of developing a software 

system.[1]"
Figure 1

A software might range from a simple small application to a large and complex system in which the applications typically manage immense data sets and support complicated and extensive algorithms. Ad hoc approaches might sometimes work in developing small applications, because of the brilliance of the individuals developing it, but fails in most cases. Figure 1 shows the effects of an improper development methodology. A software development process has requirements. The things that an organization must understand are what software system will be developed, how much time would the development take, and what would be the quality of the final product. The amount and the way the software system meets the requirements determines the quality of a software system, Hence, a software development methodology is a critical tool for reaching these, complex and difficult to manage, requirements [2].

Below are a list of few software development approaches. Till date we have development approaches like responsibility driven (RDD), test driven (TDD), behavior driven (BDD), domain driven(DDD), and model driven (MDD). All these approaches emphasize a core set of values and principles around which efficient software development practices, techniques, and tools have emerged. A developer should thoughtful choose among practices without losing their essence. But not all practices are congruent [3].

Responsibility Driven Development(RDD)

Test Driven Development(TDD)

Figure 2 [7]

Test Driven (TDD) methodologies are a part of programming methodologies referred to as Agile Software Development or Extreme Programming. These methodologies encourage a faster and iterative development cycle. TDD has many advantages over the typical waterfall development, such as improved black box testing performance, reduced code complexity, greater software quality, and greatly reduced test and debug time near the end of the development cycle[3].

The first step in Test Driven Development (TDD) methodology consists of writing unit tests for the system from the system requirements document that describes the functionality of the system. The first requirement for good TDD is to generate a set of exhaustive use cases that can be broken down into very small units of functionality, these are termed user stories. Taken together, all of these user stories make up the complete set of requirements. The customer at this point can choose those user stories that are essential to the system or prioritize them for time and cost considerations. These user stories should be small enough that they can be fulfilled by a developer in a short amount of time, in most cases much less than one day. Each of these user stories have a unit test written for them before any actual business logic is designed or implemented. After the unit test is verified as meeting the requirements of the user story, the actual functional code to meet that unit test is written and tested. This is repeated for each user story with all unit tests being run as often as possible, at each incremental change of the business logic code. By repeating this test and code cycle working software can be produced quickly and continuously (even if this software initially only meets a small subset of the full requirements). Refactoring of the code base can be performed to reduce complexity as long as it does not affect the ability of the code to pass all unit tests that it previously was able to meet.

Martin Fowler claims that TDD “gives you this sense of keeping just one ball in the air at once, so you can concentrate on that ball properly and do a really good job with it.” [6]

Behavior Driven Development(BDD)

Domain Driven Development(DDD)

Model Driven Development(MDD)

Conclusions

References

[1] http://en.wikipedia.org/wiki/Software_development_methodologies

[2] Larry Trussell, “Essential Software Development Methodology”, Power Engineering Society 1999 Winter Meeting, IEEE ,31 Jan.-4 Feb. 1999 Page(s):357 - 361 vol.1.

[3] Wirfs-Brock, R.J.;” Driven to ... Discovering Your Design Values”, IEEE Software, Volume 24, Issue 1, Jan.-Feb. 2007 Page(s):9 - 11

[4] Fraser, J.; Mattu, B.S.; "Test Driven Design Challenges for Faster Product Development", Systems Conference, 2007 1st Annual IEEE 9-13 April 2007 Page(s):1 - 5

[5] http://www.agiledata.org/essays/tdd.html

[6] M. Fowler, Test-Driven Development by Example, Addison-Wesley, 2003.

[7] Mugridge, R.; "Test driven development and the scientific method" Agile Development Conference, 2003. ADC 2003. Proceedings of the 2003 Page(s):47 - 52