Stpcon Grangard BDD 190409141514
Stpcon Grangard BDD 190409141514
Stpcon Grangard BDD 190409141514
an Agile World
2
Who am I?
• SmartBear Software
• Automated UI functional testing tools, test management
solutions, BDD platforms
• Podcast Co-Host
• The Good, The Bad, and the Buggy
• Education
• Dartmouth: AB in Engineering, BE in Biomedical
Engineering, MEM with a healthcare focus
• What do I love to do?
• Run, dance, play board games (Settlers of Catan anyone?)
• Stay in Touch!
• @Bria_Grangard
@Bria_Grangard
3
Agenda
Shift Left
@Bria_Grangard
4
@Bria_Grangard
Proprietary & Confidential
5
1 2 3 4
Business Developers QA Operations
@Bria_Grangard
6
Waterfall
Design Build Test Implement
Agile
DevOps
@Bria_Grangard
7
@Bria_Grangard
8
Shift Left:
/SHift/ + /left/
@Bria_Grangard
9
Testing Early,
Testing Often = Speed Quality Cost
@Bria_Grangard
10
Traditional Software Development Lifecycle
Avg Cost of Defect $100 $250 $1500
Test
Cost to fix a defect ($) Maintain
Software
Development
is Hard
13
@Bria_Grangard
14
Agile
Service
Virtualization Machine
BDD Learning
AI
TDD
DevOps
Shift Left
Automation
@Bria_Grangard
15
@Bria_Grangard
16
@Bria_Grangard
18
BDD Overview
@Bria_Grangard
19
@Bria_Grangard
20
@Bria_Grangard
21
What is BDD?
The 3 Amigos
Tester Developer
@Bria_Grangard
22
@Bria_Grangard
23
BDD in Practice
@Bria_Grangard
24
@Bria_Grangard
25
Challenges: Benefits:
1. Misalignment between various 1. Better communication and
stakeholders on your team collaboration
(product, dev, QA)
2. Deliver value more frequently
2. Producing products that don’t
3. Find and fix defects early and
address your user’s needs
often
3. No universal language between
4. Minimize waste
departments
5. Avoid development of features
4. Pressure to release faster without
nobody wants
sacrificing quality
@Bria_Grangard
26
@Bria_Grangard
27
@Bria_Grangard
28
Roles
@Bria_Grangard
Using a common Language 29
BDD Scenario
• Defines requirements in spoken-word • Making the Scenario “pass” or “work” • Scenarios contain Test definitions
scenarios guides development efforts and provides (Action, expected result)
• Obtains feedback in clear, example focus • Structure allows for easy reporting and
heavy, and easy to understand language • Scenario is easily translated directly into traceability
automated tests
• Given / When / Then structure provides
simple ways to ask for clarification
@Bria_Grangard
30
Process
@Bria_Grangard
31
@Bria_Grangard
32
Deliberate Discovery
@Bria_Grangard
33
• Product Owners
• Business Analysts
• Domain Experts
• Users
• Developers
• UX Designers
• Testers
@Bria_Grangard
34
@Bria_Grangard
35
Example Mapping—
Session
• Set-Up:
• Use a pack of four-color index cards
• Remove distractions
• Running a Session:
1. Write the story in yellow
2. Write acceptance criteria, or “rule”
in blue
3. Write concrete examples on green
4. Capture questions on red
5. Vote to see if the user story is
ready for development
@Bria_Grangard
36
@Bria_Grangard
37
@Bria_Grangard
38
@Bria_Grangard
39
@Bria_Grangard
40
@Bria_Grangard
42
Continuous Integration
@Bria_Grangard
43
Typical CI Pipeline
@Bria_Grangard
45
This way all team members can have current and accurate
information of the application in production—as well as an
archive of past test runs.
https://hiptest.com/blog/living-documentation/why-living-documentation-is-important-in-bdd/ @Bria_Grangard
46
Living Documentation
@Bria_Grangard
47
@Bria_Grangard
48
Tools
@Bria_Grangard
49
BDD Misconceptions
@Bria_Grangard
51
The Steps
1. Create a feature
• In order to [benefit] What to Keep in Mind
• As a [role] 1. Focus on the benefits of the feature
• I want [feature[ 2. Be declarative when writing test
2. Write a scenario scenarios
• Given 3. Automate when it makes sense
• When 4. Create a shared business terminology
• Then 5. Refactor where you can
3. Automate, if you’d like
6. Keep one single source of truth
• Build a scalable test automation framework
• Implement your feature
• Repeat
@Bria_Grangard
52
@Bria_Grangard
53
We need to
avoid
building the
wrong
swing.
@Bria_Grangard
Appendix
Behavior-Driven Development:
(BDD)
@Bria_Grangard
Additional Tips