Notes
Outline
Unit Testing in VFP
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com
Who is this guy?
Consultant
Author
Essential SourceSafe
Hacker’s Guide to Visual FoxPro
Microsoft Certified Solution Developer
Microsoft Certified System Engineer
Microsoft Support Most Valuable Professional
What we’ll cover tonight
eXtreme Programming tenets
Refactoring
Unit Testing
How to accomplish this in VFP
eXtreme Programming tenets
Customer On-Site
Pair Programming
Short Iterations before delivery
Continuous integration
Refactoring
Rules for making objects work better
Unit Testing
Before developing a new method, define a test that describes:
What the method does
How it handles errors
What it returns
Write the tests, then write the code
“UnitTests are programs written to run in batches and test classes. Each typically sends a class a fixed message and verifies it returns the predicted answer. “ – c2.com
How to do it in VFP
Extreme Programming
Refactoring
Unit Testing
Extreme Programming: Planning
Refactoring
Martin Fowler wrote book, Addison-Wesley
Discusses basics of refactoring
Catalogs common refactorings
Explores issues, business, psychological with programmers and managers
Unit Testing
XP says to write tests first
Run tests to confirm it fails
Write code to pass tests
DONE!
Unit Testing
Ideally, unit tests can be run as one-off and in a batch
Requires “TestFriendlyEnvironment”
Framework that supports
Global object creation
Login bypass
Command-line and GUI “runners”
Other Kinds of Testing
Load Testing
Microsoft site for free web testing tool
GUI Testing
FoxRunner from Manfred Ratzmann
Automating Internet Explorer from VFP
VFP 7 AATest.APP
Coverage Testing
VFP Coverage Profiler
Where to learn more
http://www.xprogramming.com
http://fox.wikis.com/wc.dll
?Wiki~CategoryTesting
FoxRunner: (in German) http://www.cal.de/autofox.htm
http://www.hallogram.com/foxrunner/
Thank you!
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com