Upload
agile-testing-alliance
View
278
Download
1
Embed Size (px)
Citation preview
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
&
Test Automation Pyramid (Inverted)
UI / E2E Test
Manual Test
Confidential | Copyright © Agile Testing Alliance Global Gathering
Integration Test
Unit Test
Test Automation PyramidUI / E2E
Test
Manual Test
Confidential | Copyright © Agile Testing Alliance Global Gathering
Integration Test
Unit Test
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?
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
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
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)
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
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
BDD with\without framework• Collaboration and communication is must• Testing is just a by product
Confidential | Copyright © Agile Testing Alliance Global Gathering
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 |
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
Thank You!
Confidential | Copyright © Agile Testing Alliance Global Gathering
[email protected]@vinaykris