Presentation is loading. Please wait.

Presentation is loading. Please wait.

Test-Driven Development Gary Brown Building better software one test at a time.

Similar presentations


Presentation on theme: "Test-Driven Development Gary Brown Building better software one test at a time."— Presentation transcript:

1 Test-Driven Development Gary Brown Building better software one test at a time.

2 Copyright 2003 - Salt Valley Software Services 2 Test-Driven Development What is Test-Driven Development? Origins of TDD Better code In less time With no defects

3 Copyright 2003 - Salt Valley Software Services 3 Unit Testing Frameworks What are Unit Testing Frameworks? Examples of UTFs Costs Where to get them –www.junit.orgwww.junit.org –www.nunit.orgwww.nunit.org –www.xprogramming.comwww.xprogramming.com

4 Copyright 2003 - Salt Valley Software Services 4 Characteristics of UTFs Most UTFs target OO and web languages UTFs encourage separation of business and presentation logic Tests written in same language as the code Tests are written against the business logic GUI and command line test runners Rapid feedback

5 Copyright 2003 - Salt Valley Software Services 5 Mechanics of TDD Always start with a failing test Quickly write the simplest code needed to pass the test Remove duplication (AKA Refactor) Repeat as needed to meet requirements Test everything that could possibly break

6 Copyright 2003 - Salt Valley Software Services 6 What can be tested? Valid inputs Invalid inputs Errors, exceptions, and events Boundary conditions Everything that could possibly break!

7 Copyright 2003 - Salt Valley Software Services 7 TDD Benefits for Developers Much less debug time Code proven to meet requirements Tests become Safety Net Eliminate Bug Pong Rhythm of Success

8 Copyright 2003 - Salt Valley Software Services 8 TDD Benefits for Business Shorter development cycles Near zero defects Tests become an asset Tests are documentation Competitive advantage!

9 Copyright 2003 - Salt Valley Software Services 9 Getting started with TDD Get some training Start with a small visible project Shoot for 100% test coverage Don’t expect to be perfect Expect to improve dramatically in time Measure the results

10 Copyright 2003 - Salt Valley Software Services 10 TDD in Legacy Code Go Hunting for Bear Build the Safety Net Work in small increments Expect to slow down, then speed up Measure the results

11 Copyright 2003 - Salt Valley Software Services 11 Got Bugs? Go after your most painful defect Write a test to expose it Write code needed to fix it Refactor Repeat Measure the results

12 Copyright 2003 - Salt Valley Software Services 12 Tips for Success TDD is a skill Just Do It Insist on achieving 100% coverage Measure and Review Make Results Visible Just Keep Doing It

13 Copyright 2003 - Salt Valley Software Services 13 How we can help Basic TDD Training Advanced TDD Training Acceptance Testing (QA) Training (soon) Post-training Follow-ups Project Mentoring Process Consulting Software Testability Analysis

14 Test-Driven Development Gary Brown Questions???

15 Test-Driven Development Gary Brown TDD Demonstration

16 Test-Driven Development Gary Brown Questions???


Download ppt "Test-Driven Development Gary Brown Building better software one test at a time."

Similar presentations


Ads by Google