SlideShare una empresa de Scribd logo
1 de 33
API Automation Testing
Using Retrofit & Cucumber
June 2, 2018
Axon Active Vietnam - https://www.axonactive.com
Axon Active Da Nang - Axon Vibe Automation Team
June 2, 2018 Basel Department - Automation Team 2
Axon Vibe Automation Team
Agenda
• Context – How the Future of Test Automation Affects You
• Techniques – Introduce Cucumber & Retrofit 2
• Demo – Project Demo and Mini Demo
• Practices – Assignment for Audience
• Q&A
June 2, 2018 Basel Department - Automation Team 3
Context
June 2, 2018 Basel Department - Automation Team 4
Context
June 2, 2018 Basel Department - Automation Team 5
Context
June 2, 2018 Basel Department - Automation Team 6
Cucumber
What is Behaviors Driven Development?
June 2, 2018 Basel Department - Automation Team 7
Cucumber
Examples
Scenario: get all articles
When requesting get all articles
Then the request get all articles successfully
Scenario: create an article
When requesting create an article
Then the request creating an article successfully
June 2, 2018 Basel Department - Automation Team 8
Cucumber
What are the benefits?
• It is helpful to involve business
stakeholders who can't easily read
code
• Cucumber focuses on end-user
experience
• Style of writing tests allow for
easier reuse of code in the tests
• Quick and easy set up and
execution
• Efficient tool for testing
June 2, 2018 Basel Department - Automation Team 9
Retrofit 2
What is Retrofit?
• Retrofit is a type-safe HTTP client for Android
and Java
• Developed by Square, Inc.
June 2, 2018 Basel Department - Automation Team 10
How to use Retrofit
June 2, 2018 Basel Department - Automation Team 11
How to use Retrofit
June 2, 2018 Basel Department - Automation Team 12
How to use Retrofit
June 2, 2018 Basel Department - Automation Team 13
How to use Retrofit
June 2, 2018 Basel Department - Automation Team 14
• Interface to declare HTTP request
• Object to map with returned JSON data
• Retrofit builder
How to use Retrofit
June 2, 2018 Basel Department - Automation Team 15
Interface
How to use Retrofit
Interface
June 2, 2018 Basel Department - Automation Team 16
How to use Retrofit
June 2, 2018 Basel Department - Automation Team 17
• Interface to declare HTTP request
• Object to map with returned JSON data
• Retrofit builder
How to use Retrofit
June 2, 2018 Basel Department - Automation Team 18
How to use Retrofit
Object
June 2, 2018 Basel Department - Automation Team 19
How to use Retrofit
June 2, 2018 Basel Department - Automation Team 20
• Interface to declare HTTP request
• Object to map with returned JSON data
• Retrofit builder
How to use Retrofit
Adapter
June 2, 2018 Basel Department - Automation Team 21
How to use Retrofit
Interface
June 2, 2018 Basel Department - Automation Team 22
How to use Retrofit
Instantiate an implement of interface class
June 2, 2018 Basel Department - Automation Team 23
How to use Retrofit
Send request to API
June 2, 2018 Basel Department - Automation Team 24
Mini - Demo
Structure of
Framework:
June 2, 2018 Basel Department - Automation Team 25
Mini - Demo
Configure url in local.properties file to build baseURL
June 2, 2018 Basel Department - Automation Team 26
Mini - Demo
Workflow of
Framework:
June 2, 2018 Basel Department - Automation Team 27
Practices
URL - http://dummy.restapiexample.com
June 2, 2018 Basel Department - Automation Team 28
Practices
Feature: Employee
As a user, I want to update and delete information for
employee
Scenario: Update Employee - PUT: v1/update/{id}
Scenario: Delete Employee - DELETE: v1/delete/{id}
June 2, 2018 Basel Department - Automation Team 29
Assignment
Practices
Gitlab to get codebase:
https://gitlab.com/ttthu.dsna/api-automation-retrofit
June 2, 2018 Basel Department - Automation Team 30
Practices
Push your code on Jenkins to build
June 2, 2018 Basel Department - Automation Team 31
June 2, 2018 Basel Department - Automation Team 32
June 2, 2018 Basel Department - Automation Team 33

Más contenido relacionado

La actualidad más candente

Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...
Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...
Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...
Flink Forward
 

La actualidad más candente (20)

2018-10-23 7 C - Using Graph API to read outlook mail for accounting - Hansam...
2018-10-23 7 C - Using Graph API to read outlook mail for accounting - Hansam...2018-10-23 7 C - Using Graph API to read outlook mail for accounting - Hansam...
2018-10-23 7 C - Using Graph API to read outlook mail for accounting - Hansam...
 
Microsoft Graph – Subscription API
Microsoft Graph – Subscription APIMicrosoft Graph – Subscription API
Microsoft Graph – Subscription API
 
Portfolio Craft
Portfolio CraftPortfolio Craft
Portfolio Craft
 
What's New in the Javascript API - Developers Forum - AC18
What's New in the Javascript API - Developers Forum - AC18What's New in the Javascript API - Developers Forum - AC18
What's New in the Javascript API - Developers Forum - AC18
 
All About Angular and ArcGIS - Developers Forum - AC18
All About Angular and ArcGIS - Developers Forum - AC18All About Angular and ArcGIS - Developers Forum - AC18
All About Angular and ArcGIS - Developers Forum - AC18
 
.NET Fest 2019. Roberto Freato. Azure App Service deep dive
.NET Fest 2019. Roberto Freato. Azure App Service deep dive.NET Fest 2019. Roberto Freato. Azure App Service deep dive
.NET Fest 2019. Roberto Freato. Azure App Service deep dive
 
Sprint 37 review
Sprint 37 reviewSprint 37 review
Sprint 37 review
 
Apiary
ApiaryApiary
Apiary
 
Airflow 4 manager
Airflow 4 managerAirflow 4 manager
Airflow 4 manager
 
Esriuk_track5_discover_usemakeshare
Esriuk_track5_discover_usemakeshareEsriuk_track5_discover_usemakeshare
Esriuk_track5_discover_usemakeshare
 
Rack middlewares - ins outs
Rack middlewares - ins outsRack middlewares - ins outs
Rack middlewares - ins outs
 
Sprint 84
Sprint 84Sprint 84
Sprint 84
 
LF_APIStrat17_Getting Your API House In Order
LF_APIStrat17_Getting Your API House In OrderLF_APIStrat17_Getting Your API House In Order
LF_APIStrat17_Getting Your API House In Order
 
Task Scheduler Presentation
Task Scheduler PresentationTask Scheduler Presentation
Task Scheduler Presentation
 
Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...
Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...
Flink Forward Berlin 2018: Ravi Suhag & Sumanth Nakshatrithaya - "Managing Fl...
 
Graph API Strategies: CQRS for the API Economy
Graph API Strategies: CQRS for the API EconomyGraph API Strategies: CQRS for the API Economy
Graph API Strategies: CQRS for the API Economy
 
Introduction to GraphQL & Serverless
Introduction to GraphQL & ServerlessIntroduction to GraphQL & Serverless
Introduction to GraphQL & Serverless
 
URS in Dynamics 365
URS in Dynamics 365URS in Dynamics 365
URS in Dynamics 365
 
"草APIサービス" Pixela を作った話
"草APIサービス" Pixela を作った話"草APIサービス" Pixela を作った話
"草APIサービス" Pixela を作った話
 
Getting into the flow building applications with reactive streams
Getting into the flow building applications with reactive streamsGetting into the flow building applications with reactive streams
Getting into the flow building applications with reactive streams
 

Similar a [DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber

SharePoint development evolution from classic to app
SharePoint development evolution from classic to appSharePoint development evolution from classic to app
SharePoint development evolution from classic to app
Marco Rizzi
 
DAY1- DAY2Netweaver gateway
DAY1- DAY2Netweaver gatewayDAY1- DAY2Netweaver gateway
DAY1- DAY2Netweaver gateway
Gaurav Ahluwalia
 
DAY1- DAY2Netweaver gateway
DAY1- DAY2Netweaver gatewayDAY1- DAY2Netweaver gateway
DAY1- DAY2Netweaver gateway
Gaurav Ahluwalia
 

Similar a [DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber (20)

Real User Monitoring con Navigation Timing API, Tag Manager e Google Analytics
Real User Monitoring con Navigation Timing API, Tag Manager e Google AnalyticsReal User Monitoring con Navigation Timing API, Tag Manager e Google Analytics
Real User Monitoring con Navigation Timing API, Tag Manager e Google Analytics
 
SharePoint development evolution from classic to app
SharePoint development evolution from classic to appSharePoint development evolution from classic to app
SharePoint development evolution from classic to app
 
Resume
ResumeResume
Resume
 
Experience in Magento Community Projects
Experience in Magento Community ProjectsExperience in Magento Community Projects
Experience in Magento Community Projects
 
RESTful Day 6
RESTful Day 6RESTful Day 6
RESTful Day 6
 
Distributed Point-in-Time Recovery with Postgres | PGConf.Russia 2018 | Eren ...
Distributed Point-in-Time Recovery with Postgres | PGConf.Russia 2018 | Eren ...Distributed Point-in-Time Recovery with Postgres | PGConf.Russia 2018 | Eren ...
Distributed Point-in-Time Recovery with Postgres | PGConf.Russia 2018 | Eren ...
 
Presentatie - Exploring the details of APEX sessions.pdf
Presentatie - Exploring the details of APEX sessions.pdfPresentatie - Exploring the details of APEX sessions.pdf
Presentatie - Exploring the details of APEX sessions.pdf
 
Icinga Camp New York 2018 - Icinga2 and Elastic
Icinga Camp New York 2018 - Icinga2 and ElasticIcinga Camp New York 2018 - Icinga2 and Elastic
Icinga Camp New York 2018 - Icinga2 and Elastic
 
UI5con 2017 - UI5 Components - More Performance...
UI5con 2017 - UI5 Components - More Performance...UI5con 2017 - UI5 Components - More Performance...
UI5con 2017 - UI5 Components - More Performance...
 
Using Retrofit framework in implementation of Android REST client (Presentation)
Using Retrofit framework in implementation of Android REST client (Presentation)Using Retrofit framework in implementation of Android REST client (Presentation)
Using Retrofit framework in implementation of Android REST client (Presentation)
 
Google Cloud: Next'19 Extended Hanoi
Google Cloud: Next'19 Extended HanoiGoogle Cloud: Next'19 Extended Hanoi
Google Cloud: Next'19 Extended Hanoi
 
RIPE Atlas Tools for Operators and IXPs
RIPE Atlas Tools for Operators and IXPsRIPE Atlas Tools for Operators and IXPs
RIPE Atlas Tools for Operators and IXPs
 
Using REST and UI Testing to Test Ajax Web Applications
Using REST and UI Testing to Test Ajax Web ApplicationsUsing REST and UI Testing to Test Ajax Web Applications
Using REST and UI Testing to Test Ajax Web Applications
 
DAY1- DAY2Netweaver gateway
DAY1- DAY2Netweaver gatewayDAY1- DAY2Netweaver gateway
DAY1- DAY2Netweaver gateway
 
DAY1- DAY2Netweaver gateway
DAY1- DAY2Netweaver gatewayDAY1- DAY2Netweaver gateway
DAY1- DAY2Netweaver gateway
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Icinga Camp Bangalore - Icinga integrations
Icinga Camp Bangalore - Icinga integrationsIcinga Camp Bangalore - Icinga integrations
Icinga Camp Bangalore - Icinga integrations
 
Write Serverless Applications with PowerShell and Azure Functions
Write Serverless Applications with PowerShell and Azure FunctionsWrite Serverless Applications with PowerShell and Azure Functions
Write Serverless Applications with PowerShell and Azure Functions
 
Android Development with Kotlin, Part 2 - Internet Services and JSON
Android Development with Kotlin, Part 2 - Internet Services and JSONAndroid Development with Kotlin, Part 2 - Internet Services and JSON
Android Development with Kotlin, Part 2 - Internet Services and JSON
 
Custom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQLCustom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQL
 

Más de Scrum Breakfast Vietnam

Más de Scrum Breakfast Vietnam (20)

[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...
[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...
[Scrum Breakfast DN] Is it possible to make 100% Unit Test coverage for your ...
 
Zero to hero in agile automation testing
Zero to hero in agile automation testingZero to hero in agile automation testing
Zero to hero in agile automation testing
 
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019
Retrospective Toolbox - HCMC Scrum Breakfast - 30/11/2019
 
UI/UX Design in Agile process
UI/UX Design in Agile process  UI/UX Design in Agile process
UI/UX Design in Agile process
 
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019
Team building in the Infinite game - HCMC Scrum Breakfast - 28/09/2019
 
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019
Design Thinking in Solving Problem - HCMC Scrum Breakfast - July 27, 2019
 
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019
Make your Scrum team great again - DN Scrum Breakfast - June 21, 2019
 
Working as a remote team - HCM Scrum Breakfast - May 25, 2019
Working as a remote team - HCM Scrum Breakfast - May 25, 2019Working as a remote team - HCM Scrum Breakfast - May 25, 2019
Working as a remote team - HCM Scrum Breakfast - May 25, 2019
 
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
Reactive programming by spring webflux - DN Scrum Breakfast - Nov 2018
 
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...
Benefits of BPMN in Software Development - DN Scrum Breakfast - September 29,...
 
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
CSS Flexbox and Grid: The future of website layouts - DN Scrum Breakfast - Au...
 
Automation Testing in Agile - HCM Scrum Breakfast - July 2018
Automation Testing in Agile - HCM Scrum Breakfast - July 2018Automation Testing in Agile - HCM Scrum Breakfast - July 2018
Automation Testing in Agile - HCM Scrum Breakfast - July 2018
 
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)
[HCM Scrum Breakfast - April 2018] Teamwork: The Leader Job (Pt.1)
 
[DN Scrum Breakfast] Effective Cloud Computing
[DN Scrum Breakfast] Effective Cloud Computing[DN Scrum Breakfast] Effective Cloud Computing
[DN Scrum Breakfast] Effective Cloud Computing
 
[HCM Scrum Breakfast - January 2018] ElasticSearch In Action
[HCM Scrum Breakfast - January 2018] ElasticSearch In Action[HCM Scrum Breakfast - January 2018] ElasticSearch In Action
[HCM Scrum Breakfast - January 2018] ElasticSearch In Action
 
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
[DN Scrum Breakfast] Automation E2E Testing with Chimp Framework and WebdriverIO
 
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016
[DN Scrum Breakfast] Scrum Master, do we really need one_by Nam Dang_Mar2016
 
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
[DN Scrum Breakfast] Protractor: E2E Testing for AngularJS (by Thuy Nguyen)
 
[Da Nang Scrum Breakfast] Angular Tour
[Da Nang Scrum Breakfast] Angular Tour[Da Nang Scrum Breakfast] Angular Tour
[Da Nang Scrum Breakfast] Angular Tour
 
[HCM Scrum Breakfast - June 2017] Distributed Team
[HCM Scrum Breakfast - June 2017] Distributed Team[HCM Scrum Breakfast - June 2017] Distributed Team
[HCM Scrum Breakfast - June 2017] Distributed Team
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Último (20)

Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

[DN Scrum Breakfast] API Automation Testing Using Retrofit & Cucumber

  • 1. API Automation Testing Using Retrofit & Cucumber June 2, 2018 Axon Active Vietnam - https://www.axonactive.com Axon Active Da Nang - Axon Vibe Automation Team
  • 2. June 2, 2018 Basel Department - Automation Team 2 Axon Vibe Automation Team
  • 3. Agenda • Context – How the Future of Test Automation Affects You • Techniques – Introduce Cucumber & Retrofit 2 • Demo – Project Demo and Mini Demo • Practices – Assignment for Audience • Q&A June 2, 2018 Basel Department - Automation Team 3
  • 4. Context June 2, 2018 Basel Department - Automation Team 4
  • 5. Context June 2, 2018 Basel Department - Automation Team 5
  • 6. Context June 2, 2018 Basel Department - Automation Team 6
  • 7. Cucumber What is Behaviors Driven Development? June 2, 2018 Basel Department - Automation Team 7
  • 8. Cucumber Examples Scenario: get all articles When requesting get all articles Then the request get all articles successfully Scenario: create an article When requesting create an article Then the request creating an article successfully June 2, 2018 Basel Department - Automation Team 8
  • 9. Cucumber What are the benefits? • It is helpful to involve business stakeholders who can't easily read code • Cucumber focuses on end-user experience • Style of writing tests allow for easier reuse of code in the tests • Quick and easy set up and execution • Efficient tool for testing June 2, 2018 Basel Department - Automation Team 9
  • 10. Retrofit 2 What is Retrofit? • Retrofit is a type-safe HTTP client for Android and Java • Developed by Square, Inc. June 2, 2018 Basel Department - Automation Team 10
  • 11. How to use Retrofit June 2, 2018 Basel Department - Automation Team 11
  • 12. How to use Retrofit June 2, 2018 Basel Department - Automation Team 12
  • 13. How to use Retrofit June 2, 2018 Basel Department - Automation Team 13
  • 14. How to use Retrofit June 2, 2018 Basel Department - Automation Team 14 • Interface to declare HTTP request • Object to map with returned JSON data • Retrofit builder
  • 15. How to use Retrofit June 2, 2018 Basel Department - Automation Team 15 Interface
  • 16. How to use Retrofit Interface June 2, 2018 Basel Department - Automation Team 16
  • 17. How to use Retrofit June 2, 2018 Basel Department - Automation Team 17 • Interface to declare HTTP request • Object to map with returned JSON data • Retrofit builder
  • 18. How to use Retrofit June 2, 2018 Basel Department - Automation Team 18
  • 19. How to use Retrofit Object June 2, 2018 Basel Department - Automation Team 19
  • 20. How to use Retrofit June 2, 2018 Basel Department - Automation Team 20 • Interface to declare HTTP request • Object to map with returned JSON data • Retrofit builder
  • 21. How to use Retrofit Adapter June 2, 2018 Basel Department - Automation Team 21
  • 22. How to use Retrofit Interface June 2, 2018 Basel Department - Automation Team 22
  • 23. How to use Retrofit Instantiate an implement of interface class June 2, 2018 Basel Department - Automation Team 23
  • 24. How to use Retrofit Send request to API June 2, 2018 Basel Department - Automation Team 24
  • 25. Mini - Demo Structure of Framework: June 2, 2018 Basel Department - Automation Team 25
  • 26. Mini - Demo Configure url in local.properties file to build baseURL June 2, 2018 Basel Department - Automation Team 26
  • 27. Mini - Demo Workflow of Framework: June 2, 2018 Basel Department - Automation Team 27
  • 28. Practices URL - http://dummy.restapiexample.com June 2, 2018 Basel Department - Automation Team 28
  • 29. Practices Feature: Employee As a user, I want to update and delete information for employee Scenario: Update Employee - PUT: v1/update/{id} Scenario: Delete Employee - DELETE: v1/delete/{id} June 2, 2018 Basel Department - Automation Team 29 Assignment
  • 30. Practices Gitlab to get codebase: https://gitlab.com/ttthu.dsna/api-automation-retrofit June 2, 2018 Basel Department - Automation Team 30
  • 31. Practices Push your code on Jenkins to build June 2, 2018 Basel Department - Automation Team 31
  • 32. June 2, 2018 Basel Department - Automation Team 32
  • 33. June 2, 2018 Basel Department - Automation Team 33

Notas del editor

  1. Divide everyone to 5 groups and send link to get source code for them Guide them to config to run source code
  2. Most software testing right now is done by manual testers, while automation represents no more than 30% of testing.  Also notice that of the automated testing done, the vast majority of it is UI testing. http://typescriptprotractor.blogspot.com
  3. Most software testing right now is done by manual testers, while automation represents no more than 30% of testing.  Also notice that of the automated testing done, the vast majority of it is UI testing. http://typescriptprotractor.blogspot.com