SlideShare uma empresa Scribd logo
1 de 26
Cucumber, Zephyr
and All the Rest
by Dmitry Prigodich
1
Today’s topics
1. What is Cucumber
2. Consequences of using Zephyr and Cucumber together
3. Tips and tricks of step definition creation
2
Cucumber
• A cucumber is a tool based on Behavior
Driven Development (BDD) framework
which is used to write acceptance tests
for the applications.
It allows automation of functional
validation in easily readable and
understandable format (like plain
English) to Business Analysts, Developers,
Testers, etc.
3
Gherkin Key Words
Cucumber uses Business Readable, Domain Specific Language Gherkin
that requires key words:
• Feature
• Scenario
• Background
• Scenario Outline + Examples
• Given, When, Then, And, But, * …
4
Cucumber Key Words
5
Cucumber Key Words: Scenario Outline
6
Things to remember:
• Outline <variables> can be used in scenario names
• Outline <variables> replaces part of a step
• Examples can be logically divided
Gherkin Key Words: Scenario Outline
7
Zephyr-Sync
• Zephyr Sync is a tool, that allows your project to perform
synchronization of automated test results to Zephyr - a JIRA addon
for Test Management.
8
Zephyr-Sync Plugin
• Tags
• Naming
• Labels
• Descriptions
• Technical Steps
9
Step Definitions
• Strategical Scope
• Key words
• Styling
• Word selection
• Phrase structure
• Dependencies
• Multiaction
• Combinations
• …
10
Step Definition: Custom Steps
11
• Steps like Lego:
find the balance
between too detailed
and too abstract steps
Step Definitions: The Scope
12
Step Definition: Custom Steps Benefits
Custom Steps:
• Describe system from user goals point of view;
• Make scenario self-descriptive;
• Are more flexible in relation to your project;
• Are unified in style and readable;
Well, it depends only from you how good they will be.
13
Step Definitions: Key Words
14
Step Definitions: Key Words
• Given
• When
• Then
• And
• But
• *
15
Given object X should not exist
When object X is created
Then object X should exist
Given object X is created
When object X is deleted
Then object X should not exist
Step Definition: Styling
• Action-oriented
And do something
And press the button
And check something
• Subject-oriented
And cukes does something
And I press the button
And the user checks something
• Object-oriented
And it is done
And button is pressed
And something should happen
16
Step Definition: Word Selection
• And object X is Y
• And object X is created
• And object X is updated
• And object X is deleted
17
• And object X should exist
• And object X value should contain Y
• And object X value should be equal to Y
• And object X value should be empty
• And object X should not exist
• And object X value should not contain Y
• And object X value should not be equal to Y
• And object X value should not be empty
Step Definition: Phrase Structure
• And '%type% object 'X' attribute 'Y' value 'Z'‘
• And LDAP entity by DN 'A' attribute 'B' value 'C' should be equal to 'D'
18
Step Definition: Dependencies
• Dependent Steps
Given prepare new entity modification
When change attribute “A" replace value “X"
Then the client updates entity with DN “DN" using prepared modifications
• Independent Steps
And LDAP entity by DN “DN" attribute “A" value “X" is modified with operation "replace“
• Multiaction
And LDAP entity by DN “DN" is updated:
| attribute | value | operation |
| attr1 | value1 | replace |
19
Step Definition: Dependencies with Assert
• Dependent Steps:
When the client retrieves entity by DN “DN"
Then entity contains attribute "A" with value "X"
And entity contains attribute “B" with value “Y"
• Independent Steps:
Then LDAP entity by DN “DN” attribute “B” value should not be equal to “Y”
• Or with SoftAssertion multicheck:
Then LDAP entity by DN “DN” attributes should match:
| attribute | value |
| A | X |
| B | Y |
20
Step Definition: Multiactions
• Use DataTable types!
• List<K> dataTable
Given a list of numbers
| 17 |
| 42 |
• Map<K,V> dataTable
Given the price list for a coffee shop
| coffee | 1 |
| donut | 2 |
• List<Map<K,V>> dataTable
Given the price list for an international coffee shop
| product | currency | price |
| coffee | EUR | 1 |
| donut | SEK | 18 |
• And don’t forget ContextInflater!
21
Step Definition: Multiaction Example
22
Step Definitions: Combination
• Use the Power of RegExp!
• Scenario Steps:
Then typeA object 'A' should exist
Then typeB object 'B' should not exist
• Step Definition:
@And(^(typeA|typeB) object '(.+)' should (not| )exist$)
public void checkObjectExists (String type, String name, String condition) {
Boolean shouldExist = condition.isEmpty();
//and other logic
}
23
Step Definition Development: Logs & Asserts
• How to show hidden information?
• Asserts for failing scenario by rule steps;
• Loggers to view them all;
• Last Action Hero:
• Debugger!
24
Step Definition Development: Hooks
• CukesPlugin implementation allows:
• beforeAllTests()
afterAllTests()
• beforeScenario()
afterScenario()
• @Before({"@JIRA-001"})
public void beforeTestExample() {}
• @After({"@JIRA-007", "CukesTesting"})
public void afterTestExample() {}
25
Let’s Make Cucumber Great Again!
26

