Skip to content

Sample API test automation project with Mocha and Chai

Notifications You must be signed in to change notification settings

kafziel4/mocha-chai-api-tests

Repository files navigation

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published