SlideShare ist ein Scribd-Unternehmen logo
1 von 31
API Testing
Group 10 – D14CQCPN01
Lecturer: Lê Thị Bích Hòa
Type of API Webservice
 -SOAP
 RESTFUL
What is SOAP?
 SOAP stands for Simple Object Access Protocol. It is a XML-based protocol for
accessing web services..
 SOAP is XML based protocol. It is platform independent and language
independent. By using SOAP, you will be able to interact with other programming
language applications.
What is REST?
 REST stands for REpresentational State Transfer.
 REST is an architectural style not a protocol.
The Difference Beetween SOAP and REST APIs
No. SOAP REST
1 SOAP is a protocol. REST is an architectural style.
2
SOAP stands for Simple Object Access Protocol.
REST stands for REpresentational State Transfer.
3 SOAP can't use REST because it is a protocol. REST can use SOAP web services because it is a concept and can use any
protocol like HTTP, SOAP
4 SOAP uses services interfaces to expose the business
logic
REST uses URI to expose business logic.
5 JAX-WS is the java API for SOAP web services. JAX-RS is the java API for RESTful web services.
6 SOAP defines standards to be strictly followed. REST does not define too much standards like SOAP.
7 SOAP requires more bandwidth and resource than
REST.
REST requires less bandwidth and resource than SOAP.
8 SOAP defines its own security. RESTful web services inherits security measures from the underlying
transport.
9 SOAP permits XML data format only. REST permits different data format such as Plain text, HTML, XML, JSON etc.
10 SOAP is less preferred than REST. REST more preferred than SOAP.
Viewing a Simple SOAP Example
 Example soap: <?xml version = “1.0” encoding =“UTF-8”?>
<id>01</id><name>team10</name>
 Example rest : {
id:”01”,name:
”team 10”
}
What is an API?
What is an API?
- An acronym for Application Programming Interface.
- It enables communication and data exchange between two
separate software systems.
What is an API?
What is API Testing?
- Entirely different from GUI Testing
- This testing won't concentrate on the look and feel of an
application.
- In Api Testing, you use software to send calls to the API, get
output, and note down the system's response.
What is API Testing?
What is API Testing?
Api Testing requires an application to interact with API. In order to test an API, you
will need to
+ Use Testing Tool to drive the API
+ Write your own code to test the API
Set-up of API Test environment
- Required to setup initial environment that invokes API with required set of
parameters and then finally examines the test result.
- This stage, GUI maybe not available.
- Setting up a testing environment for API testing seems a little complex.
- Database and server should be configured as per the application requirements.
- Once the installation is done, API Function should be called to check whether that API is
working.
Types of Output of an API
Output of API could be:
- Any type of data
- Status (say Pass or Fail)
- Call to another API function.
Example:
There is an API function which should add two integer numbers.
- The numbers have to be given as input
parameters.
- The output should be a summation of two integer
numbers.
- This output needs to be verified with expected
outcome.
- Calling needs to be done such as
Exceptions have to be handled if the number is exceeding the integer limit.
Status (say Pass or Fail)
Consider the below API function :
1. Lock()
2. Unlock()
3. Delete()
They return any value such as True (in case of success) or false (In case of error) as an
output.
Maybe need more than one test case, call the functions and check for change of
Database or GUI
Calling of another API / Event
In this case, we call one of the API function which in turn will call another function.
For example - First API function can be used for deleting a specified record in the table
and this function in turn calls another function to REFRESH the database.
Test Cases for API Testing
Return value based on input condition: it is relatively easy to test, as input can be
defined and results can be authenticated
Does not return anything: When there is no return value, behavior of API on the
system to be checked
Trigger some other API/event/interrupt: If output of an API triggers some event or
interrupt, then those events and interrupt listeners should be tracked
Update data structure: Updating data structure will have some outcome or effect on the
system, and that should be authenticated
Modify certain resources: If API call modifies some resources then it should be
validated by accessing respective resources
Approach of API Testing
- Understanding the functionality of the API program and clearly define the scope of the
program
- Apply testing techniques such as equivalence classes, boundary value analysis and error
guessing and write test cases for the API
- Input Parameters for the API need to be planned and defined appropriately
- Execute the test cases and compare expected and actual results.
Difference between API testing and Unit testing
What to test for in API testing
•Discovery testing: The test group should manually execute the set of calls documented in
the API like verifying that a specific resource exposed by the API can be listed, created and
deleted as appropriate
•Usability testing: This testing verifies whether the API is functional and user-friendly. And
does API integrates well with another platform as well
•Security testing: This testing includes what type of authentication is required and whether
sensitive data is encrypted over HTTP or both
•Automated testing: API testing should culminate in the creation of a set of scripts or a tool
that can be used to execute the API regularly
•Documentation: The test team has to make sure that the documentation is adequate and
provides enough information to interact with the API. Documentation should be a part of the
final deliverable
Best Practices of API Testing:
•Test cases should be grouped by test category
•On top each test, you should include the declarations of the APIs being called.
•Parameters selection should be explicitly mentioned in the test case itself
•Prioritize API function calls so that it will be easy for testers to test
•Each test case should be as self-contained and independent from dependencies as possible
•Avoid "test chaining" in your development
•Special care must be taken while handling one time call functions like - Delete, CloseWindow,
etc...
•Call sequencing should be performed and well planned
•To ensure complete test coverage, create test cases for all possible input combinations of the
API.
Types of Bugs that API testing detects
•Fails to handle error conditions gracefully
•Unused flags
•Missing or duplicate functionality
•Reliability Issues. Difficulty in connecting and getting a response from API.
•Security Issues
•Multi-threading issues
•Performance Issues. API response time is very high.
•Improper errors/warning to caller
•Incorrect handling of valid argument values
•Response Data is not structured correctly (JSON or XML)
Tools for API testing
Since API and Unit Testing both target source code, similar tools can
be used for testing both.
•SOAPUI - It's an easy-to-use tool with extensive REST and SOAP
API testing capabilities – no scripting experience is required.
•Runscope
•Postman with jetpacks
•Postman with Newman
•Curl
•Cfix
•Check
•CTESK
•dotTEST
•Eclipse SDK tool- Automated API testing
Check out top API Testing Tools List
Challenges of API Testing
Challenges of API testing includes:
- Main challenges in API testing is Parameter Combination, Parameter Selection, and Call
Sequencing
- There is no GUI available to test the application which makes difficult to give input values
- Validating and Verifying the output in different system is little difficult for testers
- Parameters selection and categorization is required to be known to the testers
- Exception handling function needs to be tested
- Coding knowledge is necessary for testers
DEMO
Demo
Result
Book
Demo
Members:
Nguyễn Duy Huy - N14DCCN029
Tô Xuân Hưởng - N14DCCN178
Nguyễn Duy Khoa - N14DCCN246
Trần Huỳnh Anh Khoa - N14DCCN061
Đồng Văn Sơn - N14DCCN105
Trương Hoàng Vĩnh - N14DCCN121
Trần Phúc Trình - N14DCCN074
Lê Trương Tuấn Nhân - N14DCCN239
Lương Tấn Trọng - N14DCCN051
Đỗ Hoàng Long - N14DCCN300
Võ Nguyễn Thành Lộc - N14DCCN049
Hà Võ Anh Nguyên - N14DCCN256
B4USolution_API-Testing

Weitere ähnliche Inhalte

Was ist angesagt?

An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API TestingSauce Labs
 
API Testing Presentations.pptx
API Testing Presentations.pptxAPI Testing Presentations.pptx
API Testing Presentations.pptxManmitSalunke
 
An introduction to api testing | David Tzemach
An introduction to api testing | David TzemachAn introduction to api testing | David Tzemach
An introduction to api testing | David TzemachDavid Tzemach
 
API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.Andrey Oleynik
 
Reasons To Automate API Testing Process
Reasons To Automate API Testing ProcessReasons To Automate API Testing Process
Reasons To Automate API Testing ProcessQASource
 
Test Design and Automation for REST API
Test Design and Automation for REST APITest Design and Automation for REST API
Test Design and Automation for REST APIIvan Katunou
 
