Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue: on successful run of one thread execution jenkins stops complete execution for cypress-parallel. #181

Open
ketteq-neon opened this issue Dec 28, 2023 · 8 comments

Comments

@ketteq-neon
Copy link

while executing scripts on Jenkins I am using three threads:
t1, t2, and t3 if one of these thread executions completes then it exits from the execution and next script try to run and Jenkins execution
failed due to this issue.

scripts to run:
"cy:install": "cypress install",
"ketteq:config:script": "cypress run --browser chrome --headless --reporter cypress-multi-reporters --reporter-options configFile=reporter-config.json",
"cy:cleanRun": "run-s -c cy:cleanReports cy:install",
"sleep5s": "node -e "setTimeout(() => process.exit(0), 5000)"",
"cy:mergeJsonFiles":"mochawesome-merge "cypress/reports/mochawesome/*" > "cypress/reports/mochawesome.json"",
"cy:generateHtmlReport":"marge cypress/reports/mochawesome.json -f mochawesome_final.html -o cypress/reports/finalHtml",
"cy:generateJenkinsHtmlReport":"marge cypress/reports/mochawesome.json -f mochawesome_final.html -o ../../../target/test-classes/e2e/cypress/reports/finalHtml",
"cy:mergeGenerateHtmlReport":"run-s -c sleep5s cy:mergeJsonFiles sleep5s cy:generateHtmlReport cy:generateJenkinsHtmlReport",
"ketteq:uiE2EParallelScript": "cypress-parallel -d cypress/e2e/api/uiE2E -t 3 -s ketteq:config:script -w parallel-weights.json",
"cy:ketteqAutomation:all": "run-s -c cy:cleanRun ketteq:uiE2EParallelScript cy:mergeGenerateHtmlReport",

Is there any way to wait for execution of all threads in cypress-parallel?

on local its working fine!!

Please help!!

@ketteq-neon
Copy link
Author

HI Team,

Please provide your valuable input!!

@ketteq-neon
Copy link
Author

Hi Team,

Anyone have any resolution for the above issue?

@Densf2
Copy link

Densf2 commented Feb 1, 2024

could you share the error message. I using cypress-parallel with Jenkins with the same configuration and commands. And no issues and successfully getting results
@ketteq-neon

@ketteq-neon
Copy link
Author

@Densf2

there is no error in Jenkins build, just immediate completion of one thread's execution it's come out of execution.

Please refer attached screen shots, I am trying to run two scripts on two threads having 10 sec and 20 sec wait only.
npm scripts:

"ketteq:config:script": "cypress run --browser chrome --headless ",
"parallel","cypress-parallel -d cypress/e2e/api/uiE2E -t 2 -s ketteq:config:script -w parallel-weights.json"

but after execution of 10 sec scripts on thread 1 its automatically stop the execution and make Jenkins build successful.

Please let me know if you need further Information on the same.
screenshot1
screenshot2
screenshot3

@ketteq-neon
Copy link
Author

@Densf2 could you please share your npm scripts with me?

@Densf2
Copy link

Densf2 commented Feb 5, 2024

yeah, I used the same commands but some different parameters:

“merge_reports”: “mochawesome-merge cypress/reports/mochawesome-report/*.json -o cypress/reports/mochawesome-report/output.json”,
“mochawesome_report”: “marge -i cypress/reports/mochawesome-report/output.json -o cypress/reports/mochawesome-html-report/“,
“make_report”: “npm run merge_reports && npm run mochawesome_report”,
“cy:parallel_10_streams”: “cypress-parallel -s cypress:run-no-video -t 10 -d cypress/e2e -r mochawesome -o reportDir=cypress/reports/mochawesome-report,html=false,json=true,overwrite=false,timestamp=mmddyyyy_HHMMss -m false”,
“run_cy_tests_parallel_10_str”: “npm-run-all -s -c  cy:parallel_10_streams make_report”,

and always received results for all threads

@ketteq-neon
Copy link
Author

@Densf2 did you run these scripts on cypress container?

@Densf2
Copy link

Densf2 commented Feb 9, 2024

yes, these configuration works with official images cypress/inlcuded - but I can't share the results due to changes in tests for commercial project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants