GithubHelp home page GithubHelp logo

codewithmmak / api-testing-axios-mocha-chai-javascript Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 1.0 300 KB

This is sample REST API Automation framework designed using Axios, Mocha, Chai, and JavaScript

License: MIT License

JavaScript 100.00%
axios-http chai fakerjs javascript mocha mocha-chai mochawesome rimraf properties-reader api-testing-framework

api-testing-axios-mocha-chai-javascript's Introduction


API Automation using Axios, Mocha, Chai and JavaScript Setup Guide


Getting started

Pre-requisites

  • Download and install Node.js
  • Download and install any Text Editor like Visual Code/Sublime/Brackets

Setup Visual Code

  • Install GitLens Extension from the Marketplace: GitLens โ€” Git supercharged by GitKraken
  • Install vscode-icons from the Marketplace: vscode-icons
  • Go to Visual Code Preference > Setting and search formatOnSave and enable/ON it.

Setup Scripts

  • Clone the repository into a folder
  • Go to Project root directory and install Dependency: npm install
  • All the dependencies from package.json would be installed in node_modules folder.

How to write Test

  • Add new test under api-tests folder
  • Name the file as .js (e.g. get_request.js)

How to Run Test

  • Go to Project root directory and run command: npm test
  • If you want to run api tests then run command: npx mocha --recursive api-tests/*.js --timeout 10000 --reporter mochawesome

How to Update local npm packages

  • Go to Project root directory and run command: npm update

How to view HTML report

  • Go to Project root directory: ./mochawesome-report/mochawesome.html

Sample Test Results

API Automation using Axios, Mocha, Chai and JavaScript Test Report

API Automation using Axios, Mocha, Chai and JavaScript Test Report Detailed View

api-testing-axios-mocha-chai-javascript's People

Contributors

codewithmmak avatar renovate[bot] avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

kiranigs

api-testing-axios-mocha-chai-javascript's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

npm
package.json
  • @faker-js/faker ^8.0.2
  • axios ^1.4.0
  • chai ^4.3.7
  • mocha ^10.2.0
  • mochawesome ^7.1.3
  • properties-reader ^2.2.0
  • rimraf ^5.0.1

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.