cypress-parallel icon indicating copy to clipboard operation
cypress-parallel copied to clipboard

How does Weights json file work?

Open jdini76 opened this issue 2 years ago • 3 comments

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 avatar Sep 19 '22 15:09 jdini76

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 avatar Sep 19 '22 19:09 jdini76

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

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.

lems3 avatar Apr 03 '23 21:04 lems3