1.5.0 • Published 11 months ago

crayond-bdd-alpha v1.5.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

BDD

BDD is a way for software teams to work that closes the gap between business people and technical people by:

  • Encouraging collaboration across roles to build shared understanding of the problem to be solved
  • Working in rapid, small iterations to increase feedback and the flow of value
  • Producing system documentation that is automatically checked against the system’s behaviour

We are using Codecept & Cucumber to implement automated tests based on scenarios described in the Gherkin feature files.

Codecept

CodeceptJS is a modern end to end testing framework with a special BDD-style syntax.

Cucumber

Cucumber can be used to implement automated tests based on scenarios described in the Gherkin feature files.

Project Structure

bdd
├─ .gitignore
├─ codecept.conf.js - codecept configuration file - To know more - https://codecept.io/configuration/#configuration
├─ features - Feature files will be placed here
│  └─ testing.feature - Example feature
├─ generateHTML.js - This will generate the html report based on the report.json generated by the codeceptjs-cucumber-json-reporter
└─ react-playground - To test the step definitions locally
└─ output - cucumber's output.json and screenshots will be outputted here
├─ jsconfig.json
├─ package-lock.json
├─ package.json
├─ README.md
└─ step_definitions
   └─ steps.js - All the step definitions are written here

Getting Started

To run the test,

npm run test
# or
yarn test

To generate the HTML report,

npm run generatereport
# or
yarn generatereport

To run the test in headless mode,

npm run codeceptjs:headless
# or
yarn codeceptjs:headless