SlideShare a Scribd company logo
API Testing libraries
using JavaScript - An
Overview
Monika Sharma Ankur Jain
WHAT IS API?
An API is a set of programming code that enables data transmission between one software
product and another.
It also contains the terms of this data exchange.
WHAT QUESTION ARE WE TRYING TO ANSWER?
Let’s talk about API testing
WHAT DOES “FAILURE” MEAN?
From individual API calls to user scenarios
https://martinfowler.com/bliki/TestPyramid.html
– 4xx or 5xx error code
– Received data invalid
– Response time inadequate
Test run fails :
– one or multiple scenario failure
Request fails :
With passing time, we lose the ability to detect changes in API use cases and
business knowledge which tie them to specific code or architectural decisions.
WHEN TO START?
API TESTING IN THE WILD
A Selection of Testing Libraries, Frameworks and Their Attributes
Attributes Frisby Chakram SuperTest
LANGUAGE JavaScript JavaScript JavaScript
FREE TO USE
REQUEST METHOD SUPPORT Only for CRUD All Request Methods All Request Methods
EXCEPTION HANDLING
Api testing libraries using java script   an overview
FRISBY?
A light-weight javascript based framework built on
top of Jest.
Frisby.js uses Jasmine style assertion syntax and uses
Jest to run tests.
PREREQUISITE
● Basic knowledge of JavaScript
FEATURES
● Supports CRUD Request Methods
● Setup and Global Setup
● File Upload
● Inspectors
INSPECTORS
To get more information about the HTTP request, response, body, JSON, etc.
ASSERTIONS
ANATOMY OF A TEST
Protocol Configuration
Assertions
User Scenarios
Requests
SETUP
● IDE (VSCode or IntelliJ)
● API Collection (Either Hosted or Mock)
● Install Libraries (refer next slide)
TEST RUNNER
A given run of a suite, tests, hooks, reporters etc (uses an instance of a Runnable).
Different Test Runners: Jest, Mocha, AVA ..
INSTALLATION
Install Reporting Library npm install jest-html-reporter --save-dev
Install Testing Library
Install Test Runner
npm install --save-dev frisby
npm install -g jest
Initiate Node Project npm init
Verify Node and NPM
Installation
node -v
npm -v
TEST THE REST!
OTHER AVAILABLE OPTIONS
● Node-Fetch
● Pactum
● Chakram
● SuperTest
● Cypress
● Axios
KEY TAKEAWAY
● Learnt about API’s
● How to get started with Frisby or any JS based library
● Comparison between different Libraries
RESOURCES
https://docs.frisbyjs.com/
https://medium.com/@monikashrma/javascript-laboratory-api-automation-with-frisby-js-5520137cd0c3
QUESTIONS
EXERCISE
1. Clone the Repository -
git clone https://github.com/msharma-tw/api-frameworks-js.git
1. Goto URL - https://reqres.in/
And test via Postman first
GET
POST
PUT
DELETE
1. Write the test for the above mentioned calls by utilising the cloned Repo
1. Add assertions to validate status, response, response schema
THANK YOU
Monika Sharma Ankur Jain

More Related Content

PPTX
Test automation Frame Works
PDF
vodQA Pune (2019) - Browser automation using dev tools
PPTX
Increase automation to rest
PDF
Increase automation to rest
PPTX
Protractor for angularJS
PPTX
Better End-to-End Testing with Page Objects Model using Protractor
PPTX
Angular Unit Testing
PDF
Cypress - Best Practices
Test automation Frame Works
vodQA Pune (2019) - Browser automation using dev tools
Increase automation to rest
Increase automation to rest
Protractor for angularJS
Better End-to-End Testing with Page Objects Model using Protractor
Angular Unit Testing
Cypress - Best Practices

What's hot (20)

PPTX
Protractor training
PPTX
Introduction to cypress in Angular (Chinese)
PPTX
PPTX
Cypress first impressions
PPTX
Protractor survival guide
PPTX
How to make your functional tests really quick
PPTX
Progressive Web App Testing With Cypress.io
PPTX
Develop a Basic REST API from Scratch Using TDD with Val Karpov
PDF
AngularJS and Protractor
ODP
Fabulous Tests on Spock and Groovy
PDF
Testing Web Services - QA or the Highway 2016
PDF
Web Services Automated Testing via SoapUI Tool
PPTX
Selenium with protractor
PPT
Selenium
PPTX
Основы нагрузочного тестирования с инструментом Jmeter
PDF
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
PPTX
Single Page Applications: Your Browser is the OS!
PPTX
test_automation_POC
PPTX
ASP.NET MVC Best Practices malisa ncube
PPT
Ppt of soap ui
Protractor training
Introduction to cypress in Angular (Chinese)
Cypress first impressions
Protractor survival guide
How to make your functional tests really quick
Progressive Web App Testing With Cypress.io
Develop a Basic REST API from Scratch Using TDD with Val Karpov
AngularJS and Protractor
Fabulous Tests on Spock and Groovy
Testing Web Services - QA or the Highway 2016
Web Services Automated Testing via SoapUI Tool
Selenium with protractor
Selenium
Основы нагрузочного тестирования с инструментом Jmeter
Cypress vs Selenium WebDriver: Better, Or Just Different? -- by Gil Tayar
Single Page Applications: Your Browser is the OS!
test_automation_POC
ASP.NET MVC Best Practices malisa ncube
Ppt of soap ui
Ad

