Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sadabnepal/graphql-ts-mocha-test
GraphQL API Test framework using TypeScript supertest library and mocha framework
https://github.com/sadabnepal/graphql-ts-mocha-test
api-testing-framework graphql supertest-mocha-chai test-automation-framework typescript
Last synced: about 1 month ago
JSON representation
GraphQL API Test framework using TypeScript supertest library and mocha framework
- Host: GitHub
- URL: https://github.com/sadabnepal/graphql-ts-mocha-test
- Owner: sadabnepal
- Created: 2023-06-24T13:55:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-09T13:22:32.000Z (10 months ago)
- Last Synced: 2024-03-09T14:23:46.584Z (10 months ago)
- Topics: api-testing-framework, graphql, supertest-mocha-chai, test-automation-framework, typescript
- Language: TypeScript
- Homepage:
- Size: 715 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
Awesome Lists containing this project
README
# GraphQL API Automation Test framework
This is boilerplate project to show how we can automate graphql api using supertest | axios | pactum
![header](./samples//GraphQL_banner.png)## Requirements:
[![NodeJs](https://img.shields.io/badge/-NodeJS-%23339933?logo=npm)](https://nodejs.org/en/download/)
[![VSCode](https://img.shields.io/badge/-Visual%20Studio%20Code-%233178C6?logo=visual-studio-code)](https://code.visualstudio.com/download)## Getting Started:
Clone Repository
```bash
1. git clone https://github.com/sadabnepal/graphql-ts-mocha-test.git
2. Navigate to graphql-ts-mocha-test
```Install the dependencies
```bash
npm install
```API Sources
```ini
https://demo.vendure.io/shop-api [GraphQl]
https://demo.vendure.io/ [web app]
```Run tests and Generate Report
```bash
npm test [run all tests]
```## Key Features:
- 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## Folder structure:
```ini
├───.vscode
| └───settings.json
├───samples
├───test
| ├───env
| ├───helper
| ├───helper
| ├───payload
| ├───specs
| └───types
├───.gitignore
├───package-lock.json
├───package.json
├───README.md
└───tsconfig.json
```## Sample Report:
![image](./samples/report.png)