SlideShare une entreprise Scribd logo
1  sur  41
Télécharger pour lire hors ligne
Stop coding start testing
Pascal Dufour & Valerio Barrila
Valerio Barrila
Tech guy
@ninjatux2k
Pascal Dufour
Test guy
@pascal_dufour
Agenda
• Why and how Minosse is developed
• How to create automated checks in Minosse (CucumberJS)
• Thoughts behind writing great feature files
Test tool stack
Tools we used
The new tester
Program languages
• Groovy
• JAVA
• NodeJS
• Ruby
https://www.flickr.com/photos/jdhancock/
Easy to switch for testers between projects
• One language for test automation across projects
• Test written in a uniform style across projects
Problems we solved
Easy to adapt for new testers
• Tests written in a readable language for a techie person
• No scripting skills required to write automated tests
Easy life for developers
• Test implementation code is written once
• Bugs and fixes in one place
Agenda
• Why and how Minosse is developed
• How to create automated checks in Minosse (CucumberJS)
• Thoughts behind writing great feature files
Minosse
Generic set of common steps for testingAPI
github.com/icemobilelab/minosse
Generic set of common steps for testingAPI
(ab)-use CucumberJS
• Property steps
• HTTP steps
• Debug steps
Minosse
Load testdata
• Given I set property foo to testdata foo
Setting a property
• Given I set property foo of request body to number 4
Remove a property
• Given I remove property foo
Property setting steps
Set the request body
• Given I set the request body to property foo
Set a request header
• Given I set the request header bar with value foo
Set the request content type
• Given I set the request header Content-Type with value multipart/formdata
Save the response body
• Given I set property foo to the response body
Http steps Set requests and save response body
Send a request
• Given I send a POST request to /foo
Sending an HTTPS request
• Given I secure the connection with certificate certificate.crt and with key
keyFile.key
Check the response code
• Given the response status code is 200
Http steps sending a request and check
Checking if property does not exist
• Given I check property foo of response body does not exist
Checking the value of a property
• Given I check property foo of response body equals number 4
Checking the type of a property
• Given I check property foo of response body has type number
Checking the format of a property
• Given I check property bar has format email
Property checking steps
Print a property
• Given DEBUG I print property foo
Debug steps
API we test
http://restcountries.eu/
Install time!
Setup your own environment
Install instructions
1. Install NodeJS
2. Clone the api repository `git clone git@github.com:aredo/restcountries.git`
3. Checkout the release 0.1.0 `git checkout tags/0.1.0`
4. cd restcountries && npm install minosse cucumber
Or we made an environment for you
Install instructions
1. Ask Pascal or Valerio the USB
2. Copy the content somewhere in your machine
3. Import the machine in VirtualBox
You can also download the machine here:
https://goo.gl/WKXOFk
It works
Folder structure
Steps loader (steps.js)
Assignments
Scenario: Calling Get should return a 200 status code
Given I send a GET request to /
When the response status code is 200
Assignments 1 add a debug step
Then DEBUG I print property response body
For handouts see https://goo.gl/OyJuZD
Scenario: Calling Get should return a 200 status code
Given I send a GET request to /
When the response status code is 200
Then DEBUG I print property response body
And I check
Assignments 2 add a check on the response
property message of response body equals string Welcome buddy!
Scenario: Calling Get on endpoint /incorrect should return a 404 status code and
the message Sorry, that page does not exist
Given I send a GET request to /incorrect
When the response status code is 404
And I check
Assignments 3 check a specific status
property message of response body equals string Sorry, that page does not exis
Scenario: Calling Get on endpoint api/v1 should return a 200 status code and I
check multiple properties.
Given I send a GET request to /api/v1
When the response status code is 200
And I check
Assignments 4 check a specific value
property res.body[0].name equals stringAfghanistan
Scenario: I want to show my custom steps

Given I want to create a custom step
Assignments 5 create a custom step
Agenda
• Why and how Minosse is developed
• How to create automated checks in Minosse (CucumberJS)
• Thoughts behind writing great feature files
What the testers do in the project
Create test ideas
Review documentation
Review tests
Create automated
testsMaintain tests
Exploratory testing
Review reports
HipChat integration
• Developers and Testers in the chat
Failure notifications for the team
•Created by the team.
•Self verifying data for files en test….
•1 test should test 1 thing (single responsibility pattern). 
•Exploratory testing is mandatory for a good check
•What is implemented is tested. => Test should always reflect implementation.
•We use Coverage Report to measure the test coverage. To train ourselves in
creating better test.
•Everything is reviewed by the someone in the team or by an other team
Writing a good feature file
@collect-active

Feature:As a user I want to collect and receive stamps with bonus stamp offers

@BSO

Scenario Outline:As a user I want to collect and receive stamps with bso

Given testdata collect_active is stored as collect
........

When I send a POST request to /…/………………/active

Then the response status code is 200

And check property transactionId of response body is property transactionIdentifier

And check property newBalance of response body is number <newBalance>

And check property mutation of response body is number <mutation>
Examples:

|amountSpent |bso |value |newBalance |mutation |

|10 |Bso1Stamps |1 |2 |2 |

|10 |Bso100Stamps |1 |101 |101 |

|20 |Bso1Stamps |7 |9 |9 |

|10          |BsoLimitedLife |1     |2           |2         |
Reports
Reports
Body text
• Bullet
Slide title
Body text
• Bullet
Code coverage to change the test
special thanks to Jasper Woudenberg
Desmond Delissen
Ice mobile
Questions?
Stop coding start testing

Contenu connexe

Tendances

Ruby onrails cucumber-rspec-capybara
Ruby onrails cucumber-rspec-capybaraRuby onrails cucumber-rspec-capybara
Ruby onrails cucumber-rspec-capybara
Bindesh Vijayan
 
Behavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testing
dversaci
 
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Applitools
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
Brandon Keepers
 

Tendances (20)

Test automation with Cucumber-JVM
Test automation with Cucumber-JVMTest automation with Cucumber-JVM
Test automation with Cucumber-JVM
 
Selenium Best Practices with Jason Huggins
Selenium Best Practices with Jason HugginsSelenium Best Practices with Jason Huggins
Selenium Best Practices with Jason Huggins
 
Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013Rspec and Capybara Intro Tutorial at RailsConf 2013
Rspec and Capybara Intro Tutorial at RailsConf 2013
 
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
Shift Remote: Mobile - Efficiently Building Native Frameworks for Multiple Pl...
 
Automated tests to a REST API
Automated tests to a REST APIAutomated tests to a REST API
Automated tests to a REST API
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
Ruby onrails cucumber-rspec-capybara
Ruby onrails cucumber-rspec-capybaraRuby onrails cucumber-rspec-capybara
Ruby onrails cucumber-rspec-capybara
 
Behavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile TestingBehavior Driven Development (BDD) and Agile Testing
Behavior Driven Development (BDD) and Agile Testing
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
Mastering UI automation at Scale: Key Lessons and Best Practices (By Fernando...
 
TDD with PhpSpec - Lone Star PHP 2016
TDD with PhpSpec - Lone Star PHP 2016TDD with PhpSpec - Lone Star PHP 2016
TDD with PhpSpec - Lone Star PHP 2016
 
Implementing Testing for Behavior-Driven Development Using Cucumber
Implementing Testing for Behavior-Driven Development Using CucumberImplementing Testing for Behavior-Driven Development Using Cucumber
Implementing Testing for Behavior-Driven Development Using Cucumber
 
Angular Unit Testing
Angular Unit TestingAngular Unit Testing
Angular Unit Testing
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
 
Behavior Driven Development with Cucumber
Behavior Driven Development with CucumberBehavior Driven Development with Cucumber
Behavior Driven Development with Cucumber
 
Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)Serverless in production, an experience report (LNUG)
Serverless in production, an experience report (LNUG)
 
Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)Serverless in Production, an experience report (cloudXchange)
Serverless in Production, an experience report (cloudXchange)
 
Rest API Testing
Rest API TestingRest API Testing
Rest API Testing
 
Devopstalks 2017-gwen
Devopstalks 2017-gwenDevopstalks 2017-gwen
Devopstalks 2017-gwen
 
Bdd – with cucumber and gherkin
Bdd – with cucumber and gherkinBdd – with cucumber and gherkin
Bdd – with cucumber and gherkin
 

En vedette

The story of j3 (4)
The story of j3 (4)The story of j3 (4)
The story of j3 (4)
03077747
 
36448696 alege-jucariile-potrivite-bebelusului-tau
36448696 alege-jucariile-potrivite-bebelusului-tau36448696 alege-jucariile-potrivite-bebelusului-tau
36448696 alege-jucariile-potrivite-bebelusului-tau
Hentea Mariana
 