Mais conteúdo relacionado

Mais procurados

Modern DevOps with Spinnaker - Olga Kundzich
Modern DevOps with Spinnaker - Olga KundzichModern DevOps with Spinnaker - Olga Kundzich
Modern DevOps with Spinnaker - Olga KundzichVMware Tanzu
 
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture UDS: Vehicle Diagnostics in AUTOSAR Software Architecture
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture Embitel Technologies (I) PVT LTD
 
Why Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysWhy Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysCarlos Taborda
 
Deploying WSO2 API Manager in Production-Grade Kubernetes
Deploying WSO2 API Manager in Production-Grade KubernetesDeploying WSO2 API Manager in Production-Grade Kubernetes
Deploying WSO2 API Manager in Production-Grade KubernetesWSO2
 
Quality in a Square. K8s-native Quality Assurance of Microservices with Testkube
Quality in a Square. K8s-native Quality Assurance of Microservices with TestkubeQuality in a Square. K8s-native Quality Assurance of Microservices with Testkube
Quality in a Square. K8s-native Quality Assurance of Microservices with TestkubeQAware GmbH
 
CNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdf
CNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdfCNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdf
CNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdfLibbySchulze
 
Meet Qt 6.0
Meet Qt 6.0 Meet Qt 6.0
Meet Qt 6.0 Qt
 
IBM MQ High Availability 2019
IBM MQ High Availability 2019IBM MQ High Availability 2019
IBM MQ High Availability 2019David Ware
 
Azure Container Apps
Azure Container AppsAzure Container Apps
Azure Container AppsKen Sykora
 
JavaScript MEAN 스택
JavaScript MEAN 스택JavaScript MEAN 스택
JavaScript MEAN 스택Tai Hoon KIM
 
Agenda_Harry_Potter.pdf
Agenda_Harry_Potter.pdfAgenda_Harry_Potter.pdf
Agenda_Harry_Potter.pdfAnaLuciaPerez8
 
Java Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQubeJava Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQubeAngelin R
 
M10: How to implement mq in a containerized architecture ITC 2019
M10: How to implement mq in a containerized architecture ITC 2019M10: How to implement mq in a containerized architecture ITC 2019
M10: How to implement mq in a containerized architecture ITC 2019Robert Parker
 

Mais procurados (20)

Best Practices with Azure & Kubernetes
Best Practices with Azure & KubernetesBest Practices with Azure & Kubernetes
Best Practices with Azure & Kubernetes
 
