automation as a project - lessons learnt

38
Poznań Testing and Quality Group Automation as a project © 2010 Cognifide Limited. In commercial confidence only. © 2010 Cognifide Limited. In commercial confidence only. Automation as a project lessons learnt Zbyszek Moćkun

Upload: zbyszek-mockun

Post on 21-May-2015

439 views

Category:

Education


6 download

DESCRIPTION

Presentation from second Poznań Testing and Quality group. This presentation sum up my experience (about 5 years) with automation, as engineer or manager

TRANSCRIPT

Page 1: Automation as a project - lessons learnt

Poznań Testingand Quality Group

Automation as a project –

and Quality Group

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Automation as a project –lessons learnt

Zbyszek Moćkun

Page 2: Automation as a project - lessons learnt

Agenda

• Introduction• Introduction

• Business

• Technology review

• Management

• Summary

• Discussion

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 3: Automation as a project - lessons learnt

Few words about the author

Introduction

Few words about the author

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 4: Automation as a project - lessons learnt

Experience and domains

Experience Domains

• 7 years in tests

• Three different companies

• Several domains

• Product based and project

based

• Different methodologies

• Mobile infrastructure

• Billing and Roaming

systems

• Business Assurance

application

• Medical

• Content Management

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

• Different methodologies

(Waterfall, Scrum, Kanban)• Content Management

Systems

Page 5: Automation as a project - lessons learnt

Automation vs. profitability

Business

Automation vs. profitability

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 6: Automation as a project - lessons learnt

It’s all about the money

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

http://www.br-automation.com

Page 7: Automation as a project - lessons learnt

How to talk with stakeholders

• Time of money return• Time of money return

• Use statistics/metrics

• Remeber that statistics show incorrect data (only regression

issues should be calculated)

• It’s not about how many issues were found

• Statistics fall down without continuous investement

• Code resistance on the same tests

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

• Code resistance on the same tests

• Decrease release time (time for manual tests)

• Number of issues found influence on time needed for

regression

Page 8: Automation as a project - lessons learnt

How to start?

• Show metrics• Show metrics

• Why does we need it?

• How much does it cost?

• What does we want to achieve?

• What are the goals?

• Small steps

• First step should be cheap and quick

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

• First step should be cheap and quick

• Show results for stakeholder

• Plan and estimate next steps

• Gather metrics and statistics

Page 9: Automation as a project - lessons learnt

Approaches

Product-based

Project-based

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 10: Automation as a project - lessons learnt

Product against project

Product-based Project-based

• Scalability

• Modularity

• Coverage – as much as

possible

• Expensive - infinite number

of runs

• No need of scalability

• Only basic modularity

• Coverage – main features

• Cheap - finite number of runs

• Reuse for other projects (not

always possible)

• No place for planning new

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

• Reuse for other products

• Planing new features and

improvements

• No place for planning new

features and improvements

• Manual tests are cheaper at

the most cases

Page 11: Automation as a project - lessons learnt

Technology

Automation

Technology

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 12: Automation as a project - lessons learnt

One place for automation management

Continuous Integration

One place for automation management

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 13: Automation as a project - lessons learnt

Where should automated tests be run?

• On developer machine if possible, before commit

• As sanity check on other machines

Developer machine Nightly Iteration Staging Production

• As sanity check on other machines

• Developer iterative work (migration as example)

• Should we run autoamted tests on production (live)?

• Independent test data

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

machine

CI tool

Page 14: Automation as a project - lessons learnt

Reports

• Nightly tests – preferred frequency

• Build results management (disc space)• Build results management (disc space)

• Reports improvements

• Minimalize time spend on report (verification/debugging)

• Display as much data as possible for failures

• One issue failing several tess script

• Environment errors - stability

• Red reports effect

• Issues are not fixed

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

• Issues are not fixed

• A lof of failed tests cases

• Noone look at the results

Page 15: Automation as a project - lessons learnt

Reports

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 16: Automation as a project - lessons learnt

How to build good test suite?

Dependent or

independent?

How to build good test suite?

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 17: Automation as a project - lessons learnt

Independent and random

• All tests are independent

• Pre – precondition (set require state)

• Post – postcondition

• Test – test script

• Rec – recovery procedure after test failure (pre i post should have defined too)

• LogData – gather all logs after failure, very important for „random” failures

• Random order

• Repeat counter

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

