unit testing in vfp - ted roche · 2012. 12. 17. · unit testing before developing a new method,...
TRANSCRIPT
![Page 1: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/1.jpg)
Unit Testing in VFP
Ted Roche
Ted Roche & Associates, LLC
http://www.tedroche.com
![Page 2: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/2.jpg)
Who is this guy?ConsultantAuthor
Essential SourceSafe Hacker’s Guide to Visual FoxPro
Microsoft Certified Solution DeveloperMicrosoft Certified System EngineerMicrosoft Support Most Valuable
Professional
![Page 3: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/3.jpg)
What we’ll cover tonighteXtreme Programming tenetsRefactoringUnit TestingHow to accomplish this in VFP
![Page 4: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/4.jpg)
eXtreme Programming tenetsCustomer On-SitePair ProgrammingShort Iterations before deliveryContinuous integration
![Page 5: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/5.jpg)
RefactoringRules for making objects work better
![Page 6: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/6.jpg)
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
![Page 7: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/7.jpg)
How to do it in VFPExtreme ProgrammingRefactoringUnit Testing
![Page 8: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/8.jpg)
Extreme Programming: Planning
Enhancement Request 100234:Need to re-cost parts as job changes
TR
1
2 days / 3 days
UserStory
Estimate Assigned to
Priority
Actual
![Page 9: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/9.jpg)
RefactoringMartin Fowler wrote book, Addison-
WesleyDiscusses basics of refactoringCatalogs common refactoringsExplores issues, business,
psychological with programmers and managers
![Page 10: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/10.jpg)
Unit TestingXP says to write tests firstRun tests to confirm it failsWrite code to pass testsDONE!
![Page 11: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/11.jpg)
Unit Testing Ideally, unit tests can be run as one-off
and in a batchRequires “TestFriendlyEnvironment”Framework that supports
Global object creation Login bypass
Command-line and GUI “runners”
![Page 12: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/12.jpg)
Other Kinds of TestingLoad Testing
Microsoft site for free web testing toolGUI Testing
FoxRunner from Manfred Ratzmann Automating Internet Explorer from VFP VFP 7 AATest.APP
Coverage Testing VFP Coverage Profiler
![Page 13: Unit Testing in VFP - Ted Roche · 2012. 12. 17. · Unit Testing Before developing a new method, define a test that describes: What the method does How it handles errors What it](https://reader035.vdocuments.us/reader035/viewer/2022070109/60457df10af34c025221b78f/html5/thumbnails/13.jpg)
Where to learn morehttp://www.xprogramming.comhttp://fox.wikis.com/wc.dll?Wiki~CategoryTesting
FoxRunner: (in German)
http://www.cal.de/autofox.htm http://www.hallogram.com/foxrunner/