Skip to content

In this repository FakestoreAPI which is a free api for practice have been tested using Postman tool.

Notifications You must be signed in to change notification settings

MubeenAhmadShaikh/FakestoreAPI-Automation-Postman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

FakestoreAPI Automation

The FakestoreAPI Automation project is an efficient solution built to automate the testing of the FakestoreAPI, a popular online e-commerce API. Leveraging a powerful combination of Postman, JavaScript, Newman Reporting and Jenkins this project brings automation, scalability, and reliability to the API testing process.

Run Locally in Postman

  • Clone the Project
git clone https://github.com/MubeenAhmadShaikh/FakestoreAPI-Automation-Postman.git
  • Import the global workspace json file 'workspace.postman_global.json'
  • Import the collection in Postman you want to run [Products | User | Cart]
  • Download the csv data files [products_data.csv | user_data.csv | cart_data.csv]
  • Select the products collection and click on Run select the products_data.csv file and preview it once
  • Run the collection
  • Results will displayed with all the tests

Run Locally using Newman

Dependencies

Newman Nodejs newman-reporter-htmlextra

  • Clone the Project
git clone https://github.com/MubeenAhmadShaikh/FakestoreAPI-Automation-Postman.git
  • Go to the project directory
cd FakestoreAPIAutomation
  • Go to specific collection directory
cd products_collection
  • Run the collection using following command
newman run Products.postman_collection.json -d products_data.csv -g workspace.postman_globals.json
  • For reports add the following
newman run Products.postman_collection.json -d products_data.csv -g workspace.postman_globals.json -r htmlxtra

Run Locally in Jenkins

Dependencies

Java Jenkins.war

  • Clone the project
git clone https://github.com/MubeenAhmadShaikh/FakestoreAPI-Automation-Postman.git
  • Go to the project directory
cd FakestoreAPIAutomation
  • Start the Jenkins server
java -jar jenkins.war
  • Access the jenkins server on localhost using your port_number
http://localhost:port_number/
  • Create a new job and give the project name FakestoreAPI
  • Configure the job scroll to Build step and click on add build step
  • Select Execute shell for MacOS and Execute windows bash command for windows
  • Add following commands
cd C:\working_directory\FakeStoreAPIAutomation\cart_collection
newman run Cart.postman_collection.json -d cart_data.csv -g workspace.postman_globals.json -r htmlextra
  • Click on Build now to run the collection

Arguments of commands

Parameter Option Description
newman run required Newman command to run the tests from CLI
-d optional For providing the data files
-g optional For providing the global env json file
-r optional For providing the reports
htmlextra optional To generate the reports

Features

  • GET, POST, PUT, PATCH, DELETE APIs Tested
  • API Test Automation
  • RestAPIs Testing
  • HTML Reporting
  • Schema Validation
  • Response data Validation
  • Data driven tests
  • End-to-end tests

Developed using

  • Postman
  • JavaScript
  • Newman
  • Jenkins

🛠 Skills

JavaScript Automation Testing API Testing Postman API Testing RESTapi Jenkins Newman Newman Html reports

About

In this repository FakestoreAPI which is a free api for practice have been tested using Postman tool.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages