unit testing in vfp - ted roche · 2012. 12. 17. · unit testing before developing a new method,...

14
Unit Testing in VFP Ted Roche Ted Roche & Associates, LLC http://www.tedroche.com

Upload: others

Post on 12-Oct-2020

1 views

Category:

Documents


0 download

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

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

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

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

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

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

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

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

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

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

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

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

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

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/

Page 14: 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

Thank you!

Ted Roche

Ted Roche & Associates, LLC

http://www.tedroche.com