• Dependent only for CI and adult teams (founded issues are

fixed as fast as possible)

Page 18: Automation as a project - lessons learnt

How to manage test data? Load them or

Test data

How to manage test data? Load them orcreate?

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 19: Automation as a project - lessons learnt

Does it work?

Record & Play

Does it work?

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 20: Automation as a project - lessons learnt

Selenium IDE as example

• Stability issues

• Recorded values are not meaningfull• Recorded values are not meaningfull

• Require rewrite

• User-extension.js (write own commands)

• Quick and easy debug

• Project-based – preferred as cheap and quick

• Product-based – as starting point

• More info link

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

• More info link

Page 21: Automation as a project - lessons learnt

Product against project

• Quick and easy (+)

Cost return (+)

HTML Java

• Cost return (+)

• Coverage – max 10%-20% (-)

• Modularity using user-

extension.js (=/-)

• No need to environment

setup (+)

• No scalability (-)

• Cnvert to other languages

• Flexibility (+)

• Scalability (+)

• Modularity (+)

• Coverage (+)

• Development knowledge (+/-)

• Environment setup (-)

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

• Cnvert to other languages

(+)

• HTML Suites (works with CI)

(+)

• Integrated reports

• No convert possibility (+/-)

• Debug time (-)

• Reporting (JUnit, TestNG) (-)

Page 22: Automation as a project - lessons learnt

Survey

Two similar application and different technologies based on

Selenium: Selenium:

• HTML based on Selenium IDE

• Java based on Selenium RC/Eclipse

HTML – 50% more test cases written

Java – 20% more time spend on maintenance/debugging

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Which technology would you like to use?

Java devs choose HTML/Selenium IDE as more friendly

and faster

Page 23: Automation as a project - lessons learnt

Management

Automation

Management

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 24: Automation as a project - lessons learnt

Manage, monitor and plan

Coverage

Manage, monitor and plan

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 25: Automation as a project - lessons learnt

20/80 rule

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 26: Automation as a project - lessons learnt

Coverage

Manage your coverage and use it for planning manual tests

• Remember about 20/80 rule

• Power function

• 100% - is it possible?

• Network architecture as example (100% achieved)

• Human factor caused that 100% is not achievable

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 27: Automation as a project - lessons learnt

• Red report effect

Defect management

• Red report effect• Quick fixes for CI• Labels

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 28: Automation as a project - lessons learnt

Who should write and maintenance

Automation responsibility

Who should write and maintenanceautomated tests?

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 29: Automation as a project - lessons learnt

Developer helping hand

Can developer deliver automated tests together with

functionality?functionality?

• Who should write test cases?

• Scripts written using invalid test cases

• Scripts written for not working functionality

• Lack of time – functionality is more important

• Control needed (sometimes devs forget)

• Two unsuccessful attempts

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

• Two unsuccessful attempts

Page 30: Automation as a project - lessons learnt

Triangle: Budget, Time, Scope (Aim)

Automation as a project

Triangle: Budget, Time, Scope (Aim)

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 31: Automation as a project - lessons learnt

There is no success without:

• Continuous work• Gather statistics for stakeholders• Gather statistics for stakeholders• Divide budget on manual and automated tests• Planning the future – where want to be in next year?• Control your costs• Remember – it’s all about the money

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 32: Automation as a project - lessons learnt

Automated Exploratory Tests for Regression

The future

Automated Exploratory Tests for Regression

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 33: Automation as a project - lessons learnt

Aspects

CICI

Client

User

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

AnalyticsLayout Functionality Performance

Page 34: Automation as a project - lessons learnt

Symptoms

Layout

Bug

Content

CodeLink checker

URL strategy

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

JS errors

Response (404)Analitycs

W3C

Page 35: Automation as a project - lessons learnt

Heuristic Oracle

The balance between comparison and comparison not at all

Layout Content Code Performance

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 36: Automation as a project - lessons learnt

Robots

• Scripts• Shared between projects• Shared between projects• Easy and quick to run

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

JS errors Responses(404) W3C Analytics Link checker Url strategy

Page 37: Automation as a project - lessons learnt

Q&A

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.

Page 38: Automation as a project - lessons learnt

Poznań Testing and Qaulity Group

Discussion & beer

Poznań Testing and Qaulity Group

© 2010 Cognifide Limited. In commercial confidence only.© 2010 Cognifide Limited. In commercial confidence only.