How do I store Playwright browsers as an artifact and then use in test suites?
12:15 27 Jan 2026

I have a test pipeline which runs well and takes between 6-10 mins to complete, see below

Typical pipeline run

As you can see the longest task is the "Install Playwright browsers" job, this can be anything from 3-8 minutes. I already have the actual testing app stored as an artifact and the download and extract is shown next:

- task: DownloadBuildArtifacts@1
  displayName: Download Build
  inputs:
    pipeline: SpiceTest
    artifactName: drop
    branchName: main
    buildType: specific

- task: ExtractFiles@1
  displayName: Unzip the artifact
  inputs:
    archiveFilePatterns: '$(Build.ArtifactStagingDirectory)\drop\SpiceTest.zip'
    destinationFolder: '$(System.DefaultWorkingDirectory)\smoke' 
    overwriteExistingFiles: true 

These tasks take a matter of seconds to complete. So I am now wondering if this can be done with the Playwright browser runtimes, currently I use this command and it is slow.

- script: pwsh $(System.DefaultWorkingDirectory)\smoke\playwright.ps1 install chromium --with-deps --only-shell

What I would like to do is create a pipeline which will download and store Playwright as a artifact. This process can be scheduled to run early hours 3 times a week so the latest versions are always likely to be installed. Then when the test suite runs it will simply import the artifact and extract the files.

Can this be done? If yes, how?

azure-devops playwright