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.
- 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
qa.bdd-cucumberjs.javascript/
├── .github/
│ └── workflows/
│ └── ci.yml
├── features/
│ ├── steps/
│ │ └── pessoa.js
│ ├── pessoa.feature
│ └── cucumber.js
├── pessoa.js
├── package.json
└── README.md
git clone https://github.com/DiegoJOFernandes/qa.bdd-cucumberjs.javascript.git
cd qa.bdd-cucumberjs.javascript
npm installnpm testBDD 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.
- JavaScript
- CucumberJS
- Gherkin
- GitHub Actions
Diego Fernandes — Senior QA Engineer / SDET
This project is available under the MIT License.