Skip to main content



Add Playwright E2E tests to your deployment pipelines

The init-deployment generator adds e2e testing to preexisting deployment pipelines, including test reporting and artefact uploads.


  1. The @ensono-stacks/workspace:init-deployment has been executed, producing the required deployment files for the workspace


nx g @ensono-stacks/playwright:init-deployment

Generator Output

# New e2e:ci task definition will be added to the tasks.yaml, defining what target should be ran for projects when executing the e2e task
description: Run e2e tests in ci
- npx nx affected --base="$BASE_SHA" --target=e2e --parallel=1
# New e2e:ci task will be added to the taskctl pipeline, adding e2e tests following unit testing
- task: e2e:ci
depends_on: test:ci
- task: version:prod
depends_on: e2e:ci
# New test reporting steps will be added to the azuredevops pipeline
- script: |-
# Install playwright added to setup step
npx playwright install --with-deps
- task: PublishTestResults@2
# Configuration for publishing test results
- task: PublishPipelineArtifact@1
# Configuration for publishing pipeline artefacts