✨ API Automation Testing using Cypress and Javascript ✨
What will be used on this project
Item | Source |
---|---|
Editor | VS Code (https://code.visualstudio.com/download) |
Package Manager | NPM (https://docs.npmjs.com/downloading-and-installing-node-js-and-npm) |
API Test Tools | Cypress (https://docs.cypress.io/guides/getting-started/installing-cypress) |
Test Reporter | Mochawesome (https://www.npmjs.com/package/mochawesome) |
Browser | Latest version of Chrome / Mozilla Firefox / Edge |
Install VS Code Editor and NPM.
To check whether you already installed NPM & Node.js
npm --version
node --version
👉 Clone this Repository through Terminal or Command Prompt
Open this Automation Project using VS Code Editor.
Change to Project directory on Terminal or Command Prompt
cd CypressAPITest
Install Cypress
npm install cypress --save-dev
Run Test Execution on Terminal
npx cypress run
Video of the Test Execution available on MyCypressTest/cypress/videos/
Run Test Execution via Browser
npx cypress open
Install Mochawesome Reporter
npm install --save-dev mochawesome mochawesome-merge
Run Cypress with the Reporter
Note: Please wait until all test execution finished
npx cypress run --reporter mochawesome
OR
npm run test
Merge the reports into a single one
npm run test:merge
Convert the JSON into HTML Report
npm run test:report
Test Execution HTML Report available on CypressAPITest/report.html