Skip to content

Automation-Test-Starter/SuperTest-Jest-demo

Repository files navigation

🇨🇳中文 | 🇬🇧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

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

node run test

Test report screenshot

12ZreT

Add API test cases

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

More info