Modern DevOps with Spinnaker - Olga Kundzich
Modern DevOps with Spinnaker - Olga KundzichModern DevOps with Spinnaker - Olga Kundzich
Modern DevOps with Spinnaker - Olga Kundzich
 
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture UDS: Vehicle Diagnostics in AUTOSAR Software Architecture
UDS: Vehicle Diagnostics in AUTOSAR Software Architecture
 
Why Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anywaysWhy Git Sucks and you'll use it anyways
Why Git Sucks and you'll use it anyways
 
Deploying WSO2 API Manager in Production-Grade Kubernetes
Deploying WSO2 API Manager in Production-Grade KubernetesDeploying WSO2 API Manager in Production-Grade Kubernetes
Deploying WSO2 API Manager in Production-Grade Kubernetes
 
BDD: The unit test of the product owner
BDD: The unit test of the product ownerBDD: The unit test of the product owner
BDD: The unit test of the product owner
 
Quality in a Square. K8s-native Quality Assurance of Microservices with Testkube
Quality in a Square. K8s-native Quality Assurance of Microservices with TestkubeQuality in a Square. K8s-native Quality Assurance of Microservices with Testkube
Quality in a Square. K8s-native Quality Assurance of Microservices with Testkube
 
CNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdf
CNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdfCNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdf
CNCF Online - Data Protection Guardrails using Open Policy Agent (OPA).pdf
 
Autosar MCAL (Microcontroller Abstraction Layer)
Autosar MCAL (Microcontroller Abstraction Layer)Autosar MCAL (Microcontroller Abstraction Layer)
Autosar MCAL (Microcontroller Abstraction Layer)
 
Meet Qt 6.0
Meet Qt 6.0 Meet Qt 6.0
Meet Qt 6.0
 
IBM MQ High Availability 2019
IBM MQ High Availability 2019IBM MQ High Availability 2019
IBM MQ High Availability 2019
 
Azure Container Apps
Azure Container AppsAzure Container Apps
Azure Container Apps
 
JavaScript MEAN 스택
JavaScript MEAN 스택JavaScript MEAN 스택
JavaScript MEAN 스택
 
An Overview of Spinnaker
An Overview of SpinnakerAn Overview of Spinnaker
An Overview of Spinnaker
 
Agenda_Harry_Potter.pdf
Agenda_Harry_Potter.pdfAgenda_Harry_Potter.pdf
Agenda_Harry_Potter.pdf
 
Java Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQubeJava Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQube
 
Azure dev ops
Azure dev opsAzure dev ops
Azure dev ops
 
M10: How to implement mq in a containerized architecture ITC 2019
M10: How to implement mq in a containerized architecture ITC 2019M10: How to implement mq in a containerized architecture ITC 2019
M10: How to implement mq in a containerized architecture ITC 2019
 
12 maanden, 12 gezegden
12 maanden, 12 gezegden12 maanden, 12 gezegden
12 maanden, 12 gezegden
 
Kubernetes
KubernetesKubernetes
Kubernetes
 

Semelhante a Cucumber, Zephyr and All the Rest

You Put *What* in Your Stream?! Patterns and Practices for Event Design with ...
You Put *What* in Your Stream?! Patterns and Practices for Event Design with ...You Put *What* in Your Stream?! Patterns and Practices for Event Design with ...
You Put *What* in Your Stream?! Patterns and Practices for Event Design with ...HostedbyConfluent
 
Is Your API Misbehaving (workshop)
Is Your API Misbehaving (workshop)Is Your API Misbehaving (workshop)
Is Your API Misbehaving (workshop)Keith Casey
 
Having fun power apps components HandsOn - Power Platform World Tour Copenhag...
Having fun power apps components HandsOn - Power Platform World Tour Copenhag...Having fun power apps components HandsOn - Power Platform World Tour Copenhag...
Having fun power apps components HandsOn - Power Platform World Tour Copenhag...Rebekka Aalbers-de Jong
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumberDaniel Kummer
 
