acceptance testing in devops

27
Laurent PY CEO, Smartesting [email protected] @py_laurent www.smartesting.com Acceptance testing in DevOps

Upload: laurent-py

Post on 13-Jan-2015

770 views

Category:

Technology


3 download

DESCRIPTION

To support efficiently ATDD or BDD at the speed and scale required in Agile and DevOps projects, your acceptance criteria need to: - Be understandable by business experts, Product owners, developers (defining the business terminology) - Facilitates test authoring as well as maintenance (based on a semantic and not just text) - Can be transformed automatically into code for test execution

TRANSCRIPT

Page 1: Acceptance Testing in DevOps

Laurent PYCEO, Smartesting

[email protected] @py_laurent

www.smartesting.com

Acceptance testing in DevOps

Page 2: Acceptance Testing in DevOps

Our long and painful journeytowards DevOps

Page 3: Acceptance Testing in DevOps

Product: CertifyIt, eclipse plug-in in JAVA (Model-Based-Testing)

– Waterfall process

– 1 release every 6 months

– Few tests and no TDD

– 1 month (x5 people) to do release testing before deployment

– Poor quality impacting customers’ feedback and adoption

Overview of our development process 2004/06

3

Page 4: Acceptance Testing in DevOps

Product: CertifyIt, eclipse plug-in in JAVA (Model-Based-Testing)

– First XP and then Scrum process

– We do TDD

– Continuous integration (code & unit test)

– 1 customer release every 3 months (1 operation release every 3 weeks)

– 1 man/month to do release testing before deployment

– Good feedback from customers!

Tasting agility end of 2006

4

Page 5: Acceptance Testing in DevOps

Product: Zest, testing platform in the cloud

– Still Scrum process

– We do TDD and…

– …Acceptance Testing Driven Development (ATDD), 100% automated

– Acceptance tests are part of the CI process

– We do several deployments a day (≈10)

Now we are experiencing DevOps - 2012

5

Page 6: Acceptance Testing in DevOps

Shorter iterations (1 to 4 weeks) lead to massive test automation completed by exploratory testing

Acceptance tests become the specification

Testing starts earlier in the development process: Shift left!

What we’ve learnt

Req Manageme

nt & Definition

Test Planning

Execution

Defect manageme

nt

Page 7: Acceptance Testing in DevOps

What we’ve learnt

7

To achieve this level of speed (DevOps context), acceptance tests should be:

– Understandable to both developers and business experts to strengthen alignment and enable the ‘shift left’

– Maintainable to manage efficiently changes in requirements and keep pace with continuous deployment

– Automated to enable rapid execution and feed-back

ATDD with Business Domain Language and refactoring capabilities

Page 8: Acceptance Testing in DevOps

ATDD & Refactoring

My view as product owner & tester:

Acceptance tests need to be continually reviewed and refactored

just like code!!!

Page 9: Acceptance Testing in DevOps

ATDD & Refactoring

My view as product owner & tester:

Acceptance tests need to be continually reviewed and refactored

just like code!!!

Martin Fowler

Page 10: Acceptance Testing in DevOps

Acceptance testing driven development

Page 11: Acceptance Testing in DevOps

Shift left

PO developers testers Scrummaster

Scrum team

Acceptance testingAcceptance testingShift left

Product Backlog

Sprint Backlog Sprint 1 to 4 weeks

Product at the end of the iteration

Daily meeting

Page 12: Acceptance Testing in DevOps

Acceptance Testing Driven Development (ATDD)

Acceptance test is a powerful artifact to improve communication

Test as the definition of ‘STOP’

Written prior to development by tester

Based on a business DSL (domain specific Language)

Confirmed with stakeholders

Mostly automated

Test in natural language

Test fixture

Code

Page 13: Acceptance Testing in DevOps

Acceptance Testing Driven Development (ATDD)

Benefits:– Improve communication and collaboration between

project stakeholders

– Shared understanding of what a successful implementation means

– Better coverage of business expectations

– Faster feed back

Challenges:– New methodology that requires rigor and discipline

– Find the right balance between people/process/tool

Page 14: Acceptance Testing in DevOps

Continuous acceptance testing

Page 15: Acceptance Testing in DevOps

Key features:

– Define progressively your Action Words and your business domain language for test authoring

– Suggestion to promote the reuse of Action Word and avoid duplication

– Refactoring: when an Action Word is modified, impacts are performed automatically across the tests

– Optimization: inspection features enable to continuously optimize the acceptance tests

– Create scripts and accelerate test automation (Ruby, Java, XML…)

Integrations with:

Zest: create acceptance tests with DSL

15

Watir, Appium…

Page 16: Acceptance Testing in DevOps

Collaboration through acceptance tests & DSL

16

Product OwnerValidate acceptance tests

TesterCreate acceptanceTests

DeveloperAutomate acceptancetests

• DSL• Refactoring capabilities

Page 17: Acceptance Testing in DevOps

Define new business entities…

Define progressively your business terminology with Action Words. Enable collaboration based on acceptance tests.

Page 18: Acceptance Testing in DevOps

…or define business entities right from the tests

Promote test steps into Action Words (what developers call extract function). This is refactoring!

Page 19: Acceptance Testing in DevOps

Evils of duplication

Page 20: Acceptance Testing in DevOps

A fundamental principle

Page 21: Acceptance Testing in DevOps

Reuse, reuse and reuse Action Words!

Create and maintain consistent scenarios for your project

Suggestions

Page 22: Acceptance Testing in DevOps

Analyse and optimize continuously your tests

When duplications are identified, refactoring options are suggested!

Page 23: Acceptance Testing in DevOps

Add, remove, modify Action Words and Scenarios

Test refactoring enables to perform automatically impact analysis and test maintenance tasks

Add parameters to Action Word

Propagate automatically tothe scenarios

Page 24: Acceptance Testing in DevOps

Generate scripts

Use of Action Words significantly decrease the cost of automation and accelerate the overall testing cycle

Page 25: Acceptance Testing in DevOps

So your acceptance tests are…

UnderstandableDefinition of business domain tests enable better alignment of the team

MaintainableRefactoring and optimization

features dramatically accelerate maintenance

Can be automatedGood design based on Action Words streamlines the test

automation phase

• DSL• Refactoring capabilities

Page 26: Acceptance Testing in DevOps

And remember

Acceptance tests need to be continually reviewed and

refactored just like code!!!

Page 27: Acceptance Testing in DevOps

Give a tryZest-testing.com

Laurent PYCEO, Smartesting

[email protected] @py_laurent

www.smartesting.com