building test automations the agile way

38
Bringing Agility in Test Automations Hemant Kumar Jaggi Senior Manager, MakeMyTrip.com

Upload: makemytripcom

Post on 10-May-2015

931 views

Category:

Technology


0 download

DESCRIPTION

An alternate approach towards building Test Automations for the Agile development environments. Traditional Test Automation approach isn't a great fit in fast pace dynamic ecosystem, hence there exists a dire need for an alternate approach. This is very well suited to an e-commerce platform, and can be easily extended to similar environments.

TRANSCRIPT

Page 1: Building Test Automations the agile way

Bringing Agility in Test Automations

Hemant Kumar JaggiSenior Manager, MakeMyTrip.com

Page 2: Building Test Automations the agile way

LET’S BE

AGILE !

Heard this before?

Page 3: Building Test Automations the agile way
Page 4: Building Test Automations the agile way

Thoughts on test automations the “Agile” way

To keep up the pace with agile application development

Traditional Test Automation approach isn’t working

Best practices must be incorporated everywhere

Ideally suited to an Ecommerce (or similar) environment

Page 5: Building Test Automations the agile way

An Ecommerce looks like

Page 6: Building Test Automations the agile way

Only thing that doesn’t change is “change”

Page 7: Building Test Automations the agile way

Building Test Automations the “Agile” way

Page 8: Building Test Automations the agile way

WHY?

Page 9: Building Test Automations the agile way

BECAUSE TRADITIONAL

AUTOMATION APPROACH JUST DIDN’T

WORK FOR US

Page 10: Building Test Automations the agile way

WHY? Challenges we face @ MakeMyTrip

Fast PaceReleases in a week?Monthly unique visitors?Monthly page views?

High Maintenance Cost & Test cases not always in “shape”

Page 11: Building Test Automations the agile way

Challenges (contd.)

Complex Business RulesHotel promotion combinations?Cheapest Flights search?

Multiple GDS connections

Hotel Search engine?~10,500 Domestic Hotels~250,000 hotels across world

It’s impossible to reverse-engineer!

Page 12: Building Test Automations the agile way

Challenges (contd.)

Execution issues:Automation execution may take 2-3

days to completeGolden data set takes ~7 days to

buildAutomation teams don’t know

domainFinally .. W

e don’t

trust

Autom

ation c

ode

Page 13: Building Test Automations the agile way

Life of a QA Engineer is like

Page 14: Building Test Automations the agile way

WHAT?

Page 15: Building Test Automations the agile way

WHAT it should be?

Faster time to develop Automation

LOW maintenance costAgnostic to business logic“QA team” friendlyLesser complexityFaster execution time

“It just works ! ”

Page 16: Building Test Automations the agile way

HOW?

Page 17: Building Test Automations the agile way
Page 18: Building Test Automations the agile way

HOW? In lines with Agile Manifesto..

Break into smaller storiesPrioritize them basis

Functional ImportanceFrequency of executionsDependencies

Work “with” QA teamDevelop a story and deliver

Page 19: Building Test Automations the agile way

Create Buckets

Sanity testsEnd to end user flowsRegression tests*

Miscellaneous flows

Page 20: Building Test Automations the agile way

Sanity Test

Breadth wise test coverage.MATS – Minimal Acceptance Test

SuiteRelease checklistDetermines whether build is

stable.

Page 21: Building Test Automations the agile way

User Flows

Covers end to end user flowsDetailed breadth wise coverageE.g. different combinations of

booking flows.

Page 22: Building Test Automations the agile way

But how to simplify regression tests?

Break them further ..

Into smaller flows, e.g. page wise test suites

Comparative TestingInteractive Testing

Page 23: Building Test Automations the agile way

Comparative Testing

Page 24: Building Test Automations the agile way

Comparative Testing

Works on two builds:“QA” build (i.e. build under test)“Production” build

Deploy them in same environment.

Read all ‘to-be-tested’ values from front end

Page 25: Building Test Automations the agile way

Comparative Testing

Execute automation script on both builds

Dump them into XML (or excel)Excel template has formulae to

compare values from two buildsOr use an XML comparator (in

case of XML output format)

Page 26: Building Test Automations the agile way

Comparative Testing

IF (Actual == Expected) THEN PASS

ELSE FAIL* Actual Value = value(QA build)* Expected Value = value(live build)

Take XML(or excel) as input to reporting framework, generate HTML reports

Page 27: Building Test Automations the agile way

Let’s discuss

Pros & Cons of

Comparative Testing

Page 28: Building Test Automations the agile way

Advantages of Comparative Testing

Faster turn around to developAutomation script does just what it is

supposed to doAutomation becomes a “dumb”

executionVery LOW maintenance costKeep it simple

Page 29: Building Test Automations the agile way

Advantages of Comparative Testing

Agnostic to business layersChanges in business rules don’t

matter

High level of accuracyMakes it “thorough”Enhances confidence in QA team

Page 30: Building Test Automations the agile way

Advantages of Comparative Testing

Overall progress is fasterMore dependency on Test Scenarios

than Test CasesLess/No domain knowledge required

for Automation team“Win-Win” for Automation and QA

team

Page 31: Building Test Automations the agile way

Disadvantages of Comparative Testing

Any “live” issues won’t be caught

Execution requiresEither double the time (if sequential)Or double the resources (if parallel)

Page 32: Building Test Automations the agile way

Interactive Testing

Page 33: Building Test Automations the agile way

Interactive Testing

Complements comparative testing

Features that require user interaction

E.g. Filters, Sorting etc.

Comparative + Interactive equals “Regression”

Page 34: Building Test Automations the agile way

Automation Coverage Tracking

Assign weights to each bucket, say

Automation Score = sum([(Tn/An)*100]*[Wn/(W1+W2+W3+W4+W5)]

Tn=Total Automated TC’s for a bucketAn=Total Automation feasible TC’s for a bucketWn=Weighted score of a bucket

Page 35: Building Test Automations the agile way

Automation Coverage Tracking (Sample)

Page 36: Building Test Automations the agile way

Computing efficiency gains (Sample)

Page 37: Building Test Automations the agile way

Take Away

The “Agile” way of building Test Automations

We resolved “challenges” of traditional automation approach

Simplifying regressionRegression=Comparative + Interactive

Its working @ MakeMyTrip