Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/automation-test-starter/supertest-jest-demo

a SuperTest API automation testing demo project with JEST
https://github.com/automation-test-starter/supertest-jest-demo

api-testing demo jest jest-html-reporters quickstart supertest

Last synced: 14 days ago
JSON representation

a SuperTest API automation testing demo project with JEST

Awesome Lists containing this project

README

        


πŸ‡¨πŸ‡³δΈ­ζ–‡ | πŸ‡¬πŸ‡§English

# SuperTest-Jest-demo
a SuperTest API automation testing demo project with Jest

## Environment preparation
- Nodejs, I'm using v21.1.0.
- SuperTest, I'm using version 6.3.3.
- Jest, I'm using the latest version 29.7.0.

## Tech stack
- SuperTest
- Jest
- jest-html-reporters
- GitHub action

## Project structure

```Text
SuperTest-Jest-demo
β”œβ”€β”€ README.md
β”œβ”€β”€ package.json
β”œβ”€β”€ package-lock.json
β”œβ”€β”€ Config // TEST configuration file
β”‚ └── config.js
β”œβ”€β”€ Config // TEST data file
β”‚ └── requestData.js
β”‚ └── responseData.js
β”œβ”€β”€ Specs // TEST case file
β”‚ └── test.spec.js
β”œβ”€β”€ Utils // TEST tool file
β”‚ └── utils.js
β”œβ”€β”€ Report // TEST report file
β”‚ └── report.html
β”œβ”€β”€ .gitignore
└── node_modules // Project dependencies
```

## HOW TO RUN

```bash
node run test
```
## Test report screenshot

![12ZreT](https://cdn.jsdelivr.net/gh/naodeng/blogimg@master/uPic/12ZreT.png)

## Add API test cases

- Just add a new test case in the Specs directory.

## More info

- [Project Tutorial](https://github.com/Automation-Test-Starter/SuperTest-API-Test-Starter)