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
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ ✔ web/Duckduckgo.feature 00:10 3 3 - - - │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
✔ All specs passed! 00:10 3 3 - - -
HTML report:
# 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
Run ESLint and TypeScript Compiler (without compilation)
npm run lint
ESLint statically analyzes the code to find problems.
npm run lint:eslint
Many problems ESLint finds can be automatically fixed.
npm run lint:eslint:fix
Check the types and validate the code using TypeScript without compilation.
npm run lint:tsc