Similar to Api testing libraries using java script an overview (20)

PDF
Web API Test Automation using Frisby & Node.js
PDF
Web API Test Automation Using Frisby & Node.js
PPTX
Frisby Api automation
PPTX
API Testing with Frisby and Mocha
PDF
API Testing
PDF
Professional API Testing | Secure and Efficient APIs
PPTX
Asynchronous API Testing: Trends, Tools & More | Calidad Infotech
PPTX
Test Design and Automation for REST API
PDF
What is API Testing? A Comprehensive Guide
PDF
Accelerating Software Product Development with API Testing
PDF
How To Get Started With API Testing In Your Organization.pdf
PDF
5 levels of api test automation
PPTX
Frisby.js - Give it a Toss
PDF
JS Lab`16. Сергей Селецкий: "Ретроспектива тестирования JavaScript"
PPTX
Web API testing : A quick glance
PPTX
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
PDF
Top 11 API testing tools for 2022
PDF
API Testing Interview Questions PDF By ScholarHat
PPTX
API Documentation - StudySection
PPTX
API Documentation - StudySection
Web API Test Automation using Frisby & Node.js
Web API Test Automation Using Frisby & Node.js
Frisby Api automation
API Testing with Frisby and Mocha
API Testing
Professional API Testing | Secure and Efficient APIs
Asynchronous API Testing: Trends, Tools & More | Calidad Infotech
Test Design and Automation for REST API
What is API Testing? A Comprehensive Guide
Accelerating Software Product Development with API Testing
How To Get Started With API Testing In Your Organization.pdf
5 levels of api test automation
Frisby.js - Give it a Toss
JS Lab`16. Сергей Селецкий: "Ретроспектива тестирования JavaScript"
Web API testing : A quick glance
Ivan Katunov. Comaqa Spring 2018. Test Design and Automation for Rest API.
Top 11 API testing tools for 2022
API Testing Interview Questions PDF By ScholarHat
API Documentation - StudySection
API Documentation - StudySection
Ad

More from vodQA (20)

PPTX
Performance Testing
PPTX
Testing Strategy in Micro Frontend architecture
PPTX
Testing face authentication on mobile
PPTX
Testing cna
PPTX
Etl engine testing with scala
PPTX
EDA for QAs
PPTX
vodQA Pune (2019) - Augmented reality overview and testing challenges
PPTX
vodQA Pune (2019) - Testing AI,ML applications
PPTX
vodQA Pune (2019) - Design patterns in test automation
PPTX
vodQA Pune (2019) - Testing ethereum smart contracts
PPTX
vodQA Pune (2019) - Insights into big data testing
PDF
vodQA Pune (2019) - Performance testing cloud deployments
PDF
vodQA Pune (2019) - Jenkins pipeline As code
PPTX
vodQA(Pune) 2018 - Consumer driven contract testing using pact
PPTX
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
PPTX
vodQA(Pune) 2018 - Enhancing the capabilities of testing team preparing for...
PPTX
vodQA(Pune) 2018 - QAing the security way
PPTX
vodQA(Pune) 2018 - Docker in Testing
PPTX
Mobile automation using appium.pptx
PPTX
An approach to app security - For beginners
Performance Testing
Testing Strategy in Micro Frontend architecture
Testing face authentication on mobile
Testing cna
Etl engine testing with scala
EDA for QAs
vodQA Pune (2019) - Augmented reality overview and testing challenges
vodQA Pune (2019) - Testing AI,ML applications
vodQA Pune (2019) - Design patterns in test automation
vodQA Pune (2019) - Testing ethereum smart contracts
vodQA Pune (2019) - Insights into big data testing
vodQA Pune (2019) - Performance testing cloud deployments
vodQA Pune (2019) - Jenkins pipeline As code
vodQA(Pune) 2018 - Consumer driven contract testing using pact
vodQA(Pune) 2018 - Visual testing of web apps in headless environment manis...
vodQA(Pune) 2018 - Enhancing the capabilities of testing team preparing for...
vodQA(Pune) 2018 - QAing the security way
vodQA(Pune) 2018 - Docker in Testing
Mobile automation using appium.pptx
An approach to app security - For beginners

Recently uploaded (20)

PDF
Encapsulation theory and applications.pdf
PDF
KodekX | Application Modernization Development
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Electronic commerce courselecture one. Pdf
PPTX
Cloud computing and distributed systems.
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
Big Data Technologies - Introduction.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Encapsulation theory and applications.pdf
KodekX | Application Modernization Development
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Per capita expenditure prediction using model stacking based on satellite ima...
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Electronic commerce courselecture one. Pdf
Cloud computing and distributed systems.
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Chapter 3 Spatial Domain Image Processing.pdf
Unlocking AI with Model Context Protocol (MCP)
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Network Security Unit 5.pdf for BCA BBA.
Big Data Technologies - Introduction.pptx
Approach and Philosophy of On baking technology
Understanding_Digital_Forensics_Presentation.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

Api testing libraries using java script an overview