best-flower-17510
01/17/2023, 5:47 PMbrave-river-4142
01/17/2023, 9:06 PMwooden-scientist-4695
01/25/2023, 10:32 AMpurple-ice-75399
03/16/2023, 10:08 PM"cy:run:repeat": "cypress-repeat run -n ${npm_config_times:-5} --browser ${npm_config_test_browser:-chrome} --record false --env configFile=${npm_config_env:-test} --spec",
// Pre and Post scripts
"precy:run:repeat": "npm run report:clean",
"postcy:run:repeat": "npm run report:merge & npm run report:generate",
// Where the scripts point to
"report:clean": "rm -R -f cypress/reports",
"report:merge": "mochawesome-merge cypress/reports/*.json > cypress/reports/index.json",
"report:generate": "marge cypress/reports/index.json --reportDir cypress/reports/mochaReport --assetsDir cypress/reports/mochaReport/assets --charts true --showHooks always",
When the repeats finish all successfully, the report is made, and the terminal looks like:
***** finished 5 run(s) successfully *****
> postcy:run:repeat
> npm run report:merge & npm run report:generate
... so on and so forth
When a fail occurs:
cypress-repeat: run 2 of 3 failed
and kicked out. No post script triggered.
I'm guessing it has something to do with process.exit(testResults.totalFailed) found here: https://github.com/bahmutov/cypress-repeat/blob/main/index.js?rgh-link-date=2023-01-20T02%3A15%3A17Z#L153, but not totally sure.
We have a workaround in place being adding ; npm run report:merge & npm run report:generate
to our main script, but it's not doable with additional config options we wanna add occasionally.
Any other ideas or help is much appreciated. Thanks!microscopic-student-40589
03/23/2023, 8:01 AMmicroscopic-student-40589
03/23/2023, 8:01 AMgray-kilobyte-89541
03/23/2023, 10:35 AMsetupNodeEvents(on, config) {