Test-driven development is a software development process that relies on the repetition of a very short development cycle. This process is heavily emphasized by those using Agile development methodologies. White-box testing (also known as clear box testing, glass box testing, transparent box testing, and structural testing) is a method of software testing that tests internal structures of an application, as opposed to its functionality. In this session, we will learn how to use white box test automation in the form of test-driven development at the unit, integration and system levels of the software testing process.
4. 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
5. 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
7. Get Agile – Test Driven
Development Practices
Tools For Agility, Kent Beck Tools
8. The Demo Scenario
The Configuration
An application, Tailspin Toys that builds in Visual
Studio 2010
A fully configured Visual Studio 2010 Premium and
Team Foundation Server 2010 environment
What’s Needed
A lot: tests and builds
9. Step 1: Unit Test
A method by
which individual
units of source
code are tested to
determine if they
are fit for use.
15. 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.
20. Resources
Brian Marick’s Site
http://www.testdriven.com
Guidelines for Test-Driven Development
http://msdn.microsoft.com/en-us/library/aa730844(v=vs.80).aspx
Using TDD with ASP.NET MVC
http://msdn.microsoft.com/en-us/library/ff847525.aspx
Apply Test-Driven Development to your Database Projects
http://msdn.microsoft.com/en-us/magazine/cc164243.aspx
Improve the Design and Flexibility of Your Project with Extreme Programming
Techniques
http://msdn.microsoft.com/en-us/magazine/cc163982.aspx
21. Recommended Books
test-driven development: A Practical Guide
Dave 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
22. Recommanded Books
Refactoring: Improving the Design of Existing
Code
Martin Fowler
Addison-Wesley, 1999
ISBN 0-201-48567-2
__________________________________
Test-Driven Development in Microsoft.NET
James W. Newkirk; Alexei A. Vorontsov
Microsoft Press, 2004
ISBN 0-7356-1948-4
xUnit.net & xUnit Test Pattern
23. We value your feedback!
Please remember to complete the
overall conference evaluation form and
return it to the Registration Counter.