0
An open source library for better Unit Testing         Woody Zuill & Lynn Langit                                          ...
Llewellyn                              Dan            Who wrote ApprovalTests?
Unit Tests             Unit Tests        Integration           Tests       Function Tests       Performance           Test...
DEMOGETTING STARTED
Building your Testing ToolkitTest RunnerTest CodeLibrariesManual testsAutomated tests & tools
TDD - Red, Green, Refactor
Approval Tests make it EASY…For Woody…                      For Lynn…• … for human evaluation of     • … in multiple langu...
DEMOEXPRESSIVENESS
Approving the Reported Result•   Contents are serialized to a file as binary (to compare)•   Rename *.received to *.approv...
More  aboutreporters…
A Little About Reporters• Reporters provide a rich, expressive, human-friendly view of  a failed test.• Reporters usually ...
Best test output has…?
Best test output has...?Granularity• What is the result of a break• What is the specific cause of a breakFeedback• Frequen...
DEMOARRAYS
Approval Tests in Java…
DEMOGUIS
Code must be Testable
Code must be TestableCode must include TestsCode should be written so that it is easy to writeits required tests“Reduce to...
Unit Test Frameworks are Multi-Purpose New Code      • Application code (components)               • FunctionalityTesting ...
Legacy CodeHow much of your code base is dead code?
Locking Tests (Characterization Tests)                Ensures                     Quickly  Test to                     Mos...
Legacy Code – Chart SmartDEMO
For More Information www.ApprovalTests.com Pick your language & download Pick your diff tool Reference, Approve & Enjoy Le...
@WoodyZuill         @LynnLangit              Q&A
Upcoming SlideShare
Loading in...5
×

Approval tests agile_aug_2012

133

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
133
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Approval tests agile_aug_2012"

  1. 1. An open source library for better Unit Testing Woody Zuill & Lynn Langit Agile 2012 – August 2012
  2. 2. Llewellyn Dan Who wrote ApprovalTests?
  3. 3. Unit Tests Unit Tests Integration Tests Function Tests Performance Tests Acceptance Tests Installation Tests Approval Tests and Test Types
  4. 4. DEMOGETTING STARTED
  5. 5. Building your Testing ToolkitTest RunnerTest CodeLibrariesManual testsAutomated tests & tools
  6. 6. TDD - Red, Green, Refactor
  7. 7. Approval Tests make it EASY…For Woody… For Lynn…• … for human evaluation of • … in multiple languages test results • … with visual results…• … to set up Tests• … to modify test output for readability Golden Master• … to maintain tests
  8. 8. DEMOEXPRESSIVENESS
  9. 9. Approving the Reported Result• Contents are serialized to a file as binary (to compare)• Rename *.received to *.approved• Right click ‘Use whole file’• Copy ‘Move’ statement from Test Results to command window.
  10. 10. More aboutreporters…
  11. 11. A Little About Reporters• Reporters provide a rich, expressive, human-friendly view of a failed test.• Reporters usually hook into DiffTools (Text, Image, Sound…)• Support for many diff tools included in Reporters• Can add hooks to your favorite diff tool
  12. 12. Best test output has…?
  13. 13. Best test output has...?Granularity• What is the result of a break• What is the specific cause of a breakFeedback• Frequent (or even constant) feedbackSpecification• What is this code supposed to do?• How do we use it?Regression-Proofing• Did what I just do break something?Automatic Design Process• TDD can be thought of as Test Driven Design
  14. 14. DEMOARRAYS
  15. 15. Approval Tests in Java…
  16. 16. DEMOGUIS
  17. 17. Code must be Testable
  18. 18. Code must be TestableCode must include TestsCode should be written so that it is easy to writeits required tests“Reduce to Functional”Code Tests must be kept runnable
  19. 19. Unit Test Frameworks are Multi-Purpose New Code • Application code (components) • FunctionalityTesting APIs • Edge cases • Locking testsLegacy Code • Characterization testsLearning new • Scope APIs • Functionality
  20. 20. Legacy CodeHow much of your code base is dead code?
  21. 21. Locking Tests (Characterization Tests) Ensures Quickly Test to Most often system still results in enable used with works the high testrefactoring Legacy Code same coverage
  22. 22. Legacy Code – Chart SmartDEMO
  23. 23. For More Information www.ApprovalTests.com Pick your language & download Pick your diff tool Reference, Approve & Enjoy Learn more – videos (.NET) Podcast - HerdingCode
  24. 24. @WoodyZuill @LynnLangit Q&A
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×