Skip to content

chrispsheehan/nodejs-api-bdd-test-framework

Repository files navigation

NodejsAPITestFramework

Purgomalum 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

Getting started

Run the tests

npm run build

npm run test

or with a filter

tags=@sweary npm run filter-test

Run the tests (in Docker)

docker build -t node-box .
docker run -e CI=true node-box

or with filters

docker run -e CI=true node-box --tags=@sweary

Filter tests

Documentation found here Examples filters;

"(@sweary or @notsweary)"
"@sweary"
"(@sweary and not @notsweary)"

Expected output

....................

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' }                          │
└──────────────────────────────────────────────────────────────────────────┘