Skip to content

Commit b5e73ec

Browse files
authored
Updated README.md file
1 parent e88b41b commit b5e73ec

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

README.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,38 @@
1-
# api-testing-axios-mocha-chai-javascript
2-
This is sample REST API Automation framework designed using Axios, Mocha, Chai, and JavaScript
1+
---
2+
# API Automation using Axios, Mocha, Chai and JavaScript Setup Guide
3+
---
4+
5+
## Getting started
6+
7+
### Pre-requisites
8+
* Download and install Node.js
9+
* Download and install any Text Editor like Visual Code/Sublime/Brackets
10+
11+
### Setup Visual Code
12+
* Install GitLens Extension from the Marketplace: `GitLens — Git supercharged by GitKraken`
13+
* Install vscode-icons from the Marketplace: `vscode-icons`
14+
* Go to Visual Code Preference > Setting and search `formatOnSave` and enable/ON it.
15+
16+
### Setup Scripts
17+
* Clone the repository into a folder
18+
* Go to Project root directory and install Dependency: `npm install`
19+
* All the dependencies from package.json would be installed in node_modules folder.
20+
21+
### How to write Test
22+
* Add new test under `api-tests` folder
23+
* Name the file as <testname>.js (e.g. get_request.js)
24+
25+
### How to Run Test
26+
* Go to Project root directory and run command: `npm test`
27+
* If you want to run api tests then run command: `npx mocha --recursive api-tests/*.js --timeout 10000 --reporter mochawesome`
28+
29+
### How to Update local npm packages
30+
* Go to Project root directory and run command: `npm update`
31+
32+
### How to view HTML report
33+
* Go to Project root directory: `./mochawesome-report/mochawesome.html`
34+
35+
### Sample Test Results
36+
![API Automation using Axios, Mocha, Chai and JavaScript Test Report](./assets/test-results.png?raw=true "API Automation using Axios, Mocha, Chai and JavaScript Test Report")
37+
38+
![API Automation using Axios, Mocha, Chai and JavaScript Test Report Detailed View](./assets/test-results-detailed-view.png?raw=true "API Automation using Axios, Mocha, Chai and JavaScript Test Report Detailed View")

0 commit comments

Comments
 (0)