This project uses Cypress and Cucumber
The project has the following dependencies:
- cypress: JavaScript end-to-end testing framework built on top of Node.js
- @badeball/cypress-cucumber-preprocessor: Cypress preprocessor that allows us to use Gherkin syntax to write the tests
- @bahmutov/cypress-esbuild-preprocessor: Cypress preprocessor that uses esbuild to bundle and transpile the test files
- esbuild: JavaScript bundler and transpiler that compiles modern JavaScript code to be compatible with older browsers
The project has the following file structure:
cypress/
e2e/
features/
**.feature
step_definitions
**.js
page-objects/
**.js
support/
commands.js
e2e.js
.gitignore
cypress.config.js
package.json
README.md
yarn.lock
The e2e
folder contains the feature file and the step definitions that implement the test.
The page-objects
folder contains the page objects that implement the test.
The support
folder contains custom commands and other configuration files for Cypress.
The .gitignore
file lists the files and directories that should not be tracked by Git.
The cypress.config.js
file contains configuration options for Cypress, Cucumber and Pre processors.
The package.json
file lists the project metadata and dependencies.
The yarn.lock
file lists the exact version of each dependency used in the project.
To get started, clone this repository and install the dependencies:
git clone https://github.com/prgupta1995/Test-automation-cypress-bdd.git cd Test-automation-cypress-bdd yarn install
yarn cypress:open
This will open the Cypress Test Runner, where we can select the **.feature
file and run the tests.