This repo contains CucumberJS tests for Coffee-machine application with Testomat.io plugins
This is a playground for your first steps in testing, so instead of installing it from NPM it is recommended to clone it from repo instead.
- Clone this repository
git clone git@github.com:testomatio/examples.git && cd examples/cucumber
- Install dependencies via npm:
npm i
This will install cucumber & Testomat.io reporter
- Create empty project in Testomat.io
- Obtain API key from Testomat.io
- Run
npx check-cucumberto upload tests data into testomat.io. Pass api key asTESTOMATIOenvironment variable:
TESTOMATIO={apiKey} npx check-cucumber -d features
Environment variables It is recommended to store Testomatio API Key as environment variable and never save it in the source code. Set them directly when running tests or use dotenv package to save environment variable in a file and load them for tests.
Get API key from a project in Testomat.io and set it as environment variable TESTOMATIO:
TESTOMATIO={apiKey} ./node_modules/.bin/cucumber-js --format ./node_modules/@testomatio/reporter/lib/adapter/cucumber.js