tes$ng, tes$ng, tes$ng, and qualityrtholmes/teaching/2015t1/... · tes$ng, tes$ng, tes$ng, and...

43
Tes$ng, tes$ng, tes$ng, and Quality Andrew Eisenberg Tasktop Technologies @werdnagreb [email protected]

Upload: others

Post on 12-Jan-2020

36 views

Category:

Documents


0 download

TRANSCRIPT

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

Tes$ng,tes$ng,tes$ng,andQuality

AndrewEisenbergTasktopTechnologies

@[email protected]

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

Automatedtestsofsomeformarereally,

really,REALLYimportant

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

Automatedtestsofsomeformarereally,

really,REALLYimportant

(andfun)

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

Aboutme

• RiceUniversity94-98• MorganStanley00-02• UBCGradSchool02-08• SpringSource/VMware/Pivotal08-13

• Tasktop13-nowMygradschooldays(itwasverystressful)

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

Whyshouldwetest?

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

Whyshouldwetest?

Quality

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

Makesurethethingwebuiltis

reallythethingwethoughtwebuilt.

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

Makesurethethingwethoughtwebuiltisreallytheshouldhave

built.

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

Makesurethethingweshouldhavebuiltisreallywhatpeoplewant.

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

•Didwebuilditright?•Didwebuildtherightthing?• Shouldthisthinghavebeenbuiltatall?

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

•Didwebuilditright?•Didwebuildtherightthing?• Shouldthisthinghavebeenbuiltatall?

UnitTests

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

•Didwebuilditright?•Didwebuildtherightthing?• Shouldthisthinghavebeenbuiltatall?

UnitTests

Integra$onTestsSystemTests

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

•Didwebuilditright?•Didwebuildtherightthing?• Shouldthisthinghavebeenbuiltatall?

UnitTests

Integra$onTestsSystemTests

???

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

Andabunchofotherreasons

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

Andabunchofotherreasons

• Confidencetochange

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

Andabunchofotherreasons

• Confidencetochange• Documenta$on– Capturedesigndecisions– Communicatetonewteammembers– Communicatetofutureyou

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

Howtotest?

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

Howtotest?

• Justtryitout

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

Howtotest?

• Justtryitout• Hiresomeoneelsetotryitout

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

Howtotest?

• Justtryitout• Hiresomeoneelsetotryitout• Writemorecodethatdoesthisautoma$cally

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

Howtotest?

• Justtryitout• Hiresomeoneelsetotryitout• Writemorecodethatdoesthisautoma$cally

Whataretheproblemswitheachofthese?

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

Whatkindsoftestsarethere?

• Unit• Integra$on• System

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

Whatkindsoftestsarethere?

Note:oversimplifica$on,andnotcorrect.

• Unit• Integra$on• System

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

Whatkindsoftestsarethere?

Note:oversimplifica$on,andnotcorrect.But:useful(androughlyTasktopstrategy)

• Unit• Integra$on• System

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

Whatkindsoftestsarethere?

Singlecomponents

Note:oversimplifica$on,andnotcorrect.But:useful(androughlyTasktopstrategy)

• Unit• Integra$on• System

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

Whatkindsoftestsarethere?

SinglecomponentsMul$-components

Note:oversimplifica$on,andnotcorrect.But:useful(androughlyTasktopstrategy)

• Unit• Integra$on• System

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

Whatkindsoftestsarethere?

SinglecomponentsMul$-componentsEverythingtogether

Note:oversimplifica$on,andnotcorrect.But:useful(androughlyTasktopstrategy)

• Unit• Integra$on• System

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

h_p://jamescrisp.org/2011/05/30/automated-tes$ng-and-the-test-pyramid/

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

InvertedTestPyramid

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

Whyisinvertedpyramidbad?

• Higherleveltestsarebri_le• Moreexpensivetowrite• Moreexpensivetomaintain• Hardtotrackatestfailuretoaloca$onincode

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

UnitTes$ng

• Singlecomponents– Class,module,file,etc

• Mock/stubdependencies• Codecoverageimportant– (butdon’trelyoncoveragealone)

• Mustbefast!• Runbeforecommieng• TestDrivenDevelopment???

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

JUnit(Java)

Jasmine(JavaScript)

Unittes$ngframeworksIusedaily

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

SHOWMESOME?*#!CODEALREADY

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

Integra$onTes$ng

• Mul$plecomponents– package,folder,project– interac$onsbetweencomponents

• Nomocking/stubbing• Speedlessimportant• (Usually)runbeforecommieng

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

JUnit(Java)

UItes$ngforabrowser

Integra$ontes$ngframeworksIusedaily

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

SHOWMESOME?*#!CODEALREADY

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

Systemtests/Func$onalVerifica$on

• En$resystem– mul$plescenarios

• Acomplexbeast– Therearenoframeworksforthis– Specifictoeachproduct

• Slow• Stabilityisanissue• Runsome$mes

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

SHOWMESOME?*#!CODEALREADY

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

Tes$ngis…

• …really,reallyimportant.• …hardtodoright.• …somethingthatrequireseffort.• …differentthingstodifferentpeople.• …aboutmorethanjustcorrectness.• …unit,integra$on,system.• …ajoyandacurse.

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

h_p://jamescrisp.org/2011/05/30/automated-tes$ng-and-the-test-pyramid/

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

Vote!

Page 42: 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
Page 43: 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

AndrewEisenberg@werdnagreb