cypress-parallel
cypress-parallel copied to clipboard
npm Cypress command arguments via -a results as baseUrl is null
I need to use -a
option within the command line, as it will become an input parameter in my GitHub workflow. But when I pass -a
option in the command line this results as baseUrl is null.
Is this an issue in the latest version or I'm doing something wrong?
"devDependencies": {
"cypress": "^9.5.1",
"cypress-multi-reporters": "^1.5.0",
"cypress-parallel": "^0.9.0"
}
"scripts": {
"cy:run": "cypress run --browser chrome"
},
Run command:
npx cypress-parallel -s cy:run -t 2 -d cypress/integration -a '\"--config baseUrl=https://example.cypress.io\"'
baseUrl is null
Works fine with regular Cypress run command
$ npx cypress open --config baseUrl=https://example.cypress.io
Also passing the option in script does work:
"scripts": {
"cy:run": "cypress run --browser chrome --config baseUrl=https://example.cypress.io"
},
$ npx cypress-parallel -s cy:run -t 2 -d cypress/integration
is this issue still open? I am using 0.9.1 and I am not able to pass arguments to the cypress script.
Just remove the backslash from the arguments:
npx cypress-parallel -s cy:run -t 2 -d cypress/integration -a '"--config baseUrl=https://example.cypress.io"'
Sorry, a bit too late on this: I confirm if you're using npx you don't need the backslash to escape double quotes.