This is boilerplate project to show how we can automate graphql api using supertest | axios | pactum
Clone Repository
1. git clone https://github.com/sadabnepal/graphql-ts-mocha-test.git
2. Navigate to graphql-ts-mocha-test
Install the dependencies
npm install
API Sources
https://demo.vendure.io/shop-api [GraphQl]
https://demo.vendure.io/ [web app]
Run tests and Generate Report
npm test [run all tests]
- GraphQL API Testing
- Request and Response log to report
- Multi environment support using dotenv
- Type support for better code intellisense
- Supertest and Axios api test boilerplate codes
├───.vscode
| └───settings.json
├───samples
├───test
| ├───env
| ├───helper
| ├───helper
| ├───payload
| ├───specs
| └───types
├───.gitignore
├───package-lock.json
├───package.json
├───README.md
└───tsconfig.json