35
QA Strategies for Testing Legacy Web Apps Paul Miles Software Development Manager

QA Strategies for Testing Legacy Web Apps

Embed Size (px)

Citation preview

Page 1: QA Strategies for Testing Legacy Web Apps

QA Strategies for Testing Legacy Web

Apps

Paul MilesSoftware Development Manager

Page 2: QA Strategies for Testing Legacy Web Apps

An Introduction to NPR

Page 3: QA Strategies for Testing Legacy Web Apps

An Introduction to NPR… more than Radio

Page 4: QA Strategies for Testing Legacy Web Apps

What Apps?

Page 5: QA Strategies for Testing Legacy Web Apps

What Apps?

Page 6: QA Strategies for Testing Legacy Web Apps

What Apps?

Page 7: QA Strategies for Testing Legacy Web Apps

What Apps?

Page 8: QA Strategies for Testing Legacy Web Apps

What Apps?

Page 9: QA Strategies for Testing Legacy Web Apps

Legacy App, Defined

Page 10: QA Strategies for Testing Legacy Web Apps

A Legacy App is an important app in production that has little to no automated tests.

Page 11: QA Strategies for Testing Legacy Web Apps

Let’s Add Some Tests...

Page 12: QA Strategies for Testing Legacy Web Apps

Let’s Add Some Tests...

● Many Tests● Fast to Execute● Run Every Build

Page 13: QA Strategies for Testing Legacy Web Apps

Let’s Add Some Tests...

● Integration Level● Harder to Build

Page 14: QA Strategies for Testing Legacy Web Apps

Let’s Add Some Tests...

● Most Comprehensive Quality View● Slowest to Execute● Tend to be Brittle

Page 15: QA Strategies for Testing Legacy Web Apps

Where to Start?

Page 16: QA Strategies for Testing Legacy Web Apps

Where to Start?

Page 17: QA Strategies for Testing Legacy Web Apps

● Identify the Most Important Tests○ Key workflows only○ Goal is not to cover all features○ Don’t let perfect be the enemy of good

● Choose Your Tools○ Consider the real cost of in-house test automation frameworks

■ High Test Maintenance & Infrastructure Costs○ Online tools are changing the game

■ Permits developers to Focus on Lower Level Tests

Tests at the Top

Page 18: QA Strategies for Testing Legacy Web Apps

Start at the Top of the Pyramid

Page 19: QA Strategies for Testing Legacy Web Apps

● Phase 0○ Put failing and brittle tests tests in a corner (if you have any)

Unit Tests

Page 20: QA Strategies for Testing Legacy Web Apps

● Phase 0○ Put failing and brittle tests tests in a corner (if you have any)

● Phase 1○ Run unit tests with every build○ Make the results easy to see

Unit Tests

Page 21: QA Strategies for Testing Legacy Web Apps

● Phase 0○ Put failing and brittle tests tests in a corner (if you have any)

● Phase 1○ Run unit tests with every build○ Make the results easy to see

● Phase 2○ Require all tests to pass as a part of the QA process

Unit Tests

Page 22: QA Strategies for Testing Legacy Web Apps

● Phase 0○ Put failing and brittle tests tests in a corner (if you have any)

● Phase 1○ Run unit tests with every build○ Make the results easy to see

● Phase 2○ Require all tests to pass as a part of the QA process

● Then...○ Add additional tests○ Consider fixing the brittle ones○ Do more advanced build and test practices

Unit Tests

Page 23: QA Strategies for Testing Legacy Web Apps

Build process around your passing unit tests first, then add

Page 24: QA Strategies for Testing Legacy Web Apps

● Phase 0○ Designate the master environment you are running tests against○ Put failing and brittle tests tests in a corner (if you have any)

Service Tests

Page 25: QA Strategies for Testing Legacy Web Apps

● Phase 0○ Designate the master environment you are running tests against○ Put failing and brittle tests tests in a corner (if you have any)

● Phase 1○ Require all tests to pass as a part of the QA process

Service Tests

Page 26: QA Strategies for Testing Legacy Web Apps

● Phase 0○ Designate the master environment you are running tests against○ Put failing and brittle tests tests in a corner (if you have any)

● Phase 1○ Require all tests to pass as a part of the QA process

● Phase 2○ Run tests as a part of the build / deployment process if possible○ May require additional automation of those items

Service Tests

Page 27: QA Strategies for Testing Legacy Web Apps

● Phase 0○ Designate the master environment you are running tests against○ Put failing and brittle tests tests in a corner (if you have any)

● Phase 1○ Require all tests to pass as a part of the QA process

● Phase 2○ Run tests as a part of the build / deployment process if possible○ May require additional automation of those items

● Then...○ Add additional tests○ Consider fixing the brittle ones

Service Tests

Page 28: QA Strategies for Testing Legacy Web Apps

Service Tests

● “Convert” tests to unit-type tests if possible○ Utilize data manipulation scripts, mocks, fakes, etc.

● Make tests able to be run on all environments○ Pre-requisite to incorporate them in the build process○ May need to address differences in the environments○ May need to bolster other processes (automation, data import, etc)

● Make them repeatable○ Bolster setup / teardown

● Incorporate tests in the automated build loop○ Don’t make the build too long, though

Page 29: QA Strategies for Testing Legacy Web Apps

Learn from your unit tests & build from there

Page 30: QA Strategies for Testing Legacy Web Apps

There’s More to It

Page 31: QA Strategies for Testing Legacy Web Apps

Static Quality Analysis

● Often overlooked, but very effective in improving code quality● Tools

○ Your IDE○ Integrate with your Build Server: SonarQube, FindBugs, CheckStyle○ Integrate with GitHub / BitBucket: CodeClimate

● Adoption Tips○ Get shared settings for IDE’s in place○ Tune the settings○ Focus on new code only○ Apply “periodic paydown” on issues○ Address issues before incorporating into the build process

Page 32: QA Strategies for Testing Legacy Web Apps

● Run tests (of all kinds) as soon as possible after a commit○ 10 minute “magic mark”○ Slow tests may not fail the build, but they still indicate a quality problem if they fail

● Add in coverage measuring tools● Feature branches / feature toggles

○ Run tests on a designated environment○ Require tests to pass before merge○ Complete code reviews flagged by other tools (and incorporate changes before merge)○ Add tests as code is written

● Separate releases from coding “sprints”

Incorporating Testing in Build Pipelines

Page 33: QA Strategies for Testing Legacy Web Apps

Testing Infrastructure

● Requires substantial investment○ Environments○ Build servers / tooling○ Test beds / devices

● Automate everything● Designate an expert, but get the team to buy in and share responsibility

Page 34: QA Strategies for Testing Legacy Web Apps

Iterate, and don’t underestimate the time it will take