Running tests
Opening runner
- Cypress
- Playwright
tip
To modify the url, change the e2e.baseUrl
parameter in the uuv/cypress.config.ts
file in order to fill the target url.
tip
To modify the url, change the use.baseURL
parameter in the uuv/playwright.config.ts
file in order to fill the target url.
From powershell or cmd terminal :
- Npm
- Yarn
npx uuv open
yarn uuv open
Running E2E tests from console
Use for continuous integration(CI example) or headless execution.
From powershell or cmd terminal :
- Npm
- Yarn
npx uuv e2e
With arguments
npx uuv e2e --browser=edge --env="{'TAGS':'@mobile'}" --generateHtmlReport --targetTestFile=./uuv/e2e/first-test.feature
yarn uuv e2e
With arguments
yarn uuv e2e --browser=edge --env="{'TAGS':'@mobile'}" --generateHtmlReport --targetTestFile=./uuv/e2e/first-test.feature
Arguments
tip
To modify the BASE_URL in E2E mode, simply set the environment variable :
- Windows
- Shell
set UUV_BASE_URL=http://localhost:4200
export UUV_BASE_URL=http://localhost:4200
- Cypress
- Playwright
Nom | Description | Valeur |
---|---|---|
browser | Target browser | chrome / edge / firefox / electron |
env | Environment variables | Json object containing the properties: - TAGS : To target the cucumber tags - ... : All possible properties for cypress |
generateHtmlReport | When this option is present, an html report of the executed tests will be generated here : ./uuv/reports/e2e/html/ An example of a report | N/A |
generateJunitReport | When this option is present, an junit report of the executed tests will be generated here : ./uuv/reports/e2e/junit-report.xml | N/A |
generateA11yReport | When this option is present, a json report for a11y checks performed : ./uuv/reports/a11y-report.json | N/A |
targetTestFile | Specify test files to execute | If not present: all test files will be included If set: contains a specPattern path relative to the ProjetDir parameter |
Nom | Description | Valeur |
---|---|---|
browser | Target browser (one of those defined in uuv/playwright.config.ts file) | firefox / chromium / Google Chrome / Microsoft Edge |
env | Environment variables | Json object containing the properties: - TAGS : To target the cucumber tags |
generateHtmlReport | When this option is present, an html report of the executed tests will be generated here : ./reports/e2e/html/ An example of a report | N/A |
generateJunitReport | When this option is present, an junit report of the executed tests will be generated here : ./uuv/reports/e2e/junit-report.xml | N/A |
targetTestFile | Specify test files to execute | If not present: all test files will be included If set: contains a specPattern path relative to the ProjetDir parameter |