Transcript
Page 1: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

1

Model-Based Testing to Help You Enhance Your Agile Testing Process!!

February 6th

Frederic [email protected]

Page 2: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

2

Agenda

Agility?QA?

MBT?

Page 3: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

3

Game 1

Customer

• Make groups of 4

• Write a specification

• Introduce yourself to your group

R&D

• Make groups of 6

• Introduce yourself to your group

• Do the job and deliver

Page 4: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

4

Game 2

• Customer and R&D are side by side

• Customer presents their business needs

• R&D gives a cost for each

• Customer pass first order

• Customer pass second order

Page 5: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

5

History

� In the 50s, NASA and IBM were doing iterative and incremental developments

�Search for methods adapted to software development (frequent business and technology changes)

�2001 Agile Manifesto

Page 6: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

6

Agile Manifesto: values!

� Individuals and interactions over processes and tools

�Working software over comprehensive documentation

�Customer collaboration over contract negotiation

�Responding to change over following a plan

Page 7: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

7

Most popular methods: Scrum

� Early 90s by Jeff Sutherland, Ken Schwaber and Mike Beedle

2- 4 weeks

Page 8: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

8

Most popular methods: XP

� Late 90s by Kent Beck, Ward Cunningham & Ron Jeffries

Page 9: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

9

Smartesting: an agile company!

Page 10: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

10

Pre-requisites for agile testing

�Communication

�Test Driven Development– Customer provides acceptance tests

– Developers write unit tests first

�Continuous integration– Building tool: ant, maven, etc.

– Build manager: Hudson, Cruisecontrol, etc.

Page 11: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

11

Unit testsComponent tests

Functional testsExamplesStory testsSimulationsPrototypes

Exploratory testingScenariosUsability testingUser Acceptance testingAlpha/Beta

Performance & load testingSecurity testing« ility » testing

Business-Facing

Technology-Facing

Supporting the team

Automated

Automated &Manual Manual

Tools

Lisa Crispin & Janet Gregory’s Quadrant

Critique product

Page 12: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

12

•JUnit tests

•Functional test with Fitnesse & QC/QTP

•Exploratory testing on Friday•Usability testing by PS•Alpha/Beta

•Performance

Business-Facing

Technology-Facing

Supporting the team

SmartestingC

ritique product

Page 13: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

13

Mike Cohn’s Test Pyramid

GUI tests

Acceptancetests

Unit/Component tests

Increasing trust

Behaving like expected

Page 14: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

14

Challenges

�During one iteration :– Functional changes

– Technical changes

– Automating tests for the iteration

– Exploratory testing

– …

Page 15: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

15

Game 3

• Iteration 1, you have 4 types of bricks:

Draw 6 columns of 8 bricks each using at

least one type of each brick

• Iteration 2, there is a change

update your tests

Page 16: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

16

Model-Based Testing

�Generation of test cases with oracles from a behavioural model (e.g. state machine) of the system under test.

BEFORE NOW

Page 17: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

17

FOREX-SPOT

• FOREX-SPOT is a web application to buy/sell currencies and to know if we make money or not.• FOREX-SPOT is a web application to buy/sell currencies and to know if we make money or not.

Page 18: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

18

FOREX-SPOT

�Transaction:

�Actions (Depending of the transaction status and the user, actions are available of not):

Page 19: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

19

Transaction lifecycle

Page 20: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

20

Requirements covered by previous iterations

Id Description

APPLY\NEW_TRANSACTION Only the front office can do “Apply” on an OPEN transactionAPPLY\REPOENED_TRANSACTION

CANCEL\FO_USER The back office and front office can cancel a transactionCANCEL\BO_USER

COMMIT\CRLY_ERROR Only the front office can do “Commit”. Commit fails when:

• the portfolio does not own the currency sold

• CRLY try to sell/buy HKD

• SOGEPAR try to buy HKD with AUX

COMMIT\CRLY_SUCCESS

COMMIT\ERROR_CURRENCY

COMMIT\OTHER

COMMIT\SOGEPAR_ERROR

COMMIT\SOGEPAR_SUCCESS

… …

Page 21: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

21

�Business entities

Modeling for Testing

21

Page 22: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

22

�Expected behaviour

Modeling for Testing

22

Page 23: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

23

Iteration “STEP-IN”

� New user introduced: BOSS� New action: Approve

Page 24: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

24

TODO list

�Manage new requirements:

�Updating the model�Updating the application�Updating the “keywords”�Running the tests!

Id Description

APPROVE Only the boss can set the “Approve”status on a “BOSS review” transaction

CANCEL\BOSS_USER The boss can cancel a transaction

Page 25: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

25

DEMO

Page 26: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

26

How does MBT fit into Aglity?

� Individuals & interactions– Testers & developers are working together

�Working software– Increased test coverage, “executable” model

�Customer collaboration– Test models are unambiguous communication

tools

�Responding to change– Test models are easier to update than large

test suites

Page 27: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

27

Questions?

Page 28: Model-Based Testing to Help You Enhance Your Agile Testing Process

© SMARTESTING 2009 – This document is the property of Smartesting. It may not be reproduced in whole or in part

28

Fore more…


Recommended