Introduction to APIs & how to automate APIs testing with selenium web driver?
Introduction to APIs & how to automate APIs testing with selenium web driver?Introduction to APIs & how to automate APIs testing with selenium web driver?
Introduction to APIs & how to automate APIs testing with selenium web driver?BugRaptors
 
API_Testing_with_Postman
API_Testing_with_PostmanAPI_Testing_with_Postman
API_Testing_with_PostmanMithilesh Singh
 
Postman Introduction
Postman IntroductionPostman Introduction
Postman IntroductionRahul Agarwal
 
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsRESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsQASymphony
 
Postman: An Introduction for Testers
Postman: An Introduction for TestersPostman: An Introduction for Testers
Postman: An Introduction for TestersPostman
 
API Testing with Frisby and Mocha
API Testing with Frisby and MochaAPI Testing with Frisby and Mocha
API Testing with Frisby and MochaLyudmila Anisimova
 
Postman Webinar: Postman 101
Postman Webinar: Postman 101Postman Webinar: Postman 101
Postman Webinar: Postman 101Nikita Sharma
 
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...Postman
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API TestingBruno Pedro
 

Was ist angesagt? (20)

An Introduction To Automated API Testing
An Introduction To Automated API TestingAn Introduction To Automated API Testing
An Introduction To Automated API Testing
 
API Testing Presentations.pptx
API Testing Presentations.pptxAPI Testing Presentations.pptx
API Testing Presentations.pptx
 
An introduction to api testing | David Tzemach
An introduction to api testing | David TzemachAn introduction to api testing | David Tzemach
An introduction to api testing | David Tzemach
 
API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.
 
API TESTING
API TESTINGAPI TESTING
API TESTING
 
Reasons To Automate API Testing Process
Reasons To Automate API Testing ProcessReasons To Automate API Testing Process
Reasons To Automate API Testing Process
 
Api testing
Api testingApi testing
Api testing
 
Test Design and Automation for REST API
Test Design and Automation for REST APITest Design and Automation for REST API
Test Design and Automation for REST API
 
Introduction to APIs & how to automate APIs testing with selenium web driver?
Introduction to APIs & how to automate APIs testing with selenium web driver?Introduction to APIs & how to automate APIs testing with selenium web driver?
Introduction to APIs & how to automate APIs testing with selenium web driver?
 
API_Testing_with_Postman
API_Testing_with_PostmanAPI_Testing_with_Postman
API_Testing_with_Postman
 
Postman Introduction
Postman IntroductionPostman Introduction
Postman Introduction
 
Belajar Postman test runner
Belajar Postman test runnerBelajar Postman test runner
Belajar Postman test runner
 
RESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and JenkinsRESTful API Testing using Postman, Newman, and Jenkins
RESTful API Testing using Postman, Newman, and Jenkins
 
Postman: An Introduction for Testers
Postman: An Introduction for TestersPostman: An Introduction for Testers
Postman: An Introduction for Testers
 
API Testing with Frisby and Mocha
API Testing with Frisby and MochaAPI Testing with Frisby and Mocha
API Testing with Frisby and Mocha
 
Postman Webinar: Postman 101
Postman Webinar: Postman 101Postman Webinar: Postman 101
Postman Webinar: Postman 101
 
POSTMAN.pptx
POSTMAN.pptxPOSTMAN.pptx
POSTMAN.pptx
 
Postman.ppt
Postman.pptPostman.ppt
Postman.ppt
 
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
POST/CON 2019 Workshop: Testing, Automated Testing, and Reporting APIs with P...
 
How to Automate API Testing
How to Automate API TestingHow to Automate API Testing
How to Automate API Testing
 

Ähnlich wie B4USolution_API-Testing

What is API test automation
What is API test automation What is API test automation
What is API test automation Aparna Sharma
 
Do you know How to Effectively Test APIs.pdf
Do you know How to Effectively Test APIs.pdfDo you know How to Effectively Test APIs.pdf
Do you know How to Effectively Test APIs.pdfAmeliaJonas2
 
Top 20 API Testing Interview Questions.pdf
Top 20 API Testing Interview Questions.pdfTop 20 API Testing Interview Questions.pdf
Top 20 API Testing Interview Questions.pdfAnanthReddy38
 
