Tes$ng, tes$ng, tes$ng, and Qualityrtholmes/teaching/2015t1/... · Tes$ng, tes$ng, tes$ng, and Quality Andrew Eisenberg Tasktop Technologies @werdnagreb andrew.eisenberg@gmail.com
Post on 12-Jan-2020
23 Views
Preview:
Transcript
Tes$ng,tes$ng,tes$ng,andQuality
AndrewEisenbergTasktopTechnologies
@werdnagrebandrew.eisenberg@gmail.com
Automatedtestsofsomeformarereally,
really,REALLYimportant
Automatedtestsofsomeformarereally,
really,REALLYimportant
(andfun)
Aboutme
• RiceUniversity94-98• MorganStanley00-02• UBCGradSchool02-08• SpringSource/VMware/Pivotal08-13
• Tasktop13-nowMygradschooldays(itwasverystressful)
Whyshouldwetest?
Whyshouldwetest?
Quality
Makesurethethingwebuiltis
reallythethingwethoughtwebuilt.
Makesurethethingwethoughtwebuiltisreallytheshouldhave
built.
Makesurethethingweshouldhavebuiltisreallywhatpeoplewant.
•Didwebuilditright?•Didwebuildtherightthing?• Shouldthisthinghavebeenbuiltatall?
•Didwebuilditright?•Didwebuildtherightthing?• Shouldthisthinghavebeenbuiltatall?
UnitTests
•Didwebuilditright?•Didwebuildtherightthing?• Shouldthisthinghavebeenbuiltatall?
UnitTests
Integra$onTestsSystemTests
•Didwebuilditright?•Didwebuildtherightthing?• Shouldthisthinghavebeenbuiltatall?
UnitTests
Integra$onTestsSystemTests
???
Andabunchofotherreasons
Andabunchofotherreasons
• Confidencetochange
Andabunchofotherreasons
• Confidencetochange• Documenta$on– Capturedesigndecisions– Communicatetonewteammembers– Communicatetofutureyou
Howtotest?
Howtotest?
• Justtryitout
Howtotest?
• Justtryitout• Hiresomeoneelsetotryitout
Howtotest?
• Justtryitout• Hiresomeoneelsetotryitout• Writemorecodethatdoesthisautoma$cally
Howtotest?
• Justtryitout• Hiresomeoneelsetotryitout• Writemorecodethatdoesthisautoma$cally
Whataretheproblemswitheachofthese?
Whatkindsoftestsarethere?
• Unit• Integra$on• System
Whatkindsoftestsarethere?
Note:oversimplifica$on,andnotcorrect.
• Unit• Integra$on• System
Whatkindsoftestsarethere?
Note:oversimplifica$on,andnotcorrect.But:useful(androughlyTasktopstrategy)
• Unit• Integra$on• System
Whatkindsoftestsarethere?
Singlecomponents
Note:oversimplifica$on,andnotcorrect.But:useful(androughlyTasktopstrategy)
• Unit• Integra$on• System
Whatkindsoftestsarethere?
SinglecomponentsMul$-components
Note:oversimplifica$on,andnotcorrect.But:useful(androughlyTasktopstrategy)
• Unit• Integra$on• System
Whatkindsoftestsarethere?
SinglecomponentsMul$-componentsEverythingtogether
Note:oversimplifica$on,andnotcorrect.But:useful(androughlyTasktopstrategy)
• Unit• Integra$on• System
h_p://jamescrisp.org/2011/05/30/automated-tes$ng-and-the-test-pyramid/
InvertedTestPyramid
Whyisinvertedpyramidbad?
• Higherleveltestsarebri_le• Moreexpensivetowrite• Moreexpensivetomaintain• Hardtotrackatestfailuretoaloca$onincode
UnitTes$ng
• Singlecomponents– Class,module,file,etc
• Mock/stubdependencies• Codecoverageimportant– (butdon’trelyoncoveragealone)
• Mustbefast!• Runbeforecommieng• TestDrivenDevelopment???
JUnit(Java)
Jasmine(JavaScript)
Unittes$ngframeworksIusedaily
SHOWMESOME?*#!CODEALREADY
Integra$onTes$ng
• Mul$plecomponents– package,folder,project– interac$onsbetweencomponents
• Nomocking/stubbing• Speedlessimportant• (Usually)runbeforecommieng
JUnit(Java)
UItes$ngforabrowser
Integra$ontes$ngframeworksIusedaily
SHOWMESOME?*#!CODEALREADY
Systemtests/Func$onalVerifica$on
• En$resystem– mul$plescenarios
• Acomplexbeast– Therearenoframeworksforthis– Specifictoeachproduct
• Slow• Stabilityisanissue• Runsome$mes
SHOWMESOME?*#!CODEALREADY
Tes$ngis…
• …really,reallyimportant.• …hardtodoright.• …somethingthatrequireseffort.• …differentthingstodifferentpeople.• …aboutmorethanjustcorrectness.• …unit,integra$on,system.• …ajoyandacurse.
h_p://jamescrisp.org/2011/05/30/automated-tes$ng-and-the-test-pyramid/
Vote!
AndrewEisenberg@werdnagreb
top related