Basic example of using Cypress with Cucumber (BDD). This Gherkin
example includes:
- Basic Scenario
- Scenario Outline
- Tagged tests
npm install
npm test
output
: an output is generated for each .feature
file found.
Spec Tests Passing Failing Pending Skipped
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✔ Duckduckgo.feature 00:10 3 3 - - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
✔ All specs passed! 00:10 3 3 - - -
# defined in package.json file
npm run tag:smoke
npx cypress run --env tags='@smoke and @duckduckgo'
more details: tags
Open Cypress
and run the tests manually:
npm run cypress:open
ESLint statically analyzes the code to find problems.
npm run lint
Many problems ESLint finds can be automatically fixed.
npm run lint:fix