How To Get Started With API Testing In Your Organization.pdf
How To Get Started With API Testing In Your Organization.pdfHow To Get Started With API Testing In Your Organization.pdf
How To Get Started With API Testing In Your Organization.pdfpcloudy2
 
A Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API TestingA Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API TestingpCloudy
 
Top 11 api testing tools for 2022
Top 11 api testing tools for 2022Top 11 api testing tools for 2022
Top 11 api testing tools for 2022Aparna Sharma
 
Accelerating Software Product Development with API Testing
Accelerating Software Product Development with API TestingAccelerating Software Product Development with API Testing
Accelerating Software Product Development with API TestingMindfire LLC
 
Top 11 API testing tools for 2022
Top 11 API testing tools for 2022Top 11 API testing tools for 2022
Top 11 API testing tools for 2022Aparna Sharma
 
Do’s and don’ts of api testing
Do’s and don’ts of api testingDo’s and don’ts of api testing
Do’s and don’ts of api testingwebomates
 
API Check Overview - Rigor Monitoring
API Check Overview - Rigor MonitoringAPI Check Overview - Rigor Monitoring
API Check Overview - Rigor MonitoringAnthony Ferrari
 
Planet of the APIs: Monitoring Transactions in the Wild
Planet of the APIs: Monitoring Transactions in the WildPlanet of the APIs: Monitoring Transactions in the Wild
Planet of the APIs: Monitoring Transactions in the WildDeborah Schalm
 
Planet of the APIs: Monitoring Transactions in the Wild
Planet of the APIs: Monitoring Transactions in the WildPlanet of the APIs: Monitoring Transactions in the Wild
Planet of the APIs: Monitoring Transactions in the WildDevOps.com
 
5 challenges of api testing and how to overcome
5 challenges of api testing and how to overcome5 challenges of api testing and how to overcome
5 challenges of api testing and how to overcomeTestingXperts
 
What is API Testing Types and Benefits of API Testing.pptx
What is API Testing Types and Benefits of API Testing.pptxWhat is API Testing Types and Benefits of API Testing.pptx
What is API Testing Types and Benefits of API Testing.pptxTest Evolve
 
API Documentation - StudySection
API Documentation - StudySection API Documentation - StudySection
API Documentation - StudySection Study Section
 
API Documentation - StudySection
API Documentation - StudySection API Documentation - StudySection
API Documentation - StudySection Study Section
 

Ähnlich wie B4USolution_API-Testing (20)

What is API test automation
What is API test automation What is API test automation
What is API test automation
 
Webservicex.pdf
Webservicex.pdfWebservicex.pdf
Webservicex.pdf
 
Api Testing.pdf
Api Testing.pdfApi Testing.pdf
Api Testing.pdf
 
Do you know How to Effectively Test APIs.pdf
Do you know How to Effectively Test APIs.pdfDo you know How to Effectively Test APIs.pdf
Do you know How to Effectively Test APIs.pdf
 
Top 20 API Testing Interview Questions.pdf
Top 20 API Testing Interview Questions.pdfTop 20 API Testing Interview Questions.pdf
Top 20 API Testing Interview Questions.pdf
 
How To Get Started With API Testing In Your Organization.pdf
How To Get Started With API Testing In Your Organization.pdfHow To Get Started With API Testing In Your Organization.pdf
How To Get Started With API Testing In Your Organization.pdf
 
A Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API TestingA Practical Guide to Automating End-to-End API Testing
A Practical Guide to Automating End-to-End API Testing
 
API testing - Japura.pptx
API testing - Japura.pptxAPI testing - Japura.pptx
API testing - Japura.pptx
 
Top 11 api testing tools for 2022
Top 11 api testing tools for 2022Top 11 api testing tools for 2022
Top 11 api testing tools for 2022
 
Accelerating Software Product Development with API Testing
Accelerating Software Product Development with API TestingAccelerating Software Product Development with API Testing
Accelerating Software Product Development with API Testing
 
Top 11 API testing tools for 2022
Top 11 API testing tools for 2022Top 11 API testing tools for 2022
Top 11 API testing tools for 2022
 
