13
Topic: Role of BDD in Test Pyramid Presenter: Vinay Krishna [email protected] http://linkedin.com/in/vinaykrishna Confidential | Copyright © Agile Testing Alliance Global Gathering Brought To You By &

Atagg2015 BDD in Test pyramid

Embed Size (px)

Citation preview

Page 1: Atagg2015  BDD in Test pyramid

Topic: Role of BDD in Test PyramidPresenter: Vinay Krishna

[email protected]://linkedin.com/in/vinaykrishna

Confidential | Copyright © Agile Testing Alliance Global Gathering

Brought To You By

&

Page 2: Atagg2015  BDD in Test pyramid

Test Automation Pyramid (Inverted)

UI / E2E Test

Manual Test

Confidential | Copyright © Agile Testing Alliance Global Gathering

Integration Test

Unit Test

Page 3: Atagg2015  BDD in Test pyramid

Test Automation PyramidUI / E2E

Test

Manual Test

Confidential | Copyright © Agile Testing Alliance Global Gathering

Integration Test

Unit Test

Page 4: Atagg2015  BDD in Test pyramid

What’s BDD?• Behavior Driven Development

– Another way to automate E2E testing?

Confidential | Copyright © Agile Testing Alliance Global Gathering

– Effective way to collaborate among three amigos?

Page 5: Atagg2015  BDD in Test pyramid

Is it BDD….• BDD is automation of functional testing

– Automation of scenarios are just a by-product. Remember Shallow BDD• Using cucumber or specflow or any other

Confidential | Copyright © Agile Testing Alliance Global Gathering

• Using cucumber or specflow or any other similar tool with Selenium is BDD– No, its not more than using a tool

• BDD is replacement of functional testing– Of course not

Page 6: Atagg2015  BDD in Test pyramid

BDD is ….• Exploring the unknown• Working together to find better solutions

Confidential | Copyright © Agile Testing Alliance Global Gathering

• Uses Gherkin language (Given, When, Then)• Use real-world examples to build a shared understanding of the domain

Page 7: Atagg2015  BDD in Test pyramid

BDD Framework• Feature file• Step Definition (Glue code)• Actual implementation

Feature

file con

taining

Scenar

ios

Actual

Implem

entatio

n (Appl

ication

)Act

ual Imp

lement

ation (A

pplicat

ion)

Actual

Implem

entatio

n (Appl

ication

)Act

ual Imp

lement

ation (A

pplicat

ion)

Confidential | Copyright © Agile Testing Alliance Global Gathering

Feature

file con

taining

Scenar

ios

Glue C

ode (St

ep Defin

itions)

Actual

Implem

entatio

n (Appl

ication

)Act

ual Imp

lement

ation (A

pplicat

ion)

Actual

Implem

entatio

n (Appl

ication

)Act

ual Imp

lement

ation (A

pplicat

ion)

Page 8: Atagg2015  BDD in Test pyramid

BDD Framework• Feature file

– List of scenarios– Focus on behavior (Ensure)

• Glue code or Step-definitions (Automate)– Create a link between scenario and actual

Confidential | Copyright © Agile Testing Alliance Global Gathering

– Create a link between scenario and actual implementation to verify the behavior (Check)– At what level

• Component• Service• Module• UI

Page 9: Atagg2015  BDD in Test pyramid

BDD without BDD Framework• Feature file

– List of scenarios– Focus on behavior (Ensure)

• Glue code or Step-definitions (Manual)

Confidential | Copyright © Agile Testing Alliance Global Gathering

Glue code or Step-definitions (Manual)– Verify the behavior as per the scenario (Check)– At what level

• Component• Service• Module• UI

Page 10: Atagg2015  BDD in Test pyramid

BDD with\without framework• Collaboration and communication is must• Testing is just a by product

Confidential | Copyright © Agile Testing Alliance Global Gathering

Page 11: Atagg2015  BDD in Test pyramid

BDD and Test Pyramid• Discuss, identify and categorize scenarios

– Critical interfaces (smoke, non-regression or regression)– UI level or module level or service level

• Use tags and sub-folders effectively to organize feature better

Confidential | Copyright © Agile Testing Alliance Global Gathering

@wip @smoke @browserScenario Outline: Check user's login credentialsGiven User with details <username> <email> and <password>createdWhen I Login with <username> <email> and <password>Then It should give <login status> message

Examples: Valid login|username |email |password |login status ||Andy |[email protected] |abcd1234 |success ||Mike |[email protected] |abcd1234 |success |

Page 12: Atagg2015  BDD in Test pyramid

Summary• Test automation pyramid is a strategy to make automation

– more stable– more maintainable– reduce execution time

Confidential | Copyright © Agile Testing Alliance Global Gathering

– reduce execution time• BDD can be adopted to make above strategy more efficient

– Scenarios should be less imperative and more declarative– Implementation binding at UI, Module, Service etc.– Collaboration helps better implementation of automation strategy wherever applicable

Page 13: Atagg2015  BDD in Test pyramid

Thank You!

Confidential | Copyright © Agile Testing Alliance Global Gathering

[email protected]@vinaykris