Done in 60 seconds - Creating Web 2.0 applications made easy
Done in 60 seconds - Creating Web 2.0 applications made easyDone in 60 seconds - Creating Web 2.0 applications made easy
Done in 60 seconds - Creating Web 2.0 applications made easyRoel Hartman
 
Introduction to JavaScript for APEX Developers - Module 2: Adding JavaScript ...
Introduction to JavaScript for APEX Developers - Module 2: Adding JavaScript ...Introduction to JavaScript for APEX Developers - Module 2: Adding JavaScript ...
Introduction to JavaScript for APEX Developers - Module 2: Adding JavaScript ...Daniel McGhan
 
Expo qa from user stories to automated acceptance tests with bdd
Expo qa   from user stories to automated acceptance tests with bddExpo qa   from user stories to automated acceptance tests with bdd
Expo qa from user stories to automated acceptance tests with bddEduardo Riol
 
Business driven development
Business driven developmentBusiness driven development
Business driven developmentBenoy John, CSM
 
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo RiolWebinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo RiolatSistemas
 
Automation testing
Automation testingAutomation testing
Automation testingRomexsoft
 
Just the Facets Ma'am ... MWLUG August 23, 2013, Indianapoilis, IN
Just the Facets Ma'am ... MWLUG August 23, 2013, Indianapoilis, INJust the Facets Ma'am ... MWLUG August 23, 2013, Indianapoilis, IN
Just the Facets Ma'am ... MWLUG August 23, 2013, Indianapoilis, INPaul Della-Nebbia
 
Just the Facets Ma'am - MWLUG 2013
Just the Facets Ma'am - MWLUG 2013Just the Facets Ma'am - MWLUG 2013
Just the Facets Ma'am - MWLUG 2013balassaitis
 
Forge - DevCon 2016: Free your BIM data
Forge - DevCon 2016: Free your BIM dataForge - DevCon 2016: Free your BIM data
Forge - DevCon 2016: Free your BIM dataAutodesk
 
Spsbe2012 sessie start to-jquery
Spsbe2012 sessie start to-jquerySpsbe2012 sessie start to-jquery
Spsbe2012 sessie start to-jqueryMarijn Somers
 
Build Your First Android App Session #1
Build Your First Android App Session #1Build Your First Android App Session #1
Build Your First Android App Session #1Troy Miles
 
It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...
It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...
It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...Ultan O'Broin
 
Expanding skill sets - Broaden your perspective on design
Expanding skill sets - Broaden your perspective on designExpanding skill sets - Broaden your perspective on design
Expanding skill sets - Broaden your perspective on designroskakori
 
Software architecture houstontechfest2020
Software architecture houstontechfest2020Software architecture houstontechfest2020
Software architecture houstontechfest2020Jane Prusakova
 

Semelhante a Cucumber, Zephyr and All the Rest (20)

Hello bdd
Hello bddHello bdd
Hello bdd
 
You Put *What* in Your Stream?! Patterns and Practices for Event Design with ...
You Put *What* in Your Stream?! Patterns and Practices for Event Design with ...You Put *What* in Your Stream?! Patterns and Practices for Event Design with ...
You Put *What* in Your Stream?! Patterns and Practices for Event Design with ...
 
Is Your API Misbehaving (workshop)
Is Your API Misbehaving (workshop)Is Your API Misbehaving (workshop)
Is Your API Misbehaving (workshop)
 
Behavior-Driven Development with JGiven
Behavior-Driven Development with JGivenBehavior-Driven Development with JGiven
Behavior-Driven Development with JGiven
 
Having fun power apps components HandsOn - Power Platform World Tour Copenhag...
Having fun power apps components HandsOn - Power Platform World Tour Copenhag...Having fun power apps components HandsOn - Power Platform World Tour Copenhag...
Having fun power apps components HandsOn - Power Platform World Tour Copenhag...
 
