jlin412 / CypressCucumberAPIDemo

API testing with https://gorest.co.in/ using Cypress & Cucumber

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cypress-Cucumber-API-Demo


This repo contains API Testing with https://gorest.co.in/ using Cypress & Cucumber in Javascript.

Author: Tam Pham (Kyle)


Instruction:

  1. Clone this Repo and open using Visual Studio Code
  2. Open Terminal inside Visual Studio Code and run [ npm install ] to install required packages (Make sure your machine got node.js + npm, more information: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm)
  3. Open Terminal inside Visual Studio Code, Run command [ npx cypress run ] to start Cypress in Headless mode, let it run and finish by itself
  4. After Cypress finished with the test, it will generate a Video file contains the run + generate a report file name as CucumberAPITesting.cucumber.json (Screenshot 2)
  5. In Terminal, run command [ npm run cy:report ] in order to generate a new report file in .html extension
  6. The report file will be inside ./crypress/cucumber-report and be name as [ index.html ], open it with a browser of your choice (Screenshot 3)

CucumberAPITesting.feature (Screenshot 1) image

Folder structure (Screenshot 2) image

Cucumber Report (Screenshot 3) image

About

API testing with https://gorest.co.in/ using Cypress & Cucumber


Languages

Language:HTML 89.8%Language:JavaScript 9.1%Language:Gherkin 1.2%