Sample Cucumber Test Framework for anyone and everyone
Install NodeJS >=8.3
npm install
- ENVIRONMENT - (string) test environment
- GRID - (bool) true will use the selenium grid, false will run locally
- PLATFORM - (string) browser name - chrome, ie, firefox, iPhone 5, etc...
- SELENIUM_GRID_IP - (string) ip address of the selenium grid
- CUCUMBER_PARALLEL_WORKERS (cuke_skywalker only) - number of parallel workers
Environment variables are a big part of configuration how to run the tests
Examples: Run all tests against local
ENVIRONMENT=local PLATFORM=chrome node ./node_modules/.bin/cucumber-js
or
npm test
Run @wip tests against local
ENVIRONMENT=local PLATFORM=chrome node ./node_module/.bin/cucumber-js -t @wip
This will run all tests against test2
. The environment and platform are controlled by environment variables.
ENVIRONMENT=sandbox PLATFORM=firefox npm test
You can add normal cucumber parameters after a pair of hyphens.
npm test -- features/googleSearch.feature:3
- @mute - turning off test (any reason other than flakiness)
- @quarantine - turning off flake test
TODO
- Install cross-env to set your environment variables
npm install -g cross-env
- If running a specific test tag the test @wip and use
cross-env ENVIRONMENT=test2 PLATFORM=chrome npm run test-wip
*note that you can edit this to your hearts desire in the package.json