Test-driven Development Practices in White Box Test Automation
-
Upload
ervinloh -
Category
Technology
-
view
846 -
download
3
description
Transcript of Test-driven Development Practices in White Box Test Automation
![Page 1: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/1.jpg)
![Page 2: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/2.jpg)
Test-driven Development Practices in White Box Test Automation
Ervin LohALM Program ManagerK365Labs Sdn Bhd
![Page 3: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/3.jpg)
Typical result?
![Page 4: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/4.jpg)
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
![Page 5: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/5.jpg)
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
![Page 6: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/6.jpg)
Test Driven DevelopmentThe motto "Red, Green, Refactor."
![Page 7: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/7.jpg)
Get Agile – Test Driven Development
Tools For Agility, Kent Beck
Practices
Tools
![Page 8: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/8.jpg)
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
![Page 9: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/9.jpg)
Step 1: Unit Test
A method by which individual units of source code are tested to determine if they are fit for use.
![Page 10: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/10.jpg)
Unit Tests with Visual Studio 2010
![Page 11: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/11.jpg)
Step 2: Test Impact Analysis
A method to identify the tests that need to be run for the latest code change.
![Page 12: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/12.jpg)
Integrating Unit Tests and Test Impact Analysis with
Visual Studio 2010
![Page 13: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/13.jpg)
Step 3: Code Coverage
A method to describe the degree to which the source code of a program has been tested.
![Page 14: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/14.jpg)
Integrating Unit Tests and Code Coverage with Visual
Studio 2010
![Page 15: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/15.jpg)
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.
![Page 16: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/16.jpg)
Integrating Build Automation and Unit Tests
![Page 17: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/17.jpg)
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
![Page 18: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/18.jpg)
Starting Test Driven DevelopmentCreating a cultural change is hard…
….. and it can be done
![Page 19: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/19.jpg)
Questions & Answers
![Page 20: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/20.jpg)
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
![Page 21: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/21.jpg)
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
![Page 22: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/22.jpg)
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
![Page 23: Test-driven Development Practices in White Box Test Automation](https://reader033.fdocuments.us/reader033/viewer/2022060115/5578fac7d8b42a675b8b4a95/html5/thumbnails/23.jpg)
We value your feedback!
Please remember to complete the overall conference evaluation form and return it to the Registration Counter.