SlideShare a Scribd company logo
19/02/2021
Gáspár Nagy
coach • trainer • bdd addict • creator of specflow
http://bddbooks.com • “Discovery” • “Formulation”
@gasparnagy • gaspar@specsolutions.eu
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Gáspár Nagy
coach, trainer and bdd addict
creator of SpecFlow
gaspar@specsolutions.eu
https://specsolutions.eu
@gasparnagy
http://bddbooks.com
bdd addict
given.when.then
CAUTION!
on air
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Today…
• Super brief BDD & SpecSync intro
• The SpecSync quality strategy
• Multi-target BDD scenarios
• Living Documentation and Traceability
• Wrap-up, Q&A
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
This is a BDD scenario
Scenario: Discount is applied when item added to the cart
Given a user without submitted order
And they selected a book that costs €50
When the user adds the book to the cart
Then the cart sub-total should be €45
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Behaviour Driven Development is about
understanding, documenting & validating
business requirements
through illustrative examples
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
BDD Practices
Image source: https://cucumber.io/docs/bdd/
Discovery
Shared understanding is established through
collaboration and structured conversations
Formulation
The examples of system behaviour are
documented as scenarios
Automation
Scenarios are automated to be able to verify
the behaviour of the system
SpecSync for Azure DevOps
synchronize • share • trace
<TRX>
<JUnit XML>
<Cucumber JSON>
<…>
synchronize
(push)
(pull)
run tests
BUG
1234
share
(publish test results)
trace
SpecSync for Azure DevOps
synchronize • share • trace
Started in 2015
Cross-platform (Win/Linux/macOS/Docker)
Supports all major BDD Frameworks (SpecFlow, Cucumber, Behave, …)
50000+ line of code (C#)
Survived 2 major updates and an ADO API change
Build with BDD/SpecFlow (180+ scenarios, 300+ BDD tests)
Uses SpecSync for traceability – eat your own dogfood
SpecSync for Azure DevOps
synchronize • share • trace
Rule: Can create new Test Case work items from scenarios
Scenario: A new scenario is linked to a new Test Case
Given there is an Azure DevOps project
And there is a scenario in the local repository
"""
Scenario: Sample scenario
Given there is something
When I do something
Then something will happen
"""
When the local repository is synchronized with push
Then a new Test Case work item "Scenario: Sample scenario" is created in the project
And the Test Case contains the following test steps
| step |
| Given there is something |
| When I do something |
| Then something will happen |
And a tag "@tc:[id-of-new-test-case]" is added to the scenario in the local repository
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
The
Pyramid
is
not
enough
Test Automation Pyramid: Mike Cohn – Succeeding with Agile
Pic: http://gasparnagy.com/2017/02/balancing-scenarios-and-unit-tests-case-study-with-specflow/
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
There
is
a
carnival
of
pyramids!
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
More Agile Testing: One-page test plan
Source: More Agile Testing, page 95, Bernice Niel Ruhland
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
The four-page quality strategy
• A quality strategy is like an overall test plan – gives a guidance for the whole
team about how we address quality
• Custom & specific to your project, but keep it short
• SpecSync’s strategy* has the following sections:
• Challenges (Risks)
• Quality Aspects
• Testing Methods
• Each with: purpose, automation strategy, structure, out-of-scope
• Feedback channels
*Download current snapshot from: http://speclink.me/webinar190221-strategy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Challenges (Risks)
• SpecSync is an integration product
• The quality cannot be fully ensured
• Quality changes externally (e.g., new version of ADO comes out)
• The majority of the logic cannot be tested without integration
• Supports 8 platforms, 4 target ADO versions, 15 BDD Frameworks and 8 SpecFlow
versions
• ADO versions: TFS 2017, TFS 2018, ADO 2019, ADO Services (cloud)
• Critical for clients:
• chance of blocking traceability (e.g., traceability cannot be enforced if SpecSync does not
work)
• chance of obscuring traceability (e.g., generating unnecessary changes)
• chance of data loss (e.g., SpecSync deletes important data due to a bug)
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Why the Pyramid® is not enough as a strategy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Breaking down the undefinable quality:
quality aspects (sample)
Functional
• Works as
expected
• Expectations
are good
• Expectations
are
documented
Operational
• Secure
• Fast
• Convenient
• Pretty
• Consistent
• Predictable
Strategic
• Maintainable
• Architecture
• Code quality
• Easy to
integrate
• Flexible
Source: Kevlin Henney
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
SpecSync quality aspects
Functional
• Features documented and
work
• Supports different BDD
frameworks
• Supports different ADO
versions
• Handles variations in
configuration
• Handles variations in BDD
framework test results
• Handles ADO integration
edge cases (version, size
specialties)
Operational
• Works on different platforms
• Secure
• Understandable output, easy
to diagnose
user/configuration errors
• Provides guidance for
configuration
• Works with acceptable speed
(processes at least 100
scenario per minute)
Strategic
• Has a fast & offline
development environment
• Easy to make a fix, hotfix,
proposed fix or spike
• Easy to maintain long-term
• Flexible to support custom
development processes of the
clients
• Easily extensible for new BDD
frameworks and new ADO
versions
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Choosing
test
methods
Automated BDD Scenarios
(SpecFlow, Integration)
SpecSync
ADO
ADO
2019
TFS
2017
TFS
2018
STUB
ADO
SpecSync Algorithmic Logic
Tests (MsTest, Unit)
ADO Integration Tests
(MsTest, Integration)
sync
engine
service classes
console API
Smoke Tests
(SpecFlow, E2E)
Exploratory
Features documented and work
Supports different ADO versions
Has fast & offline dev env
Works on different platforms
Handles variations in BDD frw test results Handles ADO integration edge cases
Understandable output
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Testing
methods
&
Feedback
channels
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Same test – different target
Rule: Establish work item links based on scenario tags
@tc:155
Scenario: A work item link tag added to the scenario
Given there is an Azure DevOps project with a Bug work item
And the synchronizer is configured as
| setting | value |
| synchronization/links[]/tagPrefix | bug |
And a @bug tag has been added to an existing synchronized scenario as:
"""
@tc:[id-of-test-case] @bug:[id-of-bug]
Scenario: Sample scenario
When I do something
"""
When the local repository is synchronized with push
Then the test case is linked to the Bug work item
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Before “Gateways and Drivers”
Automated BDD Scenarios (SpecFlow, Integration)
SpecSync
sync
eng.
ADO
ADO
2019
TFS
2017
TFS
2018
STUB
ADO
scenario steps
step definitions
service classes
Given 2
When 2
Given 1
Then
Scenario: A work item link tag added to the scenario
Given there is an Azure DevOps project with a Bug work item
And there is a scenario that has been synchronized already
When a @bug:[bug-id] tag is added to the scenario
And SpecSync push is executed
Then the test case is linked to the Bug work item
file
system
When 1
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Gateways and Drivers
Automated BDD Scenarios (SpecFlow, Integration)
SpecSync
sync
eng.
ADO gateway
ADO
ADO
2019
TFS
2017
TFS
2018
STUB
ADO
scenario steps
step definitions
ADO driver interface
app driver
stub driver ADO driver
service classes
local project
driver
file
system
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
The
Injector
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Living Documentation
Scenarios describe the requirements in a business-readable form. As they are
automated, by running them as tests, they can tell us when the implementation
diverges from our expectations – so it becomes living documentation that the
whole team can rely on.
• We are going to check
• Structure
• Level of details
• Tags
• Traceability
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
The living documentation is a documentation!
http://speclink.me/specsyncdoc
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Feature – Rule – Scenario
Feature: Linking Work Items and other artifacts using tags
Rule: Establish work item links based on scenario tags
Scenario: A work item link tag added to the scenario
Scenario: A work item link tag added to the feature
Rule: Link type can be specified
Scenario: "Tests" link is created by default
Scenario: The work item is linked as "Parent“
Scenario: The link type has changed
Rule: Existing links are preserved and links should remain when tag is removed
Scenario: The work item tag is removed from the scenario
Rule: Multiple prefixes can be linked
Scenario: A product backlog link and a bug link tag is added to the scenario
Rule: Pull Requests can be linked […]
Rule: Adding a work item link should trigger an update […]
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Details: hide incidental, show real data
Rule: Establish work item links based on scenario tags
@tc:155
Scenario: A work item link tag added to the scenario
Given there is an Azure DevOps project with a Bug work item
And the synchronizer is configured as
| setting | value |
| synchronization/links[]/tagPrefix | bug |
And a @bug tag has been added to an existing synchronized scenario as:
"""
@tc:[id-of-test-case] @bug:[id-of-pbi]
Scenario: Sample scenario
When I do something
"""
When the local repository is synchronized with push
Then the test case is linked to the Bug work item
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Details: hide incidental, show real data
Rule: Establish work item links based on scenario tags
@tc:155
Scenario: A work item link tag added to the scenario
Given there is an Azure DevOps project with a Bug work item
And the synchronizer is configured as
| setting | value |
| synchronization/links[]/tagPrefix | bug |
And a @bug tag has been added to an existing synchronized scenario as:
"""
@tc:[id-of-test-case] @bug:[id-of-pbi]
Scenario: Sample scenario
When I do something
"""
When the local repository is synchronized with push
Then the test case is linked to the Bug work item
And the synchronizer is configured as
--- table step argument ---
| setting | value |
| synchronization/links[]/tagPrefix | bug |
Applying config settings:
{
"synchronization": {
"links": [
{
"tagPrefix": "bug"
}
]
}
}
-> done: ConfigurationSteps.GivenTheSynchronizerIsConfiguredAs(<table>) (0.3s)
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Tags – break out from strict hierarchy
Three examples from SpecSync tags:
• @customization – cross-cutting feature
• Describes “Customization” features: used to support special development process
requirements of the SpecSync clients.
• @notsupported-tfs2017 – exclusion criteria
• The particular scenario is not supported on the target platform (here TFS2017). These
scenarios are excluded from the CI builds testing that target
• @formulated – SpecSync development process
• Allows specifying (formulating) scenarios and commit them before automation. These
scenarios are excluded from CI builds (they would fail anyway).
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Show synchronized Test Case
Link to a ticket
Publish test results
Target success matrix
Demo: Traceability
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
• How to build and document a quality strategy
• BDD scenarios are phrased using the business language, and therefore the same
scenario can be executed against different targets
• Well-structured BDD scenarios can form a living documentation and enable
traceability
What have we seen?
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy
Check out our books!
• BDD books for everyone (PO, BA, dev, tester)
• Practical guide
• Demonstrate good collaboration and
formulation techniques, illustrated by concrete
examples
Find them on Amazon* and on Leanpub
through http://bddbooks.com!
* Formulation is currently only on Leanpub
Use Leanpub coupon for 50% off: webinar021921
SpecSync for Azure DevOps
synchronize • share • trace
https://www.specsolutions.eu/specsync
Gáspár Nagy
coach • trainer • bdd addict • creator of specflow
http://bddbooks.com • “Discovery” • “Formulation”
@gasparnagy • gaspar@specsolutions.eu
Copyright © Gaspar Nagy
Copyright © Gaspar Nagy

More Related Content

What's hot (20)

PDF
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (HUSTEF 2...
Gáspár Nagy
 
PPTX
A Guide to Event-Driven SRE-inspired DevOps
Andreas Grabner
 
PDF
Metrics-driven Continuous Delivery
Andrew Phillips
 
PDF
Consumer driven contract testing
Mike van Vendeloo
 
PDF
TechSEO Boost 2018: Implementing Hreflang on Legacy Tech Stacks Using Service...
Catalyst
 
PDF
WE are Doing it Wrong - Dmitry Sharkov
QA or the Highway
 
PPTX
Jenkins Online Meetup - Automated SLI based Build Validation with Keptn
Andreas Grabner
 
PPTX
Engineering Velocity @indeed eng presented on Sept 24 2014 at Beyond Agile
KenAtIndeed
 
PPTX
Continuous Delivery and Automated Operations on k8s with keptn
Andreas Grabner
 
PPTX
Legacy On Premise Apps Got You Down? No Problem - DevOps for All
Muly Gottlieb
 
PDF
I Love APIs 2015: Continuous Integration the Virtuous Cycle
Apigee | Google Cloud
 
PPTX
What's new in Spring Boot 2.0
VMware Tanzu
 
PDF
Accelerating Your Test Execution Pipeline
SmartBear
 
PPTX
DOES16 San Francisco - David Blank-Edelman - Lessons Learned from a Parallel ...
Gene Kim
 
PDF
[@IndeedEng] Managing Experiments and Behavior Dynamically with Proctor
indeedeng
 
PPTX
Release Readiness Validation with Keptn for Austrian Online Banking Software
Andreas Grabner
 
PPTX
Automating it management with Puppet + ServiceNow
Puppet
 
PDF
Building Autonomous Operations for Kubernetes with keptn
Johannes Bräuer
 
PDF
AWS Well-Architected: Build Better Architecture, Better Business
DevOps.com
 
PDF
Spring Framework 5.0による Reactive Web Application #JavaDayTokyo
Toshiaki Maki
 
Scaffolding a legacy app with BDD scenarios using SpecFlow/Cucumber (HUSTEF 2...
Gáspár Nagy
 
A Guide to Event-Driven SRE-inspired DevOps
Andreas Grabner
 
Metrics-driven Continuous Delivery
Andrew Phillips
 
Consumer driven contract testing
Mike van Vendeloo
 
TechSEO Boost 2018: Implementing Hreflang on Legacy Tech Stacks Using Service...
Catalyst
 
WE are Doing it Wrong - Dmitry Sharkov
QA or the Highway
 
Jenkins Online Meetup - Automated SLI based Build Validation with Keptn
Andreas Grabner
 
Engineering Velocity @indeed eng presented on Sept 24 2014 at Beyond Agile
KenAtIndeed
 
Continuous Delivery and Automated Operations on k8s with keptn
Andreas Grabner
 
Legacy On Premise Apps Got You Down? No Problem - DevOps for All
Muly Gottlieb
 
I Love APIs 2015: Continuous Integration the Virtuous Cycle
Apigee | Google Cloud
 
What's new in Spring Boot 2.0
VMware Tanzu
 
Accelerating Your Test Execution Pipeline
SmartBear
 
DOES16 San Francisco - David Blank-Edelman - Lessons Learned from a Parallel ...
Gene Kim
 
[@IndeedEng] Managing Experiments and Behavior Dynamically with Proctor
indeedeng
 
Release Readiness Validation with Keptn for Austrian Online Banking Software
Andreas Grabner
 
Automating it management with Puppet + ServiceNow
Puppet
 
Building Autonomous Operations for Kubernetes with keptn
Johannes Bräuer
 
AWS Well-Architected: Build Better Architecture, Better Business
DevOps.com
 
Spring Framework 5.0による Reactive Web Application #JavaDayTokyo
Toshiaki Maki
 

Similar to BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021) (20)

PDF
BDD Scenarios in a Testing Strategy
Gáspár Nagy
 
PDF
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Gáspár Nagy
 
PDF
Tech talk specflow_bddx_hassa_nagy
Skills Matter
 
PPTX
PAPI and Promotional Deployment
Akamai Developers & Admins
 
PPTX
Week 1 - ACE.pptx
MazenElnahla
 
PPTX
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Lorenzo Barbieri
 
PDF
Extending your Azure Integration Services Solutions with Open AI
Paco de la Cruz
 
PDF
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
Vadym Kazulkin
 
PDF
Writing an extensible web testing framework ready for the cloud slide share
Mike Ensor
 
PDF
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Gáspár Nagy
 
PPTX
With Automated ML, is Everyone an ML Engineer?
Dan Sullivan, Ph.D.
 
PDF
Sitecore development approach evolution – destination helix
Peter Nazarov
 
PPTX
Staying Close to Experts with Executable Specifications
Vagif Abilov
 
PDF
Bhadale Group of Companies - digital projects
Vijayananda Mohire
 
PDF
Revolutionize DevOps with ML capabilities. Deep dive into Amazon CodeGuru and...
Vadym Kazulkin
 
PDF
Droidcon Paris 2015
Renaud Boulard
 
PDF
Building A Product Assortment Recommendation Engine
Databricks
 
PPTX
Opticon18: Developer Night
Optimizely
 
PDF
Docker Rosenheim Meetup: Policy & Governance for Kubernetes
Nico Meisenzahl
 
PDF
Software Supply Chains for DevOps @ InfoQ Live 2021
Aysylu Greenberg
 
BDD Scenarios in a Testing Strategy
Gáspár Nagy
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Gáspár Nagy
 
Tech talk specflow_bddx_hassa_nagy
Skills Matter
 
PAPI and Promotional Deployment
Akamai Developers & Admins
 
Week 1 - ACE.pptx
MazenElnahla
 
Azure DevOps Realtime Work Item Sync: the good, the bad, the ugly!
Lorenzo Barbieri
 
Extending your Azure Integration Services Solutions with Open AI
Paco de la Cruz
 
Github Copilot vs Amazon CodeWhisperer for Java developers at JCON 2023
Vadym Kazulkin
 
Writing an extensible web testing framework ready for the cloud slide share
Mike Ensor
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (BDDx L...
Gáspár Nagy
 
With Automated ML, is Everyone an ML Engineer?
Dan Sullivan, Ph.D.
 
Sitecore development approach evolution – destination helix
Peter Nazarov
 
Staying Close to Experts with Executable Specifications
Vagif Abilov
 
Bhadale Group of Companies - digital projects
Vijayananda Mohire
 
Revolutionize DevOps with ML capabilities. Deep dive into Amazon CodeGuru and...
Vadym Kazulkin
 
Droidcon Paris 2015
Renaud Boulard
 
Building A Product Assortment Recommendation Engine
Databricks
 
Opticon18: Developer Night
Optimizely
 
Docker Rosenheim Meetup: Policy & Governance for Kubernetes
Nico Meisenzahl
 
Software Supply Chains for DevOps @ InfoQ Live 2021
Aysylu Greenberg
 
Ad

More from Gáspár Nagy (12)

PDF
Ramp up your testing solution, ExpoQA 2023
Gáspár Nagy
 
PDF
Fighting against technical debt (CukenFest 2020)
Gáspár Nagy
 
PDF
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Gáspár Nagy
 
PDF
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Gáspár Nagy
 
PDF
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Gáspár Nagy
 
PDF
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Gáspár Nagy
 
PDF
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
Gáspár Nagy
 
PDF
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Gáspár Nagy
 
PDF
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
Gáspár Nagy
 
PDF
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
Gáspár Nagy
 
PDF
Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
Gáspár Nagy
 
PDF
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Gáspár Nagy
 
Ramp up your testing solution, ExpoQA 2023
Gáspár Nagy
 
Fighting against technical debt (CukenFest 2020)
Gáspár Nagy
 
Süllyedünk! Ütközés a tesztelési jégheggyel (Teszt & Tea Meeup Budapest, 2018...
Gáspár Nagy
 
Behavior Driven UI Automation (Agile Testing Days 2017, Potsdam)
Gáspár Nagy
 
Testing is Difficult (Agile in the City Bristol 2017, Lightening talk)
Gáspár Nagy
 
Behavior Driven Web UI Automation with Selenium and Cucumber/SpecFlow (Qualit...
Gáspár Nagy
 
A tesztelés szerepe folyamatos kihelyezést használó projektekben (Microsoft, ...
Gáspár Nagy
 
Property Based BDD Examples (ETSI UCAAT 2016, Budapest)
Gáspár Nagy
 
Given/When/Then-ready sprint planning with Example Mapping (Agilia Budapest 2...
Gáspár Nagy
 
Introducing BDD to Legacy Applications with SpecFlow/Cucumber (Agilia Confere...
Gáspár Nagy
 
Folyamatos integráció és kódépítés (ALM Day Budapest, 24/11/2015, Hungarian)
Gáspár Nagy
 
Given/When/Then-ready sprint planning (Agile Tour Vienna 2015)
Gáspár Nagy
 
Ad

Recently uploaded (20)

PDF
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PDF
Salesforce Pricing Update 2025: Impact, Strategy & Smart Cost Optimization wi...
GetOnCRM Solutions
 
PPTX
Presentation about Database and Database Administrator
abhishekchauhan86963
 
PDF
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
PDF
Supabase Meetup: Build in a weekend, scale to millions
Carlo Gilmar Padilla Santana
 
PPT
Brief History of Python by Learning Python in three hours
adanechb21
 
PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PDF
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
 
PDF
Protecting the Digital World Cyber Securit
dnthakkar16
 
PDF
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
PDF
What companies do with Pharo (ESUG 2025)
ESUG
 
PDF
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
PDF
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
PDF
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
PDF
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
PDF
AWS_Agentic_AI_in_Indian_BFSI_A_Strategic_Blueprint_for_Customer.pdf
siddharthnetsavvies
 
PPTX
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PPTX
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 
advancepresentationskillshdhdhhdhdhdhhfhf
jasmenrojas249
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
Salesforce Pricing Update 2025: Impact, Strategy & Smart Cost Optimization wi...
GetOnCRM Solutions
 
Presentation about Database and Database Administrator
abhishekchauhan86963
 
Step-by-Step Guide to Install SAP HANA Studio | Complete Installation Tutoria...
SAP Vista, an A L T Z E N Company
 
Supabase Meetup: Build in a weekend, scale to millions
Carlo Gilmar Padilla Santana
 
Brief History of Python by Learning Python in three hours
adanechb21
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
 
Protecting the Digital World Cyber Securit
dnthakkar16
 
Summary Of Odoo 18.1 to 18.4 : The Way For Odoo 19
CandidRoot Solutions Private Limited
 
What companies do with Pharo (ESUG 2025)
ESUG
 
Adobe Illustrator Crack Full Download (Latest Version 2025) Pre-Activated
imang66g
 
Applitools Platform Pulse: What's New and What's Coming - July 2025
Applitools
 
New Download MiniTool Partition Wizard Crack Latest Version 2025
imang66g
 
WatchTraderHub - Watch Dealer software with inventory management and multi-ch...
WatchDealer Pavel
 
AWS_Agentic_AI_in_Indian_BFSI_A_Strategic_Blueprint_for_Customer.pdf
siddharthnetsavvies
 
Employee salary prediction using Machine learning Project template.ppt
bhanuk27082004
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
classification of computer and basic part of digital computer
ravisinghrajpurohit3
 

BDD Scenarios in a Testing & Traceability Strategy (Webinar 19/02/2021)

  • 1. 19/02/2021 Gáspár Nagy coach • trainer • bdd addict • creator of specflow http://bddbooks.com • “Discovery” • “Formulation” @gasparnagy • [email protected]
  • 2. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Gáspár Nagy coach, trainer and bdd addict creator of SpecFlow [email protected] https://specsolutions.eu @gasparnagy http://bddbooks.com bdd addict given.when.then CAUTION! on air
  • 3. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Today… • Super brief BDD & SpecSync intro • The SpecSync quality strategy • Multi-target BDD scenarios • Living Documentation and Traceability • Wrap-up, Q&A
  • 4. Copyright © Gaspar Nagy Copyright © Gaspar Nagy
  • 5. Copyright © Gaspar Nagy Copyright © Gaspar Nagy This is a BDD scenario Scenario: Discount is applied when item added to the cart Given a user without submitted order And they selected a book that costs €50 When the user adds the book to the cart Then the cart sub-total should be €45
  • 6. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Behaviour Driven Development is about understanding, documenting & validating business requirements through illustrative examples
  • 7. Copyright © Gaspar Nagy Copyright © Gaspar Nagy BDD Practices Image source: https://cucumber.io/docs/bdd/ Discovery Shared understanding is established through collaboration and structured conversations Formulation The examples of system behaviour are documented as scenarios Automation Scenarios are automated to be able to verify the behaviour of the system
  • 8. SpecSync for Azure DevOps synchronize • share • trace <TRX> <JUnit XML> <Cucumber JSON> <…> synchronize (push) (pull) run tests BUG 1234 share (publish test results) trace
  • 9. SpecSync for Azure DevOps synchronize • share • trace Started in 2015 Cross-platform (Win/Linux/macOS/Docker) Supports all major BDD Frameworks (SpecFlow, Cucumber, Behave, …) 50000+ line of code (C#) Survived 2 major updates and an ADO API change Build with BDD/SpecFlow (180+ scenarios, 300+ BDD tests) Uses SpecSync for traceability – eat your own dogfood
  • 10. SpecSync for Azure DevOps synchronize • share • trace Rule: Can create new Test Case work items from scenarios Scenario: A new scenario is linked to a new Test Case Given there is an Azure DevOps project And there is a scenario in the local repository """ Scenario: Sample scenario Given there is something When I do something Then something will happen """ When the local repository is synchronized with push Then a new Test Case work item "Scenario: Sample scenario" is created in the project And the Test Case contains the following test steps | step | | Given there is something | | When I do something | | Then something will happen | And a tag "@tc:[id-of-new-test-case]" is added to the scenario in the local repository
  • 11. Copyright © Gaspar Nagy Copyright © Gaspar Nagy
  • 12. Copyright © Gaspar Nagy Copyright © Gaspar Nagy The Pyramid is not enough Test Automation Pyramid: Mike Cohn – Succeeding with Agile Pic: http://gasparnagy.com/2017/02/balancing-scenarios-and-unit-tests-case-study-with-specflow/
  • 13. Copyright © Gaspar Nagy Copyright © Gaspar Nagy There is a carnival of pyramids!
  • 14. Copyright © Gaspar Nagy Copyright © Gaspar Nagy More Agile Testing: One-page test plan Source: More Agile Testing, page 95, Bernice Niel Ruhland
  • 15. Copyright © Gaspar Nagy Copyright © Gaspar Nagy The four-page quality strategy • A quality strategy is like an overall test plan – gives a guidance for the whole team about how we address quality • Custom & specific to your project, but keep it short • SpecSync’s strategy* has the following sections: • Challenges (Risks) • Quality Aspects • Testing Methods • Each with: purpose, automation strategy, structure, out-of-scope • Feedback channels *Download current snapshot from: http://speclink.me/webinar190221-strategy
  • 16. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Challenges (Risks) • SpecSync is an integration product • The quality cannot be fully ensured • Quality changes externally (e.g., new version of ADO comes out) • The majority of the logic cannot be tested without integration • Supports 8 platforms, 4 target ADO versions, 15 BDD Frameworks and 8 SpecFlow versions • ADO versions: TFS 2017, TFS 2018, ADO 2019, ADO Services (cloud) • Critical for clients: • chance of blocking traceability (e.g., traceability cannot be enforced if SpecSync does not work) • chance of obscuring traceability (e.g., generating unnecessary changes) • chance of data loss (e.g., SpecSync deletes important data due to a bug)
  • 17. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Why the Pyramid® is not enough as a strategy
  • 18. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Breaking down the undefinable quality: quality aspects (sample) Functional • Works as expected • Expectations are good • Expectations are documented Operational • Secure • Fast • Convenient • Pretty • Consistent • Predictable Strategic • Maintainable • Architecture • Code quality • Easy to integrate • Flexible Source: Kevlin Henney
  • 19. Copyright © Gaspar Nagy Copyright © Gaspar Nagy SpecSync quality aspects Functional • Features documented and work • Supports different BDD frameworks • Supports different ADO versions • Handles variations in configuration • Handles variations in BDD framework test results • Handles ADO integration edge cases (version, size specialties) Operational • Works on different platforms • Secure • Understandable output, easy to diagnose user/configuration errors • Provides guidance for configuration • Works with acceptable speed (processes at least 100 scenario per minute) Strategic • Has a fast & offline development environment • Easy to make a fix, hotfix, proposed fix or spike • Easy to maintain long-term • Flexible to support custom development processes of the clients • Easily extensible for new BDD frameworks and new ADO versions
  • 20. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Choosing test methods Automated BDD Scenarios (SpecFlow, Integration) SpecSync ADO ADO 2019 TFS 2017 TFS 2018 STUB ADO SpecSync Algorithmic Logic Tests (MsTest, Unit) ADO Integration Tests (MsTest, Integration) sync engine service classes console API Smoke Tests (SpecFlow, E2E) Exploratory Features documented and work Supports different ADO versions Has fast & offline dev env Works on different platforms Handles variations in BDD frw test results Handles ADO integration edge cases Understandable output
  • 21. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Testing methods & Feedback channels
  • 22. Copyright © Gaspar Nagy Copyright © Gaspar Nagy
  • 23. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Same test – different target Rule: Establish work item links based on scenario tags @tc:155 Scenario: A work item link tag added to the scenario Given there is an Azure DevOps project with a Bug work item And the synchronizer is configured as | setting | value | | synchronization/links[]/tagPrefix | bug | And a @bug tag has been added to an existing synchronized scenario as: """ @tc:[id-of-test-case] @bug:[id-of-bug] Scenario: Sample scenario When I do something """ When the local repository is synchronized with push Then the test case is linked to the Bug work item
  • 24. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Before “Gateways and Drivers” Automated BDD Scenarios (SpecFlow, Integration) SpecSync sync eng. ADO ADO 2019 TFS 2017 TFS 2018 STUB ADO scenario steps step definitions service classes Given 2 When 2 Given 1 Then Scenario: A work item link tag added to the scenario Given there is an Azure DevOps project with a Bug work item And there is a scenario that has been synchronized already When a @bug:[bug-id] tag is added to the scenario And SpecSync push is executed Then the test case is linked to the Bug work item file system When 1
  • 25. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Gateways and Drivers Automated BDD Scenarios (SpecFlow, Integration) SpecSync sync eng. ADO gateway ADO ADO 2019 TFS 2017 TFS 2018 STUB ADO scenario steps step definitions ADO driver interface app driver stub driver ADO driver service classes local project driver file system
  • 26. Copyright © Gaspar Nagy Copyright © Gaspar Nagy The Injector
  • 27. Copyright © Gaspar Nagy Copyright © Gaspar Nagy
  • 28. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Living Documentation Scenarios describe the requirements in a business-readable form. As they are automated, by running them as tests, they can tell us when the implementation diverges from our expectations – so it becomes living documentation that the whole team can rely on. • We are going to check • Structure • Level of details • Tags • Traceability
  • 29. Copyright © Gaspar Nagy Copyright © Gaspar Nagy The living documentation is a documentation! http://speclink.me/specsyncdoc
  • 30. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Feature – Rule – Scenario Feature: Linking Work Items and other artifacts using tags Rule: Establish work item links based on scenario tags Scenario: A work item link tag added to the scenario Scenario: A work item link tag added to the feature Rule: Link type can be specified Scenario: "Tests" link is created by default Scenario: The work item is linked as "Parent“ Scenario: The link type has changed Rule: Existing links are preserved and links should remain when tag is removed Scenario: The work item tag is removed from the scenario Rule: Multiple prefixes can be linked Scenario: A product backlog link and a bug link tag is added to the scenario Rule: Pull Requests can be linked […] Rule: Adding a work item link should trigger an update […]
  • 31. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Details: hide incidental, show real data Rule: Establish work item links based on scenario tags @tc:155 Scenario: A work item link tag added to the scenario Given there is an Azure DevOps project with a Bug work item And the synchronizer is configured as | setting | value | | synchronization/links[]/tagPrefix | bug | And a @bug tag has been added to an existing synchronized scenario as: """ @tc:[id-of-test-case] @bug:[id-of-pbi] Scenario: Sample scenario When I do something """ When the local repository is synchronized with push Then the test case is linked to the Bug work item
  • 32. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Details: hide incidental, show real data Rule: Establish work item links based on scenario tags @tc:155 Scenario: A work item link tag added to the scenario Given there is an Azure DevOps project with a Bug work item And the synchronizer is configured as | setting | value | | synchronization/links[]/tagPrefix | bug | And a @bug tag has been added to an existing synchronized scenario as: """ @tc:[id-of-test-case] @bug:[id-of-pbi] Scenario: Sample scenario When I do something """ When the local repository is synchronized with push Then the test case is linked to the Bug work item And the synchronizer is configured as --- table step argument --- | setting | value | | synchronization/links[]/tagPrefix | bug | Applying config settings: { "synchronization": { "links": [ { "tagPrefix": "bug" } ] } } -> done: ConfigurationSteps.GivenTheSynchronizerIsConfiguredAs(<table>) (0.3s)
  • 33. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Tags – break out from strict hierarchy Three examples from SpecSync tags: • @customization – cross-cutting feature • Describes “Customization” features: used to support special development process requirements of the SpecSync clients. • @notsupported-tfs2017 – exclusion criteria • The particular scenario is not supported on the target platform (here TFS2017). These scenarios are excluded from the CI builds testing that target • @formulated – SpecSync development process • Allows specifying (formulating) scenarios and commit them before automation. These scenarios are excluded from CI builds (they would fail anyway).
  • 34. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Show synchronized Test Case Link to a ticket Publish test results Target success matrix Demo: Traceability
  • 35. Copyright © Gaspar Nagy Copyright © Gaspar Nagy
  • 36. Copyright © Gaspar Nagy Copyright © Gaspar Nagy • How to build and document a quality strategy • BDD scenarios are phrased using the business language, and therefore the same scenario can be executed against different targets • Well-structured BDD scenarios can form a living documentation and enable traceability What have we seen?
  • 37. Copyright © Gaspar Nagy Copyright © Gaspar Nagy Check out our books! • BDD books for everyone (PO, BA, dev, tester) • Practical guide • Demonstrate good collaboration and formulation techniques, illustrated by concrete examples Find them on Amazon* and on Leanpub through http://bddbooks.com! * Formulation is currently only on Leanpub Use Leanpub coupon for 50% off: webinar021921
  • 38. SpecSync for Azure DevOps synchronize • share • trace https://www.specsolutions.eu/specsync
  • 39. Gáspár Nagy coach • trainer • bdd addict • creator of specflow http://bddbooks.com • “Discovery” • “Formulation” @gasparnagy • [email protected]
  • 40. Copyright © Gaspar Nagy Copyright © Gaspar Nagy