This project contains automated tests using Playwright and Cucumber.js.
Before running the tests, make sure you have the following installed:
- Node.js (latest LTS version)
- npm (comes with Node.js)
- Cucumber (latest version)
- Install project dependencies:
npm install
- Install Playwright browsers:
npx playwright install
- Install Cucumber
npm install @cucumber/cucumber@latest
npm install --save-dev multiple-cucumber-html-reporter
-
Running Tests in Different Environments:
You can run tests in different environments by setting the TEST_ENV variable:
# Basic syntax: $env:TEST_ENV="<environment_name>" # Set environment npm run test # Run all tests npm run test:tag "<tag_name>" # Run specific tagged tests # Run tests with environment in one line: $env:TEST_ENV="<environment_name>"; npm run test:tag "<tag_name>" # Run default test npm run test # Examples for different environments $env:TEST_ENV="preprod"; npm run test $env:TEST_ENV="staging"; npm run test:tag "tag_name"
npm run clean
To run all test scenarios:
npm run test
You can run specific test scenarios using tags in two ways:
- Using npm script:
npm run test:tag "@your-tag"
npm run test:tag "@DeepAgent"
- Using Cucumber directly:
npx cucumber-js --tags "@your-tag"
Example:
npm run test:tag "@smoke"
- Run parallel tests: $env:TEST_ENV="ENV Name"; npx cucumber-js --tags "@smoke or @regression" --parallel 4
- To generate test report:
npm run report
node llm-judge/simpleJudge.js