Rayrun
← Back to Discord Forum

My Testes are not running Parallelly In CI/CD pipeline, but its running fine locally.

biswasritu6posted in #help-playwright
Open in Discord

I have a "test" folder and multiple test files inside it. EG: Refer photo 1.

And my package.json looks like Photo 2, where I have specified all the test spec files name with environment , region etc and all the configuration has been done inside playwright.config file and i am running all the apps in terminal using command - npm run all_apps_prod . while running locally all the apps are running parallelly and sequiencially using 4 workers, but while running in CI/CD its not running parallelly and some apps are failing, and taking more time as usual. even after specifying the workers in command its not working and some apps are failing in pipeline. but on single run those are passing. can anyone guide me how we can run all the apps parallelly and smoothly in Pipeline? or how we can divide our test cases in 2 different folders and how we can run both the folders at the same time using cmd commands parallelly?

Photo1.png
Screenshot_324.png

This thread is trying to answer question "How can I run all my apps parallelly and smoothly in the CI/CD pipeline, or how can I divide my test cases into two different folders and run them at the same time using cmd commands parallelly?"

3 replies

Show config.

@shivaguy here is the config

Screenshot_325.png
Screenshot_326.png

Since you're not setting up workers in the config or passing it as argument in package.json, you're letting PW decide how many workers to spawn. I think it is half the number of logical processor available on a machine. So, it is possible that your local computer has 8 logical processor (so 4 workers spawn) and the CI computer has 2 logical processor (so 1 worker spawn).

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email [email protected].