test cases - are they dead?

34
Are test cases dead? The second life with lean test cases Alexei Vinogradov Vojtech Barta

Upload: sqalab

Post on 16-Apr-2017

392 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Test Cases - are they dead?

Are test cases dead?

The second life with lean test cases

Alexei VinogradovVojtech Barta

Page 2: Test Cases - are they dead?

Alexei VinogradovIT-Consultant

testing, test management, test automation, coaching

email: [email protected]: alexejvtwitter: @i_vinoblog: http://qa-blog.alexei-vinogradov.de

https://www.softwerkskammer.org/groups/testing

Page 3: Test Cases - are they dead?

http://radio-qa.com

Page 4: Test Cases - are they dead?
Page 5: Test Cases - are they dead?

Vojtěch Barta

QA, Trainer, Agile guy, photographer

email: [email protected]: bartavoj.cz

Page 6: Test Cases - are they dead?
Page 7: Test Cases - are they dead?

What is a Test Case?• Test Cases are for testers to execute functional testing in the

most efficient way providing following information if relevant

• Pre-condition

• Description

• Steps

• Post-condition

• Test Data

• …. Anything else you need...

• All of these are optional, specially Steps

Page 8: Test Cases - are they dead?

Positive motivation• Functional testing requires structure

• Plan

• Execute

• Track the progress

• Report results

• Repeat

Page 9: Test Cases - are they dead?

Wrong motivation

• Lack of knowledge

• Bad Requirements

• Trust Issues

Page 10: Test Cases - are they dead?

Do we need them?

Page 11: Test Cases - are they dead?

Overview• Proposition of Lean Test Cases (LTC)

• What is different on LTC from TC

• Examples of LTC

• Comparison to Checklists & Explorative

• LTC and Agile

• LTC and large scale projects

Page 12: Test Cases - are they dead?

Lean Test Cases

Lean test cases (LTC) are the written test ideas that can be executed by a tester who knows and understands the System Under Test (SUT)

Not yet

Page 13: Test Cases - are they dead?

Lean Test Caseslike classic Test Cases, but without

• (formal) preconditions

• steps

• (formal) postconditions

• (very often) input values

Page 14: Test Cases - are they dead?

Classic Test CasesExample: (Calculator App) - simple addition• Preconditions: the app is started, no operation is active,

display is showing 0.

• Steps:1. press „2“. Expected: 2 is displayed2. press „+“. Expected: 2 is displayed3. press „5“, Expected: 5 is displayed4. press „=„, Expected: 7 is displayed

• Postcondition: „7“ is still displayed and will be used for the next operation.

Page 15: Test Cases - are they dead?

Lean Test CasesExamples: (Calculator App)

• It must be possible to add 2 numbers

• It must be possible to multiply 2 numbers

Page 16: Test Cases - are they dead?

Lean Test CasesExamples: (Calculator App)

• It must be possible to add the number to displayed value from previous operation

(with informal precondition)

Page 17: Test Cases - are they dead?

Lean Test CasesExamples: (Calculator App)

• After pressing „M+“ the result of „memory“-cell is added to the number showing. The result is not displayed, but stays as a new value of „memory“-cell

(with informal postcondition)

Page 18: Test Cases - are they dead?

Lean Test CasesExamples: (Traffic Lights App)

• 2 lights at the crossing switch from Red <-> Green:

1. Light 1: Red Light 2: Green2. Light 1: Red Light 2: Yellow3. Light 1: Red Light 2: Red4. Light 1: Red+Yellow Light 2: Red5. Light 1: Green Light 2: Red

(with test data)

Page 19: Test Cases - are they dead?

LTC vs Classic Test CasesSimilar to test cases:

• manage in TestCase Management Tools

• add meta-data (creation date, links to reqs, creator, priority, functional sets etc.)

• test coverage

• regression testing

Page 20: Test Cases - are they dead?

LTC vs ChecklistsFormat of any given lean test case is similar to the format of one checklist entry, but:

• LTC not a list, but „database“ of tests

• LTC share similarities with classic TC, Checklists - not

Page 21: Test Cases - are they dead?

LTC vs ExplorativeSimilarity:

• input test data „generated“ during execution

Difference:

• LTC - test design before execution, Explorative - during

Page 22: Test Cases - are they dead?

LTC in Agile• create after user story is defined

• acceptance criterias + more

• share with developers and PO ASAP

• get feedback from developers and PO

Page 23: Test Cases - are they dead?

LTC in Agile• assign LTC to test automation levels (Module, Integration, EndToEnd)

LTC-1LTC-2LTC-3

..LTC-N

Page 24: Test Cases - are they dead?

LTC in Agile• manage formally or not - up to team

• let’em test! (it works)

Page 25: Test Cases - are they dead?

LTC in large projects• even more important to switch to LTC

• help to find bad requirements

• enforce to gather knowledge about project

• works very well with clear user stories

Page 26: Test Cases - are they dead?

Lean Test Cases: Tips• in some situations use classic test cases with steps ( if very complex logic, etc)

• structure your (many) tests

• make the best use of your test case management tools

Page 27: Test Cases - are they dead?

Lean test cases: benefits

• time (faster)

• cost (cheaper)

Page 28: Test Cases - are they dead?

• easier to read for not-testers

Lean test cases: benefits

Page 29: Test Cases - are they dead?

• less maintenance

Lean test cases: benefits

Page 30: Test Cases - are they dead?

• more interesting to execute

Lean test cases: benefits

Page 31: Test Cases - are they dead?

Lean test cases: summary

• test design more effective and more efficient

• better quality of test execution (more use of humans cognitive abilities)

• can be used for wide variety of projects

Page 32: Test Cases - are they dead?

Summary

Test cases are dead!

Long Live (Lean) Test Cases!

Page 34: Test Cases - are they dead?

The End.Questions?

skype: alexejvemail: [email protected]: @i_vino