I'm trying to configure Parralel testing on AWS with Cypress. I have read the documentation from here and here, but nothing seems to work.
In my Buildspec I have the following:
## buildspec.yml
version: 0.2
env:
variables:
S3_BUCKET: {...}
SLACK_WEBHOOK: {...}
parameter-store:
CYPRESS_EMAIL: {...}
CYPRESS_LOGINURL: {...}
CYPRESS_MYPWD: {...}
## AWS CodeBuild Batch configuration
## https://docs.aws.amazon.com/codebuild/latest/userguide/batch-build-buildspec.html
batch:
fast-fail: false
build-list:
- identifier: {...}
env:
variables:
IMAGE: public.ecr.aws/cypress-io/cypress/browsers:node14.17.0-chrome88-ff89
build-matrix:
static:
ignore-failure: false
env:
type: LINUX_CONTAINER
privileged-mode: true
compute-type: BUILD_GENERAL1_MEDIUM
dynamic:
env:
compute-type:
- BUILD_GENERAL1_MEDIUM
image:
- public.ecr.aws/cypress-io/cypress/browsers:node14.17.0-chrome88-ff89
variables:
CY_GROUP_SPEC:
- "Machine 1|chrome|cypress/e2e/account-access/*"
- "Machine 2|chrome|cypress/e2e/settings/*"
- "Machine 3|chrome|cypress/tests/mail-accounts/*"
WORKERS:
- 1
- 2
- 3
phases:
install:
runtime-versions:
nodejs: latest
commands:
- echo $CY_GROUP_SPEC
- CY_GROUP=$(echo $CY_GROUP_SPEC | cut -d'|' -f1)
- CY_BROWSER=$(echo $CY_GROUP_SPEC | cut -d'|' -f2)
- CY_SPEC=$(echo $CY_GROUP_SPEC | cut -d'|' -f3)
- npm i
pre_build:
commands:
- TIME=$(date +"%Y%m%d_%H%M%S")
- sudo apt-get update -y && apt-get install jq -y
build:
on-failure: CONTINUE
commands:
- curl -X POST --data-urlencode "payload={\"channel\":\"#qa-notifications\",\"username\":\"mailshake-qa\",\"text\":\"Cypress tests starting...\",\"icon_emoji\":\":star:\"}" ${SLACK_WEBHOOK}
- npx cypress run --record --key {...} --parallel --browser "$CY_BROWSER" --ci-build-id $CODEBUILD_INITIATOR --group "$CY_GROUP" --spec "$CY_SPEC"
post_build:
commands:
{...}
When I run cypress on AWS
it seems CY_GROUP_SPEC:
is being ignore, and I get in return empty strings.
enter image description here
Any help?
- I checked the indentation, and it looks good
- I checked into this AWS documentation about having multiple buildspec