In the Azure devops pipeline, I have
- script: cd e2e-tests && npx playwright install chromium
- script: CI=true RUN_WEB_SERVER=true npx playwright --shard=$(shardIndex)/$(s hardTotal)
But I am getting the below error. If anyone can help, please
Generating script.
Script contents:
CI=true RUN_WEB_SERVER=true npx playwright --shard=2/3
========================== Starting Command Output ===========================
/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/9a785962-c554-4b6c-917e-6a21783fccd5.sh
npm WARN exec The following package was not found and will be installed: playwright
error: unknown option '--shard=2/3'
##[error]Bash exited with code '1'.
Finishing: CmdLine
This thread is trying to answer question "How can I resolve the 'unknown option --shard=2/3' error when running a Playwright script in an Azure devops pipeline?"
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].