https://github.com/philmander/cucumber-api-demo
Cucumber.js setup for testing API endpoints with Supertest and Open API specs
https://github.com/philmander/cucumber-api-demo
Last synced: 3 months ago
JSON representation
Cucumber.js setup for testing API endpoints with Supertest and Open API specs
- Host: GitHub
- URL: https://github.com/philmander/cucumber-api-demo
- Owner: philmander
- License: mit
- Created: 2018-07-28T12:11:13.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-07-28T15:32:21.000Z (almost 7 years ago)
- Last Synced: 2025-01-10T21:48:55.563Z (5 months ago)
- Language: JavaScript
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# cucumber-api-demo
Cucumber.js setup for testing API endpoints with Supertest and Open API specs.
This repo is a proof of comcept.
## Install
`npm install`
## Usage
Start the server:
`npm start`
Then run the tests:
`npm test`
## How it works
1. Cucumber runs features files.
2. Step definitons execute, using [SuperAgent](https://visionmedia.github.io/superagent/) to send HTTP requests
3. Response bodies are asserted using Chai against example data defined in the API's Open API spec.