live testing a legacy app
TRANSCRIPT
![Page 1: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/1.jpg)
LIVE TESTING A LEGACY APP
![Page 2: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/2.jpg)
WHAT THIS TALK ISN'T!
> About TDD> Framework Specific
> For testing veterans
![Page 3: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/3.jpg)
WHAT THIS TALK IS!
> An introduction to testing jargon> A collection of techniques for starting to test your
app> Introduction to Selenium and TestBox
> Asking tough questions as well as giving answers
![Page 4: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/4.jpg)
OTHER SESSIONS RIGHT NOW
> Lucee Panel Discussion — Room 235> Writing Highly Organized CSS — Room 238
> Ouch, It Hurst When Do That. A Tale Of Landmines And Self-Inflicted Wounds — Room 321
> Getting Started With Build Tools — Auditorium
![Page 5: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/5.jpg)
WHO AM I?ERIC PETERSON
! Utah
" O.C. Tanner
# 1 wife, 1 kid
![Page 6: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/6.jpg)
WHAT KIND OF THINGS MAKE AN APP A LEGACY APP?> No framework
> Few or no tests> Old or incorrect design decisions
> New or changed business requirements
![Page 7: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/7.jpg)
NO TESTS CONTRIBUTE TO A LEGACY APP?
ABSOLUTELY!
![Page 8: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/8.jpg)
WHY?THEY MAKE US SLOWER
![Page 9: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/9.jpg)
HERE'S THE DEALEVERYBODY TESTS
MODERN CODE WORKS TO AUTOMATE IT
![Page 10: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/10.jpg)
TYPES OF TESTING
> Unit Tests> Integrated Tests> Functional Tests> Application Tests> End-to-end Tests
![Page 11: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/11.jpg)
TYPES OF TESTING (CONTINUED...)
> Regression Tests> Acceptance Tests
> Performance Tests> Accessibility Tests> Compatibility Tests
![Page 12: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/12.jpg)
STOP!!!!
![Page 13: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/13.jpg)
MY LEGACY APP TESTING PHILOSOPHY*(* SUBJECT TO CONSTANT CHANGE !)
> Don't stress about the kinds of tests you are writing. Slow tests are better than no tests
> Utilize Continuous Integration to offset this> Split your tests up and create multiple runners to help
as well.
![Page 14: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/14.jpg)
MY TESTING PHILOSOPHYTEST WHAT MAKES SENSE (AND WHAT SAVES YOU
MONEY)SOME EXAMPLES:
> It broke before> We test it manually every time
> The logic is kind of hard to follow (for the next time
![Page 15: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/15.jpg)
MY TESTING PHILOSOPHYTDD
> Helps you design the class one piece at a time (not focused on in this talk)
> Pair programming (one writes the test, the other writes the code to make the test pass)
![Page 16: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/16.jpg)
BEST TYPES OF TESTS FOR A LEGACY APP?
Integration Testing
&
Regression Testing
![Page 17: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/17.jpg)
BEST TOOLS TO TEST A LEGACY APP?
> Selenium> TestBox> Travis
![Page 18: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/18.jpg)
TESTING GOTCHAS(FOR LEGACY APPS)
> Be careful of mocks> Don't test too many details
![Page 19: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/19.jpg)
DEMOTHE LEGACY APP
![Page 20: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/20.jpg)
DEMOINTEGRATED TEST
(SELENIUM)
![Page 21: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/21.jpg)
DEMOUNIT TEST
![Page 22: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/22.jpg)
DEMOREFACTORING
![Page 24: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/24.jpg)
![Page 25: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/25.jpg)
LAST NOTECONTINUOUS INTEGRATION
> Emails> Github Badges
> Slack Integration
![Page 26: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/26.jpg)
LAST NOTECONTINUOUS INTEGRATION
USE WITH MULTIPLE TESTBOX RUNNERS.
![Page 27: Live Testing A Legacy App](https://reader034.vdocuments.mx/reader034/viewer/2022042722/589c419e1a28abec478b6d23/html5/thumbnails/27.jpg)
THANK YOU!!
elpete
@_elpete
! dev.elpete.com