Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BDD with CucumberJS and JavaScript

A practical project demonstrating Behavior-Driven Development (BDD) with CucumberJS, JavaScript, Gherkin specifications, and continuous integration through GitHub Actions.

The example validates age-based business rules while showing how executable specifications can connect business expectations to automated verification.

What this project demonstrates

  • Scenarios written in Gherkin
  • Given–When–Then behavior specification
  • Step definitions implemented with CucumberJS
  • Separation between business rules and test scenarios
  • Automated execution in GitHub Actions
  • Shared understanding between product, development, and QA

Project structure

qa.bdd-cucumberjs.javascript/
├── .github/
│   └── workflows/
│       └── ci.yml
├── features/
│   ├── steps/
│   │   └── pessoa.js
│   ├── pessoa.feature
│   └── cucumber.js
├── pessoa.js
├── package.json
└── README.md

Installation

git clone https://github.com/DiegoJOFernandes/qa.bdd-cucumberjs.javascript.git
cd qa.bdd-cucumberjs.javascript
npm install

Running the tests

npm test

BDD in the development lifecycle

BDD is a collaborative practice centered on system behavior. Product, development, and QA discuss examples before implementation and express expected outcomes in a shared language.

  • Given establishes the initial context.
  • When describes an action or event.
  • Then defines the expected outcome.

Cucumber makes these specifications executable, but automation is only one part of BDD. The primary value is shared understanding and early clarification of business rules.

Tech stack

  • JavaScript
  • CucumberJS
  • Gherkin
  • GitHub Actions

Author

Diego Fernandes — Senior QA Engineer / SDET

License

This project is available under the MIT License.

About

challange and study BDD test with Cucumber and JS

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages