Date post: | 11-Jun-2015 |
Category: |
Technology |
Upload: | ervinloh |
View: | 844 times |
Download: | 3 times |
Test-driven Development Practices in White Box Test Automation
Ervin LohALM Program ManagerK365Labs Sdn Bhd
Typical result?
What is Test-driven Development?
“Test-Driven Development seeks specification, not validation, letting you think through your design before you write your functional code”
- Scott Ambler
“Test-Driven Development is a powerful way to produce well designed code with fewer defects”
- Martin Fowler
Test-driven Development Stages
In Extreme Programming Explored (The Green Book), Bill Wake describes the test / code cycle:
Write a single test
Compile it. It shouldn’t compile because you’ve not written the implementation code
Implement just enough code to get the test to compile
Run the test and see it fail
Implement just enough code to get the test to pass
Run the test and see it pass
Refactor for clarity and “once and only once”
Repeat
Test Driven DevelopmentThe motto "Red, Green, Refactor."
Get Agile – Test Driven Development
Tools For Agility, Kent Beck
Practices
Tools
The Demo Scenario
The ConfigurationAn application, Tailspin Toys that builds in Visual Studio 2010
A fully configured Visual Studio 2010 Premium and Team Foundation Server 2010 environment
What’s NeededA lot: tests and builds
Step 1: Unit Test
A method by which individual units of source code are tested to determine if they are fit for use.
Unit Tests with Visual Studio 2010
Step 2: Test Impact Analysis
A method to identify the tests that need to be run for the latest code change.
Integrating Unit Tests and Test Impact Analysis with
Visual Studio 2010
Step 3: Code Coverage
A method to describe the degree to which the source code of a program has been tested.
Integrating Unit Tests and Code Coverage with Visual
Studio 2010
Step 4: Build Automation
An act of automating a wide variety of tasks such as compiling computer source code into binary code, packaging binary code, and running tests.
Integrating Build Automation and Unit Tests
Quality Indicators
Iteration 1 Iteration 3 Iteration 4 Iteration 5Iteration 2
91
20
51
76
60
56
19
18
40
71
80
5.32
12
8
9
Starting Test Driven DevelopmentCreating a cultural change is hard…
….. and it can be done
Questions & Answers
Resources
Brian Marick’s Sitehttp://www.testdriven.com
Guidelines for Test-Driven Developmenthttp://msdn.microsoft.com/en-us/library/aa730844(v=vs.80).aspx
Using TDD with ASP.NET MVChttp://msdn.microsoft.com/en-us/library/ff847525.aspx
Apply Test-Driven Development to your Database Projectshttp://msdn.microsoft.com/en-us/magazine/cc164243.aspx
Improve the Design and Flexibility of Your Project with Extreme Programming Techniqueshttp://msdn.microsoft.com/en-us/magazine/cc163982.aspx
Recommended Bookstest-driven development: A Practical GuideDave Astels
Prentice-Hall/Pearson Education, 2003
ISBN 0-13-101649-0
Review available on my web-site
______________________________________
Test-Driven Development: By Example Kent Beck
Addison-Wesley, 2003
ISBN 0-321-14653-0
Recommanded BooksRefactoring: Improving the Design of Existing
CodeMartin FowlerAddison-Wesley, 1999ISBN 0-201-48567-2
__________________________________
Test-Driven Development in Microsoft.NETJames W. Newkirk; Alexei A. Vorontsov
Microsoft Press, 2004
ISBN 0-7356-1948-4
xUnit.net & xUnit Test Pattern
We value your feedback!
Please remember to complete the overall conference evaluation form and return it to the Registration Counter.