Yammer Social Data Mining
Yammer Social Data MiningYammer Social Data Mining
Yammer Social Data Mining
Joris Poelmans
 
Slow Living Summit 2011 presentation by Christine Bushway
Slow Living Summit 2011 presentation by Christine BushwaySlow Living Summit 2011 presentation by Christine Bushway
Slow Living Summit 2011 presentation by Christine Bushway
SlowLiving
 
Oaklanders undiagnosed post tramatic stress
Oaklanders undiagnosed post tramatic stressOaklanders undiagnosed post tramatic stress
Oaklanders undiagnosed post tramatic stress
Baroness Thompson
 
Twitter for local business
Twitter for local businessTwitter for local business
Twitter for local business
Whizbang
 
Module 3 Part 1 Review
Module 3 Part 1 Review Module 3 Part 1 Review
Module 3 Part 1 Review
CDOL
 

En vedette (20)

Agile Progress Tracking and Code Complete Date Estimation
Agile Progress Tracking and Code Complete Date EstimationAgile Progress Tracking and Code Complete Date Estimation
Agile Progress Tracking and Code Complete Date Estimation
 
In-depth calendar
In-depth calendarIn-depth calendar
In-depth calendar
 
The story of j3 (4)
The story of j3 (4)The story of j3 (4)
The story of j3 (4)
 
Mobilediagnosis 2015
Mobilediagnosis 2015 Mobilediagnosis 2015
Mobilediagnosis 2015
 
Parle-G campaign- The future genius
Parle-G campaign- The future geniusParle-G campaign- The future genius
Parle-G campaign- The future genius
 
36448696 alege-jucariile-potrivite-bebelusului-tau
36448696 alege-jucariile-potrivite-bebelusului-tau36448696 alege-jucariile-potrivite-bebelusului-tau
36448696 alege-jucariile-potrivite-bebelusului-tau
 
Testing 5
Testing 5Testing 5
Testing 5
 
Yammer Social Data Mining
Yammer Social Data MiningYammer Social Data Mining
Yammer Social Data Mining
 
Slow Living Summit 2011 presentation by Christine Bushway
Slow Living Summit 2011 presentation by Christine BushwaySlow Living Summit 2011 presentation by Christine Bushway
Slow Living Summit 2011 presentation by Christine Bushway
 
Day1presentation
Day1presentationDay1presentation
Day1presentation
 
MobileDiagnosis Onlus 5 x 1000 2016
MobileDiagnosis Onlus         5 x 1000     2016           MobileDiagnosis Onlus         5 x 1000     2016
MobileDiagnosis Onlus 5 x 1000 2016
 
Ex louisville 2011
Ex louisville 2011Ex louisville 2011
Ex louisville 2011
 
Oaklanders undiagnosed post tramatic stress
Oaklanders undiagnosed post tramatic stressOaklanders undiagnosed post tramatic stress
Oaklanders undiagnosed post tramatic stress
 
長野市内の災害時における孤立可能性集落資料
長野市内の災害時における孤立可能性集落資料長野市内の災害時における孤立可能性集落資料
長野市内の災害時における孤立可能性集落資料
 
Livia's journey india and nepal
Livia's journey   india and nepalLivia's journey   india and nepal
Livia's journey india and nepal
 
Twitter for local business
Twitter for local businessTwitter for local business
Twitter for local business
 
Sturgis
Sturgis Sturgis
Sturgis
 
Module 3 Part 1 Review
Module 3 Part 1 Review Module 3 Part 1 Review
Module 3 Part 1 Review
 
MobileDiagnosis:an appropriate technology
MobileDiagnosis:an appropriate technologyMobileDiagnosis:an appropriate technology
MobileDiagnosis:an appropriate technology
 
Aroma lid
Aroma lidAroma lid
Aroma lid
 

Similaire à Stop coding start testing

Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
Lindsay Holmwood
 
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
Ortus Solutions, Corp
 

Similaire à Stop coding start testing (20)

Behaviour driven infrastructure
Behaviour driven infrastructureBehaviour driven infrastructure
Behaviour driven infrastructure
 
Testing mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP frameworkTesting mit Codeception: Full-stack testing PHP framework
Testing mit Codeception: Full-stack testing PHP framework
 
Selenium Tips & Tricks - StarWest 2015
Selenium Tips & Tricks - StarWest 2015Selenium Tips & Tricks - StarWest 2015
Selenium Tips & Tricks - StarWest 2015
 
How To Use Selenium Successfully
How To Use Selenium SuccessfullyHow To Use Selenium Successfully
How To Use Selenium Successfully
 
How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)How To Use Selenium Successfully (Java Edition)
How To Use Selenium Successfully (Java Edition)
 
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Into...
 
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...
Introduction to Unit Testing, BDD and Mocking using TestBox & MockBox at Adob...
 
Continuous feature-development
Continuous feature-developmentContinuous feature-development
Continuous feature-development
 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
 
API Testing with Open Source Code and Cucumber
API Testing with Open Source Code and CucumberAPI Testing with Open Source Code and Cucumber
API Testing with Open Source Code and Cucumber
 
Getting Started with Selenium
Getting Started with SeleniumGetting Started with Selenium
Getting Started with Selenium
 
Testing Testing everywhere
Testing Testing everywhereTesting Testing everywhere
Testing Testing everywhere
 
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium MeetupSelenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
Selenium Tips & Tricks, presented at the Tel Aviv Selenium Meetup
 
Automated Developer Testing: Achievements and Challenges
Automated Developer Testing: Achievements and ChallengesAutomated Developer Testing: Achievements and Challenges
Automated Developer Testing: Achievements and Challenges
 
Workshop quality assurance for php projects - phpdublin
Workshop quality assurance for php projects - phpdublinWorkshop quality assurance for php projects - phpdublin
Workshop quality assurance for php projects - phpdublin
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
 
Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully Mastering Test Automation: How to Use Selenium Successfully
Mastering Test Automation: How to Use Selenium Successfully
 
How to use selenium successfully
How to use selenium successfullyHow to use selenium successfully
How to use selenium successfully
 
Plone api
Plone apiPlone api
Plone api
 
Extreme
ExtremeExtreme
Extreme
 

Plus de Pascal Dufour

Happier teams by cesario ramos and pascal dufour
Happier teams by cesario ramos and pascal dufourHappier teams by cesario ramos and pascal dufour
Happier teams by cesario ramos and pascal dufour
Pascal Dufour
 

Plus de Pascal Dufour (9)

Contract testing TestCon 2019
Contract testing TestCon 2019Contract testing TestCon 2019
Contract testing TestCon 2019
 
Meetup How we became Software testing world champion
Meetup How we became Software testing world championMeetup How we became Software testing world champion
Meetup How we became Software testing world champion
 
Road 2 devops at Stater
Road 2 devops  at StaterRoad 2 devops  at Stater
Road 2 devops at Stater
 
Agile testing organizational mindshift
Agile testing organizational mindshiftAgile testing organizational mindshift
Agile testing organizational mindshift
 
A-TDD workshop Testnet
A-TDD workshop Testnet A-TDD workshop Testnet
A-TDD workshop Testnet
 
Happier teams by cesario ramos and pascal dufour
Happier teams by cesario ramos and pascal dufourHappier teams by cesario ramos and pascal dufour
Happier teams by cesario ramos and pascal dufour
 
Think different visualization tools for testers StarEast 2013 pascaldufour
Think different  visualization tools for testers  StarEast 2013 pascaldufourThink different  visualization tools for testers  StarEast 2013 pascaldufour
Think different visualization tools for testers StarEast 2013 pascaldufour
 
Successful testing continuous delivery (Testnet 2013)
Successful testing continuous delivery (Testnet 2013)Successful testing continuous delivery (Testnet 2013)
Successful testing continuous delivery (Testnet 2013)
 
