https://github.com/chrispsheehan/nodejs-api-bdd-test-framework
BDD test framework for API tests.
https://github.com/chrispsheehan/nodejs-api-bdd-test-framework
api bdd docker javascript nodejs qa test-framework
Last synced: about 1 month ago
JSON representation
BDD test framework for API tests.
- Host: GitHub
- URL: https://github.com/chrispsheehan/nodejs-api-bdd-test-framework
- Owner: chrispsheehan
- Created: 2021-01-04T16:54:07.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-02-01T20:46:50.000Z (about 2 years ago)
- Last Synced: 2023-03-06T09:25:36.032Z (about 2 years ago)
- Topics: api, bdd, docker, javascript, nodejs, qa, test-framework
- Language: TypeScript
- Homepage:
- Size: 369 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NodejsAPITestFramework
[Purgomalum](https://www.purgomalum.com/) is a simple, free RESTful web service for filtering and removing content of profanity, obscenity and other unwanted text.
This is a test automation framework written against it.
## Resources
- [cucumber.js](https://github.com/cucumber/cucumber-js)
- [Chai](https://www.chaijs.com/)
- [SuperTest](https://github.com/visionmedia/supertest)### Getting started
- [Install Docker](https://www.docker.com/products/docker-desktop)
- [Install Node.js](https://nodejs.org/en/)
- [Clone this repositiry to your machine](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/cloning-a-repository)### Run the tests
```bash
npm run buildnpm run test
```or with a filter
```bash
tags=@sweary npm run filter-test
```### Run the tests (in Docker)
```bash
docker build -t node-box .
``````bash
docker run -e CI=true node-box
```or with filters
```bash
docker run -e CI=true node-box --tags=@sweary
```### Filter tests
Documentation found [here](https://cucumber.io/docs/cucumber/api/#tag-expressions)
Examples filters;```bash
"(@sweary or @notsweary)"
"@sweary"
"(@sweary and not @notsweary)"
```#### Expected output
```bash
....................4 scenarios (4 passed)
12 steps (12 passed)
0m00.013s (executing steps: 0m00.003s)
┌──────────────────────────────────────────────────────────────────────────┐
│ Share your Cucumber Report with your team at https://reports.cucumber.io │
│ │
│ Command line option: --publish │
│ Environment variable: CUCUMBER_PUBLISH_ENABLED=true │
│ │
│ More information at https://reports.cucumber.io/docs/cucumber-js │
│ │
│ To disable this message, add this to your ./cucumber.js: │
│ module.exports = { default: '--publish-quiet' } │
└──────────────────────────────────────────────────────────────────────────┘
```