kafziel4 / mocha-chai-api-tests

Sample API test automation project with Mocha and Chai

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mocha Chai API Tests

Node.js TypeScript Mocha Chai Axios GitHub Actions

A sample API test automation project in TypeScript, using Mocha, Chai, Axios, and Mochawesome.

ReqRes

The API chosen for testing was ReqRes. It simulates how a real application behaves, is highly available and accessible from anywhere. For more information, visit their website here.

How it works

The project uses Mocha as the test framework, Chai as the assertion library, Axios as the HTTP client to perform API requests, and Mochawesome to generate HTML reports.
A workflow is set up to install Node.js, install the required packages, run the tests, and publish the HTML report to GitHub Pages. The report can be viewed here.

report

How to run it

  • Install Node.js
  • Install the project packages: npm install
  • Run the tests: npm test

mocha

About

Sample API test automation project with Mocha and Chai


Languages

Language:TypeScript 98.2%Language:JavaScript 1.4%Language:Shell 0.4%