You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using cypress-parallel with a path containing * like in this example: "cy:parallel": "cypress-parallel -s cy:run -t 2 -d 'cypress\\e2e\\tst\\*.js'",, the getTestSuitePaths function from test-suite.js uses the getFilePathsByGlob function. This function returns the file list using the "/" path separator (cypress/e2e/tst/test_1.cy.js)
When the distributeTestsByWeight function is called, it compares (endsWith) the file lists above with the ones from the parallel-weights.json and it results in a map with all weights equal to 1. This occurs because in the parallel-weights.json file the paths are saved with backslash "\" ("cypress\\e2e\\tst\\test_1.cy.js") and the f.endsWith(spec) condition returns always false.
I noticed that if I change the command to "cy:parallel": "cypress-parallel -s cy:run -t 2 -d 'cypress\\e2e\\tst\\'",, then the code uses the deprecated version getFilePathsByPath but the weight file is considered and the file splitting is done correctly.
Is there any way that I can use the pattern version (*) so that the distributeTestsByWeight function works correctly and the files are split accordingly?
OS: Windows 10
Node: 20.9.0
Cypress: 13.12.0
cypress-parallel: 0.14.0
The text was updated successfully, but these errors were encountered:
andrei-ticudeanu-caphyon
changed the title
parallel-weights.json not taken into consideration when running cypress-parallel with path using wildcard (*)
parallel-weights.json not taken into consideration when running cypress-parallel with -d and wildcard (*)
Oct 16, 2024
When using cypress-parallel with a path containing * like in this example:
"cy:parallel": "cypress-parallel -s cy:run -t 2 -d 'cypress\\e2e\\tst\\*.js'",
, the getTestSuitePaths function from test-suite.js uses the getFilePathsByGlob function. This function returns the file list using the "/" path separator (cypress/e2e/tst/test_1.cy.js)When the
distributeTestsByWeight
function is called, it compares (endsWith
) the file lists above with the ones from the parallel-weights.json and it results in a map with all weights equal to 1. This occurs because in the parallel-weights.json file the paths are saved with backslash "\" ("cypress\\e2e\\tst\\test_1.cy.js"
) and thef.endsWith(spec)
condition returns always false.I noticed that if I change the command to
"cy:parallel": "cypress-parallel -s cy:run -t 2 -d 'cypress\\e2e\\tst\\'",
, then the code uses the deprecated versiongetFilePathsByPath
but the weight file is considered and the file splitting is done correctly.Is there any way that I can use the pattern version (*) so that the
distributeTestsByWeight
function works correctly and the files are split accordingly?OS: Windows 10
Node: 20.9.0
Cypress: 13.12.0
cypress-parallel: 0.14.0
The text was updated successfully, but these errors were encountered: