Cucumber is a widely used behavior-driven development (BDD) tool that allows developers and stakeholders to collaborate on defining and testing application requirements in a human-readable format. TypeScript is a powerful superset of JavaScript that adds optional static typing, making it easier to catch errors before runtime. By combining these two tools, we can create more reliable and maintainable tests.
- Playwright framework for e2e test automation
- Support TypeScript with Cucumber integration
- Design pattern - Page object model
- Ready to use actions
- Ready to use assertions
- Execute tests on multiple environments (example: dev, staging, prod)
- Parallel execution
- Rerun only failed features
- Awesome report with screenshots, videos & logs
- Retry failed tests on CI
- Github Actions integrated with downloadable report
- On demand tests run using Cucumber tags
- .github -> yml file to execute the tests in GitHub Actions
- config - Contains cucumber config
- src -> helper - Contains all the setup, configurations, test data, actions, assertions code -> hooks - Contains all before and after hook tasks -> page - Contains all page elements and actions on elements -> test - Contains all the feature files & step definations
- test-results -> Contains all the reports related file

- Clone or download the project
- Extract and open in the VS-Code
npm install
to install the dependenciesnpx playwright install
to install the browsersnpm run test
to execute the tests- To run a specific or group of tests, Use scripts available in package.json
npm run test:smoke
src\pages
-> All the pages (UI screen)src\test\features
-> write your features heresrc\test\steps
-> Your step definitions goes heresrc\hooks\hooks.ts
-> Browser setup and teardown logicsrc\hooks\pageFixture.ts
-> Simple way to share the page objects to stepssrc\helper\env
-> Multiple environments are handledsrc\helper\types
-> To get environment code suggestionssrc\helper\report
-> To generate the reportconfig/cucumber.js
-> One file to do all the magicpackage.json
-> Contains all the dependenciessrc\helper\util
-> Read test data from json & loggersrc\helper\wrapper
-> Contains all ready to use actions and assertions
- Learn Playwright - Playwright