What is API Testing_ .pdf
What is API Testing_ .pdfWhat is API Testing_ .pdf
What is API Testing_ .pdf
 
Do’s and don’ts of api testing
Do’s and don’ts of api testingDo’s and don’ts of api testing
Do’s and don’ts of api testing
 
API Check Overview - Rigor Monitoring
API Check Overview - Rigor MonitoringAPI Check Overview - Rigor Monitoring
API Check Overview - Rigor Monitoring
 
Planet of the APIs: Monitoring Transactions in the Wild
Planet of the APIs: Monitoring Transactions in the WildPlanet of the APIs: Monitoring Transactions in the Wild
Planet of the APIs: Monitoring Transactions in the Wild
 
Planet of the APIs: Monitoring Transactions in the Wild
Planet of the APIs: Monitoring Transactions in the WildPlanet of the APIs: Monitoring Transactions in the Wild
Planet of the APIs: Monitoring Transactions in the Wild
 
5 challenges of api testing and how to overcome
5 challenges of api testing and how to overcome5 challenges of api testing and how to overcome
5 challenges of api testing and how to overcome
 
What is API Testing Types and Benefits of API Testing.pptx
What is API Testing Types and Benefits of API Testing.pptxWhat is API Testing Types and Benefits of API Testing.pptx
What is API Testing Types and Benefits of API Testing.pptx
 
API Documentation - StudySection
API Documentation - StudySection API Documentation - StudySection
API Documentation - StudySection
 
API Documentation - StudySection
API Documentation - StudySection API Documentation - StudySection
API Documentation - StudySection
 

Mehr von b4usolution .

Agile_Scrum_B4USolution.pptx
Agile_Scrum_B4USolution.pptxAgile_Scrum_B4USolution.pptx
Agile_Scrum_B4USolution.pptxb4usolution .
 
2022_Bài 10_Thiết kế hệ thống thông tin trong logistics_Ths.Lê Thị Bích Hòa.pptx
2022_Bài 10_Thiết kế hệ thống thông tin trong logistics_Ths.Lê Thị Bích Hòa.pptx2022_Bài 10_Thiết kế hệ thống thông tin trong logistics_Ths.Lê Thị Bích Hòa.pptx
2022_Bài 10_Thiết kế hệ thống thông tin trong logistics_Ths.Lê Thị Bích Hòa.pptxb4usolution .
 
2022_Bài 9_Những vấn đề cơ bản về hệ thống thông tin trong logistics_Ths.Lê T...
2022_Bài 9_Những vấn đề cơ bản về hệ thống thông tin trong logistics_Ths.Lê T...2022_Bài 9_Những vấn đề cơ bản về hệ thống thông tin trong logistics_Ths.Lê T...
2022_Bài 9_Những vấn đề cơ bản về hệ thống thông tin trong logistics_Ths.Lê T...b4usolution .
 
2022_Bài 8_Một số ứng dụng TMDT khác và An Ninh TMDT_Ths.Lê Thị Bích Hòa.pptx
2022_Bài 8_Một số ứng dụng TMDT khác và An Ninh TMDT_Ths.Lê Thị Bích Hòa.pptx2022_Bài 8_Một số ứng dụng TMDT khác và An Ninh TMDT_Ths.Lê Thị Bích Hòa.pptx
2022_Bài 8_Một số ứng dụng TMDT khác và An Ninh TMDT_Ths.Lê Thị Bích Hòa.pptxb4usolution .
 
Agile_Scrum_B4USolution.pptx
Agile_Scrum_B4USolution.pptxAgile_Scrum_B4USolution.pptx
Agile_Scrum_B4USolution.pptxb4usolution .
 
B4USolution_Sexy qtest manager and automation tools to apply for full stack t...
B4USolution_Sexy qtest manager and automation tools to apply for full stack t...B4USolution_Sexy qtest manager and automation tools to apply for full stack t...
B4USolution_Sexy qtest manager and automation tools to apply for full stack t...b4usolution .
 
Sexy Using Cucumber - BDD in your project
Sexy Using Cucumber - BDD in your projectSexy Using Cucumber - BDD in your project
Sexy Using Cucumber - BDD in your projectb4usolution .
 
