What is Cypress?
Cypress is a JavaScript-based end-to-end testing tool designed for modern web test automation. This developer-friendly tool operates directly in the browser using a DOM manipulation technique and enables front-end developers and QA engineers to write automated web tests while eliminating pain points.
What is BDD?
Behavior-driven development (BDD) is an Agile software development methodology in which an application is documented and designed around the behavior a user expects to experience when interacting with it. By encouraging developers to focus only on the requested behaviors of an app or program, BDD helps to avoid bloat, excessive code, unnecessary features or lack of focus. This methodology combines, augments and refines the practices used in test-driven development (TDD) and acceptance testing.
2. Install Visual Studio Code. (https://code.visualstudio.com/download)
3. Install vs code extensions- Cucumber (Gherkin) Full Support v2.15.2
4. Install vs code extensions- ESLint v2.4.0
5. Install vs code extensions- Prettier - Code formatter v9.10.4
1. Clone the repo- https://github.com/CDL-samir-thaker/Cypress-BDD-Demo-with-JavaScript.git
2. Install required dependency node_modules via running command (npm i or npm install ) in vs code terminal.
1. To run the Cypress Test - Open vs code terminal and type npx cypress open
2. To generate report run - node cucumber-html-report.js
1. For Cypress Automation - https://codenboxautomationlab.com/
2. For setting up ESLint & Prettier code formatting tools- https://dev.to/andrewbaisden/how-to-use-eslint-and-prettier-for-code-analysis-and-formatting-1b4g
Report Image: