Top Banner
Approval Tests A picture’s worth a1000 tests
16

Approval Tests @ MiniIAD

Aug 28, 2014

Download

Software

baglinim

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
  • Approval Tests A pictures worth a1000 tests
  • Test Structure public void ScenarioUnderTest() { // Arrange // Act // Assert }
  • The Classic Way public void ScenarioUnderTest() { var foo = new Foo(); var actual = foo.Do(); Assert.Equal("expected", actual); }
  • The Approvals Way public void ScenarioUnderTest() { var foo = new Foo(); var actual = foo.Do(); Assert.Equal("", actual); }
  • Approval Tests Libraries public void ScenarioUnderTest() { var foo = new Foo(); var actual = foo.Do(); Approvals.Verify(actual); }
  • Approval Tests Libraries Available for many languages: Java, C#, PHP, NodeJS, Python or Ruby. Support most (may be all) test frameworks/runners: JUnit, NUnit, xUnit, rSpec, etc. Many useful reporters: Diff reporters: Generic, AraxisMerge, P4Merge, KDiff, VisualStudioDiff, TortoiseDiff, WinMerge. CI: CruiseControl, TeamCity, Quiet. Misc: FileLauncher, Image, Clipboard. Environment/Platform specific approvals: Web, Desktop, Reports.
  • Unleash the power Fight with Legacy Code
  • Golden Master
  • Random Thoughts Plus Tips & Tricks
  • Commit Approval Files
  • Intermediate Steps
  • Both High & Low Level Tests
  • Code Quality Feedback
  • Approval Tests Library Author: Llewellyn Falco Twitter: @LlewellynFalco / #ApprovalTests Doc: http://approvaltests.sourceforge.net/ Repository: https://github.com/approvals Resources
  • Matteo Baglini Freelance Software Developer & Tecnical Coach Coders TUG & DotNetToscana Co- Founder @matteobaglini [email protected]
  • Thanks!