BDD testing with cucumber
BDD testing with cucumberBDD testing with cucumber
BDD testing with cucumber
 
Done in 60 seconds - Creating Web 2.0 applications made easy
Done in 60 seconds - Creating Web 2.0 applications made easyDone in 60 seconds - Creating Web 2.0 applications made easy
Done in 60 seconds - Creating Web 2.0 applications made easy
 
Introduction to JavaScript for APEX Developers - Module 2: Adding JavaScript ...
Introduction to JavaScript for APEX Developers - Module 2: Adding JavaScript ...Introduction to JavaScript for APEX Developers - Module 2: Adding JavaScript ...
Introduction to JavaScript for APEX Developers - Module 2: Adding JavaScript ...
 
Expo qa from user stories to automated acceptance tests with bdd
Expo qa   from user stories to automated acceptance tests with bddExpo qa   from user stories to automated acceptance tests with bdd
Expo qa from user stories to automated acceptance tests with bdd
 
Business driven development
Business driven developmentBusiness driven development
Business driven development
 
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo RiolWebinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
Webinar-From user stories to automated acceptance tests with BDD-Eduardo Riol
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Just the Facets Ma'am ... MWLUG August 23, 2013, Indianapoilis, IN
Just the Facets Ma'am ... MWLUG August 23, 2013, Indianapoilis, INJust the Facets Ma'am ... MWLUG August 23, 2013, Indianapoilis, IN
Just the Facets Ma'am ... MWLUG August 23, 2013, Indianapoilis, IN
 
Just the Facets Ma'am - MWLUG 2013
Just the Facets Ma'am - MWLUG 2013Just the Facets Ma'am - MWLUG 2013
Just the Facets Ma'am - MWLUG 2013
 
Forge - DevCon 2016: Free your BIM data
Forge - DevCon 2016: Free your BIM dataForge - DevCon 2016: Free your BIM data
Forge - DevCon 2016: Free your BIM data
 
Spsbe2012 sessie start to-jquery
Spsbe2012 sessie start to-jquerySpsbe2012 sessie start to-jquery
Spsbe2012 sessie start to-jquery
 
Build Your First Android App Session #1
Build Your First Android App Session #1Build Your First Android App Session #1
Build Your First Android App Session #1
 
It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...
It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...
It's Better To Have a Permanent Income Than to Be Fascinating: Killer Feature...
 
Expanding skill sets - Broaden your perspective on design
Expanding skill sets - Broaden your perspective on designExpanding skill sets - Broaden your perspective on design
Expanding skill sets - Broaden your perspective on design
 
Software architecture houstontechfest2020
Software architecture houstontechfest2020Software architecture houstontechfest2020
Software architecture houstontechfest2020
 

Último

Climbers and Creepers used in landscaping
Climbers and Creepers used in landscapingClimbers and Creepers used in landscaping
Climbers and Creepers used in landscapingDr. M. Kumaresan Hort.
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptxPoojaSen20
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjMohammed Sikander
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptxVishal Singh
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxMarlene Maheu
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...Gary Wood
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...Nguyen Thanh Tu Collection
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSean M. Fox
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesPooky Knightsmith
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxMohamed Rizk Khodair
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsISCOPE Publication
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...Nguyen Thanh Tu Collection
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024Borja Sotomayor
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...EADTU
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismDabee Kamal
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽中 央社
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...Nguyen Thanh Tu Collection
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptxPoojaSen20
 

Último (20)

Climbers and Creepers used in landscaping
Climbers and Creepers used in landscapingClimbers and Creepers used in landscaping
Climbers and Creepers used in landscaping
 
MOOD STABLIZERS DRUGS.pptx
MOOD     STABLIZERS           DRUGS.pptxMOOD     STABLIZERS           DRUGS.pptx
MOOD STABLIZERS DRUGS.pptx
 
