Intetics Inc.
10001 Tamiami Tr N, Suite 114
Naples, Florida 34108
United States
www.intetics.com
Office: +1-239-217-4907
TDD & BDD AS EFFICIENT PRACTICES OF SOFTWARE DEVELOPMENT
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
Software development
Agile
Kanban
Lean Development
Test Driven Development
(TDD)
Extreme Programming
Scrum
Behavior Driven Development
(BDD)
Approaches to software development process
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
o Development is a complex task
o Often occurring faults
o Long expectation of test results
o Possibly unpromising test results
o Time consuming bug fixing process
o And more reasons
Why to seek development process optimization?
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
Let’s compare these approaches:
VSTest Driven Development
Behavior Driven Development
Traditional Development
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
This is an approach based on the idea that the delivery lifecycle should be organized into phases or stages.
Traditional Approach
Design and detailed
requirements gathering
Development Testing Deployment
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
o Testing is one of the latest stages
o Testing results are available only at the end of the cycle
o Fast deployment of low-quality features
o Pushing out the deadlines
o Increasing budget for QA
Characteristics
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
This is a software development life cycle is changed. The testing stage goes before the actual development
Test-First Approach
Design and detailed
requirements gathering
Unittests
Development & refactoring
Functional tests
Deployment
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
Tests are held before coding: the code is developed to pass the tests.
Tests serve as superior requirements
Developers write code only to pass tests and make the refactoring later
Characteristics
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
TDD: Test-Driven Development
This approach is based on the sequence of short development cycles:
1. Red tests: write the fail tests (the code hasn’t
been produced yet)
2. Green tests: write the code. Make the tests pass.
3. Refactor: rewrite the code better. Tests should pass.
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
Expected Benefits:
• Developers are focused first on the results and actual feature realization before coding.
• TDD helps to design code in a more simple way.
• Increasing final product quality
• Helps decrease the overall development time
• Doesn’t require long testing or bug fixing process
• Less lines of code that reduces the overall project time
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
Some TDD difficulties:
• Not easy to implement.
• The developers could produce too many tests or not enough tests.
• The test suite is seldom used.
• The learning curve of this technique is quite long.
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
Some TDD Limitations:
• Focused on technical specifications rather than on system behavior and business cases.
• Difficult to deploy if the task is to revise or modify the product
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
This is a technique that is often considered as a refinement of TDD. It makes requirements more clear.
BDD: Behavior-Driven development
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
Focus on those behaviors of the system that contribute to the business outcomes directly.
Write the requirements in a way that would be clear to all the project members
Use specific “Given-When-Then” style for the requirements specification and developing scenarios/user stories >>
Principles to follow:
GivenDescribes the pre-condition of the tests
WhenThe specified behavior is described
ThenShows the changes that are expected in line with the specified scenario.
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
Expected benefits
• Clear definition of the requirements improves team communication
• Makes development process more short and simple.
• Allows using tools that support the automatic generation of tech and end-user documentation out of BDD specifications.
• Can make development process cost effective and efficient.
• Helps to assure the high quality of the future product.
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
• Could be complicated for implementation.
• All the team members must learn how to communicate and define the requirements of BDD templates.
• Requires high professional competencies among the team members.
• Using BDD in line with a traditional approach can be unsuccessful.
Some BDD Difficulties
Intetics Inc. | 10001 Tamiami Tr N, Suite 114, Naples, Florida 34108, United States
Office: +1-239-217-4907 | [email protected] | www.intetics.com
What should you get out of these slides?
• It’s difficult to create a good software product when team is not aware of the work plan and doesn’t use any QA program.
• TDD& BDD approaches are designed to leave behind most of those gaps.
• By implementing them teams receive a lot more efficient way to deliver high-quality software.
• TDD & BDD approaches could be combined very efficiently and the development process presented as two related cycles.
Intetics Inc.
10001 Tamiami Tr N, Suite 114
Naples, Florida 34108
United States
www.intetics.com
Office: +1-239-217-4907
Contact US:
Intetics Inc.10001 Tamiami Tr N, suite 114Naples. Florida 34108United States
[email protected]: +1-239-217-4907