DESIGN WITH TEST DRIVEN DEVELOPMENT
The Agile software development approach and the TDD technique encourage the production of high quality, customer-oriented software by increasing the efficiency and willingness to change with the ever-developing industry. Recently these methods gained popularity worldwide. These approaches have proven their success and they are used widely by many different companies all over the world.
WHY TDD?
Test Driven Development is a rapid cycle of testing, coding, and refactoring. It’s the practice of always writing test codes before the code is tested. Writing the tests first allows to see the list of tests that must pass. In addition, the risk of finding bugs/change needs late in waterfall software development are overcomed by obligatory writing classes which meet the requirement. Using test classes are also useful to handle additional business scenarios in the future rapidly.
Unit tests ensure that the methods coded work as they supposed to. But unit testing is not as easy as it may seem. Firstly it is necessery to determine which tools to use. Big test engines, configured with script languages are being used by QA teams. These engines are not strong and not suitable enough for unit testing. It is the reason why TDD is a necessity to pull the testing effort to a reasonable level.
TDD reduces the costs of QA tests, user acceptance tests, software architecture and management changes and also makes testing easier.
The software projects developed with traditional waterfall methods, do not succeed or can not meet the business changing requirements because they are low quality.
TDD leads to increased projects success rates when it is used correctly. TDD might increase the initial workload but maximizes the long term benefits.
The benefits of TDD;
- Makes the code safe through related unit testing
- Eliminates the problems caused by the code design
- Makes the regression tests much easier
- Undamaged functionality of existing codes by the new codes that are added or changed
- Makes object oriented programming principles easily used
- Provides a secure environment to safely refactor
- Reduces the cost of finding/fixing bugs
- Demonstrates the written program in the system earlier
- Eliminates unnecessery code
- Makes it easier for testing team to Focus on the actual testing procedures
- More fun to code with TDD and highly motivated teams
- Eliminates the problems caused by the code design
- Makes the regression tests much easier
- Undamaged functionality of existing codes by the new codes that are added or changed
- Makes object oriented programming principles easily used
- Provides a secure environment to safely refactor
- Reduces the cost of finding/fixing bugs
- Demonstrates the written program in the system earlier
- Eliminates unnecessery code
- Makes it easier for testing team to Focus on the actual testing procedures
- More fun to code with TDD and highly motivated teams
SCOPE
Day 1
- What is Agile?
- Exercise: new product development
- Unit tests
- Usage of xUnit
- Demo: Unit Test anatomy
- Exercise: Writing unit tests for existing code
- TDD overview: What is TDD? What are the benefits of TDD? How to apply TDD?
- Demo: the first development with TDD
- Exercise: adding new features to a product with TDD
- Exercise: new product development
- Unit tests
- Usage of xUnit
- Demo: Unit Test anatomy
- Exercise: Writing unit tests for existing code
- TDD overview: What is TDD? What are the benefits of TDD? How to apply TDD?
- Demo: the first development with TDD
- Exercise: adding new features to a product with TDD
Day 2
- Software Design: Basic Principles
- Continuously Developed Code Design : Refactoring
- Exercise: Bad smells
- Exercise: Editing the code given
- Unit Integration
- Exercise: The use of mock objects
- Continuously Developed Code Design : Refactoring
- Exercise: Bad smells
- Exercise: Editing the code given
- Unit Integration
- Exercise: The use of mock objects
Day 3
- Emergent Architecture
- Exercise: Online Booking System Design
- Test Design
- Exercise: Editing the tests written
- Automation and Documentation
- Demo: Automatic Requirements Document
- Exercise: Online Booking System Design
- Test Design
- Exercise: Editing the tests written
- Automation and Documentation
- Demo: Automatic Requirements Document
AUDIENCE
Developers and Q/A teams to adopt TDD aiming to increase their effectiveness in delivering high-quality software products.
Recommended reading and examples before attending the course:
- www.junit.org
- www.jmock.org
- Kent Beck,Test Driven Development: By Example
- J. B. Rainsberger with Scott Stirling,JUnit Recipes: Practical Methods for Programmer Testing