VAMOS CUIDAR DO NOSSO PLANETA! .
VAMOS CUIDAR DO NOSSO PLANETA!                    .VAMOS CUIDAR DO NOSSO PLANETA!                    .
VAMOS CUIDAR DO NOSSO PLANETA! .
 
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjjStl Algorithms in C++ jjjjjjjjjjjjjjjjjj
Stl Algorithms in C++ jjjjjjjjjjjjjjjjjj
 
The Liver & Gallbladder (Anatomy & Physiology).pptx
The Liver &  Gallbladder (Anatomy & Physiology).pptxThe Liver &  Gallbladder (Anatomy & Physiology).pptx
The Liver & Gallbladder (Anatomy & Physiology).pptx
 
PSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptxPSYPACT- Practicing Over State Lines May 2024.pptx
PSYPACT- Practicing Over State Lines May 2024.pptx
 
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...When Quality Assurance Meets Innovation in Higher Education - Report launch w...
When Quality Assurance Meets Innovation in Higher Education - Report launch w...
 
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
24 ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH SỞ GIÁO DỤC HẢI DƯ...
 
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading RoomSternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
Sternal Fractures & Dislocations - EMGuidewire Radiology Reading Room
 
Trauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical PrinciplesTrauma-Informed Leadership - Five Practical Principles
Trauma-Informed Leadership - Five Practical Principles
 
demyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptxdemyelinated disorder: multiple sclerosis.pptx
demyelinated disorder: multiple sclerosis.pptx
 
OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...OS-operating systems- ch05 (CPU Scheduling) ...
OS-operating systems- ch05 (CPU Scheduling) ...
 
Scopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS PublicationsScopus Indexed Journals 2024 - ISCOPUS Publications
Scopus Indexed Journals 2024 - ISCOPUS Publications
 
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
TỔNG HỢP HƠN 100 ĐỀ THI THỬ TỐT NGHIỆP THPT TOÁN 2024 - TỪ CÁC TRƯỜNG, TRƯỜNG...
 
UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024UChicago CMSC 23320 - The Best Commit Messages of 2024
UChicago CMSC 23320 - The Best Commit Messages of 2024
 
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
Transparency, Recognition and the role of eSealing - Ildiko Mazar and Koen No...
 
An overview of the various scriptures in Hinduism
An overview of the various scriptures in HinduismAn overview of the various scriptures in Hinduism
An overview of the various scriptures in Hinduism
 
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽會考英聽
 
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
ĐỀ THAM KHẢO KÌ THI TUYỂN SINH VÀO LỚP 10 MÔN TIẾNG ANH FORM 50 CÂU TRẮC NGHI...
 
ANTI PARKISON DRUGS.pptx
ANTI         PARKISON          DRUGS.pptxANTI         PARKISON          DRUGS.pptx
ANTI PARKISON DRUGS.pptx
 