B4usolution_AI for automation
B4usolution_AI for automationB4usolution_AI for automation
B4usolution_AI for automationb4usolution .
 
b4usolution_Appium Mobile Automation Testing Made Awesome
b4usolution_AppiumMobile Automation Testing Made Awesomeb4usolution_AppiumMobile Automation Testing Made Awesome
b4usolution_Appium Mobile Automation Testing Made Awesomeb4usolution .
 
B4 u solution_writing test cases from user stories and acceptance criteria
B4 u solution_writing test cases from user stories and acceptance criteriaB4 u solution_writing test cases from user stories and acceptance criteria
B4 u solution_writing test cases from user stories and acceptance criteriab4usolution .
 
B4usolution git git-hub
B4usolution git git-hubB4usolution git git-hub
B4usolution git git-hubb4usolution .
 
Select the right automation test tool in agile project
Select the right automation test tool in agile projectSelect the right automation test tool in agile project
Select the right automation test tool in agile projectb4usolution .
 
Introduction to blazemeter and jmeter
Introduction to blazemeter and jmeterIntroduction to blazemeter and jmeter
Introduction to blazemeter and jmeterb4usolution .
 

Mehr von b4usolution . (15)

Agile_Scrum_B4USolution.pptx
Agile_Scrum_B4USolution.pptxAgile_Scrum_B4USolution.pptx
Agile_Scrum_B4USolution.pptx
 
2022_Bài 10_Thiết kế hệ thống thông tin trong logistics_Ths.Lê Thị Bích Hòa.pptx
2022_Bài 10_Thiết kế hệ thống thông tin trong logistics_Ths.Lê Thị Bích Hòa.pptx2022_Bài 10_Thiết kế hệ thống thông tin trong logistics_Ths.Lê Thị Bích Hòa.pptx
2022_Bài 10_Thiết kế hệ thống thông tin trong logistics_Ths.Lê Thị Bích Hòa.pptx
 
2022_Bài 9_Những vấn đề cơ bản về hệ thống thông tin trong logistics_Ths.Lê T...
2022_Bài 9_Những vấn đề cơ bản về hệ thống thông tin trong logistics_Ths.Lê T...2022_Bài 9_Những vấn đề cơ bản về hệ thống thông tin trong logistics_Ths.Lê T...
2022_Bài 9_Những vấn đề cơ bản về hệ thống thông tin trong logistics_Ths.Lê T...
 
2022_Bài 8_Một số ứng dụng TMDT khác và An Ninh TMDT_Ths.Lê Thị Bích Hòa.pptx
2022_Bài 8_Một số ứng dụng TMDT khác và An Ninh TMDT_Ths.Lê Thị Bích Hòa.pptx2022_Bài 8_Một số ứng dụng TMDT khác và An Ninh TMDT_Ths.Lê Thị Bích Hòa.pptx
2022_Bài 8_Một số ứng dụng TMDT khác và An Ninh TMDT_Ths.Lê Thị Bích Hòa.pptx
 
Agile_Scrum_B4USolution.pptx
Agile_Scrum_B4USolution.pptxAgile_Scrum_B4USolution.pptx
Agile_Scrum_B4USolution.pptx
 
B4USolution_Sexy qtest manager and automation tools to apply for full stack t...
B4USolution_Sexy qtest manager and automation tools to apply for full stack t...B4USolution_Sexy qtest manager and automation tools to apply for full stack t...
B4USolution_Sexy qtest manager and automation tools to apply for full stack t...
 
Sexy Using Cucumber - BDD in your project
Sexy Using Cucumber - BDD in your projectSexy Using Cucumber - BDD in your project
Sexy Using Cucumber - BDD in your project
 
B4usolution_AI for automation
B4usolution_AI for automationB4usolution_AI for automation
B4usolution_AI for automation
 
b4usolution_Appium Mobile Automation Testing Made Awesome
b4usolution_AppiumMobile Automation Testing Made Awesomeb4usolution_AppiumMobile Automation Testing Made Awesome
b4usolution_Appium Mobile Automation Testing Made Awesome
 
