tnicola / cypress-parallel

Reduce up to 40% your Cypress suite execution time parallelizing the test run on the same machine.
MIT License
578 stars 121 forks source link

How does Weights json file work? #127

Open jdini76 opened 2 years ago

jdini76 commented 2 years ago

Could someone provide an example of how the weights json file is supposed to be formatted and how it works? There are no examples in the project or any documentation on it.

jdini76 commented 2 years ago

I figured it out. This response is for others wondering. The weights json file is automatically created/updated after a 100% successful run. So it might be best to run through your scripts with a single thread to generate an initial weights json file. Then, in corresponding executions it will read the weights file to properly distribute the specs across the threads.

Infurnia-Nitin-Upadhyaya commented 1 year ago

I figured it out. This response is for others wondering. The weights json file is automatically created/updated after a 100% successful run. So it might be best to run through your scripts with a single thread to generate an initial weights json file. Then, in corresponding executions it will read the weights file to properly distribute the specs across the threads.

@jdini76 could you share me your npm script command with weight json and how does the weight json file look like , bit confused need help

lems3 commented 1 year ago

I figured it out. This response is for others wondering. The weights json file is automatically created/updated after a 100% successful run. So it might be best to run through your scripts with a single thread to generate an initial weights json file. Then, in corresponding executions it will read the weights file to properly distribute the specs across the threads.

After a couple of test here, I found out that, for us at least with 3 threads, the file generated after a run with all 3 threads is better than a file generated with only 1 thread.