Cucumber, Zephyr and All the Rest

  • 1. Cucumber, Zephyr and All the Rest by Dmitry Prigodich 1
  • 2. Today’s topics 1. What is Cucumber 2. Consequences of using Zephyr and Cucumber together 3. Tips and tricks of step definition creation 2
  • 3. Cucumber • A cucumber is a tool based on Behavior Driven Development (BDD) framework which is used to write acceptance tests for the applications. It allows automation of functional validation in easily readable and understandable format (like plain English) to Business Analysts, Developers, Testers, etc. 3
  • 4. Gherkin Key Words Cucumber uses Business Readable, Domain Specific Language Gherkin that requires key words: • Feature • Scenario • Background • Scenario Outline + Examples • Given, When, Then, And, But, * … 4
  • 6. Cucumber Key Words: Scenario Outline 6 Things to remember: • Outline <variables> can be used in scenario names • Outline <variables> replaces part of a step • Examples can be logically divided
  • 7. Gherkin Key Words: Scenario Outline 7
  • 8. Zephyr-Sync • Zephyr Sync is a tool, that allows your project to perform synchronization of automated test results to Zephyr - a JIRA addon for Test Management. 8
  • 9. Zephyr-Sync Plugin • Tags • Naming • Labels • Descriptions • Technical Steps 9
  • 10. Step Definitions • Strategical Scope • Key words • Styling • Word selection • Phrase structure • Dependencies • Multiaction • Combinations • … 10
  • 11. Step Definition: Custom Steps 11 • Steps like Lego: find the balance between too detailed and too abstract steps
  • 13. Step Definition: Custom Steps Benefits Custom Steps: • Describe system from user goals point of view; • Make scenario self-descriptive; • Are more flexible in relation to your project; • Are unified in style and readable; Well, it depends only from you how good they will be. 13
  • 15. Step Definitions: Key Words • Given • When • Then • And • But • * 15 Given object X should not exist When object X is created Then object X should exist Given object X is created When object X is deleted Then object X should not exist
  • 16. Step Definition: Styling • Action-oriented And do something And press the button And check something • Subject-oriented And cukes does something And I press the button And the user checks something • Object-oriented And it is done And button is pressed And something should happen 16
  • 17. Step Definition: Word Selection • And object X is Y • And object X is created • And object X is updated • And object X is deleted 17 • And object X should exist • And object X value should contain Y • And object X value should be equal to Y • And object X value should be empty • And object X should not exist • And object X value should not contain Y • And object X value should not be equal to Y • And object X value should not be empty
  • 18. Step Definition: Phrase Structure • And '%type% object 'X' attribute 'Y' value 'Z'‘ • And LDAP entity by DN 'A' attribute 'B' value 'C' should be equal to 'D' 18
  • 19. Step Definition: Dependencies • Dependent Steps Given prepare new entity modification When change attribute “A" replace value “X" Then the client updates entity with DN “DN" using prepared modifications • Independent Steps And LDAP entity by DN “DN" attribute “A" value “X" is modified with operation "replace“ • Multiaction And LDAP entity by DN “DN" is updated: | attribute | value | operation | | attr1 | value1 | replace | 19
  • 20. Step Definition: Dependencies with Assert • Dependent Steps: When the client retrieves entity by DN “DN" Then entity contains attribute "A" with value "X" And entity contains attribute “B" with value “Y" • Independent Steps: Then LDAP entity by DN “DN” attribute “B” value should not be equal to “Y” • Or with SoftAssertion multicheck: Then LDAP entity by DN “DN” attributes should match: | attribute | value | | A | X | | B | Y | 20
  • 21. Step Definition: Multiactions • Use DataTable types! • List<K> dataTable Given a list of numbers | 17 | | 42 | • Map<K,V> dataTable Given the price list for a coffee shop | coffee | 1 | | donut | 2 | • List<Map<K,V>> dataTable Given the price list for an international coffee shop | product | currency | price | | coffee | EUR | 1 | | donut | SEK | 18 | • And don’t forget ContextInflater! 21
  • 23. Step Definitions: Combination • Use the Power of RegExp! • Scenario Steps: Then typeA object 'A' should exist Then typeB object 'B' should not exist • Step Definition: @And(^(typeA|typeB) object '(.+)' should (not| )exist$) public void checkObjectExists (String type, String name, String condition) { Boolean shouldExist = condition.isEmpty(); //and other logic } 23
  • 24. Step Definition Development: Logs & Asserts • How to show hidden information? • Asserts for failing scenario by rule steps; • Loggers to view them all; • Last Action Hero: • Debugger! 24
  • 25. Step Definition Development: Hooks • CukesPlugin implementation allows: • beforeAllTests() afterAllTests() • beforeScenario() afterScenario() • @Before({"@JIRA-001"}) public void beforeTestExample() {} • @After({"@JIRA-007", "CukesTesting"}) public void afterTestExample() {} 25
  • 26. Let’s Make Cucumber Great Again! 26