Rayrun
← Back to Discord Forum

Issue with Azure Devops Sharding - Please install @playwright/test package before running

I am doing the work around to get playwright working in Azure pipeline with cd e2e-tests && npm uninstall playwright && npm install -D @playwright/test. But I am still getting this error in Azure DevOps:

Generating script.
Script contents:
npx playwright test --shard=2/2
========================== Starting Command Output ===========================
/bin/bash --noprofile --norc /Users/runner/work/_temp/c9389249-be59-4235-94e0-0b35171cdffc.sh
npm WARN exec The following package was not found and will be installed: playwright
Please install @playwright/test package before running "npx playwright test"
  npm uninstall playwright
  npm install -D @playwright/test

Here is my yaml

- script: cd e2e-tests && npm uninstall playwright && npm install -D @playwrig  ht/test
              displayName: 'Playwright workaround install'
  
            - script: cd e2e-tests && npx playwright install chromium
              displayName: 'Install chromium'
  
            - script: npx ng build --configuration="development"
              displayName: 'Angular app build'
  
            - script: npm install --global http-server
              displayName: 'Install http server'
  
            - script: npx playwright test --shard=$(shardIndex)/$(shardTotal)
              displayName: 'Run Playwright tests'

if anyone can help, please

This thread is trying to answer question "How to resolve the error encountered while using Playwright in Azure pipeline?"

1 reply

Nevermind, it was my error

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].