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: TDD Model [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[4].

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. Combining all of the user stories gives a complete and comprehensive set of requirements. The next step is to prioritize these user stories, for development, based on the criteria: importance, cost, time etc. The user stories should be so short that each story should not take much time to develop. Before any of the user story is designed or implemented a unit test case has to be designed for each of the user story. After the unit test is verified and validated as correct, the developer writes the code to meet the functionality and then unit tests it for correctness. Once the tests are run the code is improved by refactoring it and then testing it again. This step 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 tests and code cycle working software can be produced quickly and continuously [4]. Figure 2 depicts the TDD Model.

According to Martin Fowler 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