B4 u solution_writing test cases from user stories and acceptance criteria
B4 u solution_writing test cases from user stories and acceptance criteriaB4 u solution_writing test cases from user stories and acceptance criteria
B4 u solution_writing test cases from user stories and acceptance criteria
 
B4usolution git git-hub
B4usolution git git-hubB4usolution git git-hub
B4usolution git git-hub
 
Selenium IDE
Selenium IDESelenium IDE
Selenium IDE
 
Appium testing api
Appium testing apiAppium testing api
Appium testing api
 
Select the right automation test tool in agile project
Select the right automation test tool in agile projectSelect the right automation test tool in agile project
Select the right automation test tool in agile project
 
Introduction to blazemeter and jmeter
Introduction to blazemeter and jmeterIntroduction to blazemeter and jmeter
Introduction to blazemeter and jmeter
 

Kürzlich hochgeladen

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
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 TerraformAndrey Devyatkin
 
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.pptxHampshireHUG
 
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 WorkerThousandEyes
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
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.pdfhans926745
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
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 FresherRemote DBA Services
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 

Kürzlich hochgeladen (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 
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
 
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
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
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
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 

B4USolution_API-Testing

  • 1. API Testing Group 10 – D14CQCPN01 Lecturer: Lê Thị Bích Hòa
  • 2. Type of API Webservice  -SOAP  RESTFUL
  • 3. What is SOAP?  SOAP stands for Simple Object Access Protocol. It is a XML-based protocol for accessing web services..  SOAP is XML based protocol. It is platform independent and language independent. By using SOAP, you will be able to interact with other programming language applications.
  • 4. What is REST?  REST stands for REpresentational State Transfer.  REST is an architectural style not a protocol.
  • 5. The Difference Beetween SOAP and REST APIs No. SOAP REST 1 SOAP is a protocol. REST is an architectural style. 2 SOAP stands for Simple Object Access Protocol. REST stands for REpresentational State Transfer. 3 SOAP can't use REST because it is a protocol. REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP 4 SOAP uses services interfaces to expose the business logic REST uses URI to expose business logic. 5 JAX-WS is the java API for SOAP web services. JAX-RS is the java API for RESTful web services. 6 SOAP defines standards to be strictly followed. REST does not define too much standards like SOAP. 7 SOAP requires more bandwidth and resource than REST. REST requires less bandwidth and resource than SOAP. 8 SOAP defines its own security. RESTful web services inherits security measures from the underlying transport. 9 SOAP permits XML data format only. REST permits different data format such as Plain text, HTML, XML, JSON etc. 10 SOAP is less preferred than REST. REST more preferred than SOAP.
  • 6. Viewing a Simple SOAP Example  Example soap: <?xml version = “1.0” encoding =“UTF-8”?> <id>01</id><name>team10</name>  Example rest : { id:”01”,name: ”team 10” }
  • 7. What is an API?
  • 8. What is an API? - An acronym for Application Programming Interface. - It enables communication and data exchange between two separate software systems.
  • 9. What is an API?
  • 10. What is API Testing? - Entirely different from GUI Testing - This testing won't concentrate on the look and feel of an application. - In Api Testing, you use software to send calls to the API, get output, and note down the system's response.
  • 11. What is API Testing?
  • 12. What is API Testing? Api Testing requires an application to interact with API. In order to test an API, you will need to + Use Testing Tool to drive the API + Write your own code to test the API
  • 13. Set-up of API Test environment - Required to setup initial environment that invokes API with required set of parameters and then finally examines the test result. - This stage, GUI maybe not available. - Setting up a testing environment for API testing seems a little complex. - Database and server should be configured as per the application requirements. - Once the installation is done, API Function should be called to check whether that API is working.
  • 14. Types of Output of an API Output of API could be: - Any type of data - Status (say Pass or Fail) - Call to another API function.
  • 15. Example: There is an API function which should add two integer numbers. - The numbers have to be given as input parameters. - The output should be a summation of two integer numbers. - This output needs to be verified with expected outcome. - Calling needs to be done such as Exceptions have to be handled if the number is exceeding the integer limit.
  • 16. Status (say Pass or Fail) Consider the below API function : 1. Lock() 2. Unlock() 3. Delete() They return any value such as True (in case of success) or false (In case of error) as an output. Maybe need more than one test case, call the functions and check for change of Database or GUI
  • 17. Calling of another API / Event In this case, we call one of the API function which in turn will call another function. For example - First API function can be used for deleting a specified record in the table and this function in turn calls another function to REFRESH the database.
  • 18. Test Cases for API Testing Return value based on input condition: it is relatively easy to test, as input can be defined and results can be authenticated Does not return anything: When there is no return value, behavior of API on the system to be checked Trigger some other API/event/interrupt: If output of an API triggers some event or interrupt, then those events and interrupt listeners should be tracked Update data structure: Updating data structure will have some outcome or effect on the system, and that should be authenticated Modify certain resources: If API call modifies some resources then it should be validated by accessing respective resources
  • 19. Approach of API Testing - Understanding the functionality of the API program and clearly define the scope of the program - Apply testing techniques such as equivalence classes, boundary value analysis and error guessing and write test cases for the API - Input Parameters for the API need to be planned and defined appropriately - Execute the test cases and compare expected and actual results.
  • 20. Difference between API testing and Unit testing
  • 21. What to test for in API testing •Discovery testing: The test group should manually execute the set of calls documented in the API like verifying that a specific resource exposed by the API can be listed, created and deleted as appropriate •Usability testing: This testing verifies whether the API is functional and user-friendly. And does API integrates well with another platform as well •Security testing: This testing includes what type of authentication is required and whether sensitive data is encrypted over HTTP or both •Automated testing: API testing should culminate in the creation of a set of scripts or a tool that can be used to execute the API regularly •Documentation: The test team has to make sure that the documentation is adequate and provides enough information to interact with the API. Documentation should be a part of the final deliverable
  • 22. Best Practices of API Testing: •Test cases should be grouped by test category •On top each test, you should include the declarations of the APIs being called. •Parameters selection should be explicitly mentioned in the test case itself •Prioritize API function calls so that it will be easy for testers to test •Each test case should be as self-contained and independent from dependencies as possible •Avoid "test chaining" in your development •Special care must be taken while handling one time call functions like - Delete, CloseWindow, etc... •Call sequencing should be performed and well planned •To ensure complete test coverage, create test cases for all possible input combinations of the API.
  • 23. Types of Bugs that API testing detects •Fails to handle error conditions gracefully •Unused flags •Missing or duplicate functionality •Reliability Issues. Difficulty in connecting and getting a response from API. •Security Issues •Multi-threading issues •Performance Issues. API response time is very high. •Improper errors/warning to caller •Incorrect handling of valid argument values •Response Data is not structured correctly (JSON or XML)
  • 24. Tools for API testing Since API and Unit Testing both target source code, similar tools can be used for testing both. •SOAPUI - It's an easy-to-use tool with extensive REST and SOAP API testing capabilities – no scripting experience is required. •Runscope •Postman with jetpacks •Postman with Newman •Curl •Cfix •Check •CTESK •dotTEST •Eclipse SDK tool- Automated API testing Check out top API Testing Tools List
  • 25. Challenges of API Testing Challenges of API testing includes: - Main challenges in API testing is Parameter Combination, Parameter Selection, and Call Sequencing - There is no GUI available to test the application which makes difficult to give input values - Validating and Verifying the output in different system is little difficult for testers - Parameters selection and categorization is required to be known to the testers - Exception handling function needs to be tested - Coding knowledge is necessary for testers
  • 26. DEMO
  • 28. Book
  • 29. Demo
  • 30. Members: Nguyễn Duy Huy - N14DCCN029 Tô Xuân Hưởng - N14DCCN178 Nguyễn Duy Khoa - N14DCCN246 Trần Huỳnh Anh Khoa - N14DCCN061 Đồng Văn Sơn - N14DCCN105 Trương Hoàng Vĩnh - N14DCCN121 Trần Phúc Trình - N14DCCN074 Lê Trương Tuấn Nhân - N14DCCN239 Lương Tấn Trọng - N14DCCN051 Đỗ Hoàng Long - N14DCCN300 Võ Nguyễn Thành Lộc - N14DCCN049 Hà Võ Anh Nguyên - N14DCCN256