Visibility najaarsevent testnet
Visibility najaarsevent testnetVisibility najaarsevent testnet
Visibility najaarsevent testnet
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Stop coding start testing

  • 1. Stop coding start testing Pascal Dufour & Valerio Barrila
  • 2. Valerio Barrila Tech guy @ninjatux2k Pascal Dufour Test guy @pascal_dufour
  • 3. Agenda • Why and how Minosse is developed • How to create automated checks in Minosse (CucumberJS) • Thoughts behind writing great feature files
  • 4.
  • 6. The new tester Program languages • Groovy • JAVA • NodeJS • Ruby https://www.flickr.com/photos/jdhancock/
  • 7. Easy to switch for testers between projects • One language for test automation across projects • Test written in a uniform style across projects Problems we solved Easy to adapt for new testers • Tests written in a readable language for a techie person • No scripting skills required to write automated tests Easy life for developers • Test implementation code is written once • Bugs and fixes in one place
  • 8. Agenda • Why and how Minosse is developed • How to create automated checks in Minosse (CucumberJS) • Thoughts behind writing great feature files
  • 9.
  • 10. Minosse Generic set of common steps for testingAPI github.com/icemobilelab/minosse
  • 11. Generic set of common steps for testingAPI (ab)-use CucumberJS • Property steps • HTTP steps • Debug steps Minosse
  • 12. Load testdata • Given I set property foo to testdata foo Setting a property • Given I set property foo of request body to number 4 Remove a property • Given I remove property foo Property setting steps
  • 13. Set the request body • Given I set the request body to property foo Set a request header • Given I set the request header bar with value foo Set the request content type • Given I set the request header Content-Type with value multipart/formdata Save the response body • Given I set property foo to the response body Http steps Set requests and save response body
  • 14. Send a request • Given I send a POST request to /foo Sending an HTTPS request • Given I secure the connection with certificate certificate.crt and with key keyFile.key Check the response code • Given the response status code is 200 Http steps sending a request and check
  • 15. Checking if property does not exist • Given I check property foo of response body does not exist Checking the value of a property • Given I check property foo of response body equals number 4 Checking the type of a property • Given I check property foo of response body has type number Checking the format of a property • Given I check property bar has format email Property checking steps
  • 16. Print a property • Given DEBUG I print property foo Debug steps
  • 19. Setup your own environment Install instructions 1. Install NodeJS 2. Clone the api repository `git clone git@github.com:aredo/restcountries.git` 3. Checkout the release 0.1.0 `git checkout tags/0.1.0` 4. cd restcountries && npm install minosse cucumber
  • 20. Or we made an environment for you Install instructions 1. Ask Pascal or Valerio the USB 2. Copy the content somewhere in your machine 3. Import the machine in VirtualBox You can also download the machine here: https://goo.gl/WKXOFk
  • 25. Scenario: Calling Get should return a 200 status code Given I send a GET request to / When the response status code is 200 Assignments 1 add a debug step Then DEBUG I print property response body For handouts see https://goo.gl/OyJuZD
  • 26. Scenario: Calling Get should return a 200 status code Given I send a GET request to / When the response status code is 200 Then DEBUG I print property response body And I check Assignments 2 add a check on the response property message of response body equals string Welcome buddy!
  • 27. Scenario: Calling Get on endpoint /incorrect should return a 404 status code and the message Sorry, that page does not exist Given I send a GET request to /incorrect When the response status code is 404 And I check Assignments 3 check a specific status property message of response body equals string Sorry, that page does not exis
  • 28. Scenario: Calling Get on endpoint api/v1 should return a 200 status code and I check multiple properties. Given I send a GET request to /api/v1 When the response status code is 200 And I check Assignments 4 check a specific value property res.body[0].name equals stringAfghanistan
  • 29. Scenario: I want to show my custom steps
 Given I want to create a custom step Assignments 5 create a custom step
  • 30. Agenda • Why and how Minosse is developed • How to create automated checks in Minosse (CucumberJS) • Thoughts behind writing great feature files
  • 31. What the testers do in the project Create test ideas Review documentation Review tests Create automated testsMaintain tests Exploratory testing Review reports
  • 32. HipChat integration • Developers and Testers in the chat Failure notifications for the team
  • 33. •Created by the team. •Self verifying data for files en test…. •1 test should test 1 thing (single responsibility pattern).  •Exploratory testing is mandatory for a good check •What is implemented is tested. => Test should always reflect implementation. •We use Coverage Report to measure the test coverage. To train ourselves in creating better test. •Everything is reviewed by the someone in the team or by an other team Writing a good feature file
  • 34. @collect-active
 Feature:As a user I want to collect and receive stamps with bonus stamp offers
 @BSO
 Scenario Outline:As a user I want to collect and receive stamps with bso
 Given testdata collect_active is stored as collect ........
 When I send a POST request to /…/………………/active
 Then the response status code is 200
 And check property transactionId of response body is property transactionIdentifier
 And check property newBalance of response body is number <newBalance>
 And check property mutation of response body is number <mutation> Examples:
 |amountSpent |bso |value |newBalance |mutation |
 |10 |Bso1Stamps |1 |2 |2 |
 |10 |Bso100Stamps |1 |101 |101 |
 |20 |Bso1Stamps |7 |9 |9 |
 |10          |BsoLimitedLife |1     |2           |2         |
  • 38. Body text • Bullet Code coverage to change the test
  • 39. special thanks to Jasper Woudenberg Desmond Delissen Ice mobile