Skip to content

Commit 2ff70de

Browse files
authored
VACMS-0000: Simplest, stupidest possible way of parallelizing Cypress tests. (#14540)
* VACMS-0000: Simplest, stupidest possible way of parallelizing Cypress tests. * Changes. * Adds weights file.
1 parent 1420bf1 commit 2ff70de

9 files changed

+2124
-273
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ cypress_accessibility_violations.json
33
*.log
44
docroot/cypress/videos/
55
docroot/cypress/screenshots/
6+
runner-results/
67

78
# PHPLOC command output.
89
phploc.json

composer.json

+6
Original file line numberDiff line numberDiff line change
@@ -548,6 +548,7 @@
548548
"va:test:cypress": "Run Cypress tests.",
549549
"va:test:cypress-ci": "Run Cypress tests with CI-specific functionality.",
550550
"va:test:cypress-interactive": "Run Cypress tests interactively (on host web browser).",
551+
"va:test:cypress-parallel": "Run Cypress tests in parallel.",
551552
"va:test:eslint": "Run ESLint tests.",
552553
"va:test:lint-php": "Lint PHP files.",
553554
"va:test:scaling_performance": "Perform a test of the CMS' ability to scale.",
@@ -719,6 +720,11 @@
719720
"! ./scripts/should-run-directly.sh || echo 'This command should only be run from a local development machine.'",
720721
"./scripts/should-run-directly.sh || npm run test:cypress:interactive --"
721722
],
723+
"va:test:cypress-parallel": [
724+
"# Run Cypress tests interactively (on host web browser).",
725+
"! ./scripts/should-run-directly.sh || ./tests/scripts/cypress-parallel-tests.sh",
726+
"./scripts/should-run-directly.sh || ddev composer va:test:cypress-parallel --"
727+
],
722728
"va:test:eslint": [
723729
"# Run ESLint tests.",
724730
"! ./scripts/should-run-directly.sh || npm run eslint --",

cypress.config.js

+4
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ module.exports = defineConfig({
1010
failSilently: false,
1111
},
1212
fixturesFolder: "tests/cypress/fixtures",
13+
retries: {
14+
runMode: 2,
15+
openMode: 0,
16+
},
1317
screenshotsFolder: "docroot/cypress/screenshots/actual",
1418
trashAssetsBeforeRuns: true,
1519
videoCompression: false,

multi-reporter-config.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"reporterEnabled": "cypress-parallel/json-stream.reporter.js, cypress-parallel/simple-spec.reporter.js"
3+
}

0 commit comments

Comments
 (0)