tnicola / cypress-parallel

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

Is it possible to only regenerate parallel-weights.json when the weights have changed? #180

Open HerbCaudill opened 6 months ago

HerbCaudill commented 6 months ago

Thanks for this library, it's cut my cypress execution time in half! Very grateful.

Question about the parallel-weights.json file:

I have it checked into source control, which I assume is what you want; and I would want to update it and commit a new version if the weights changed for whatever reason.

But it gets updated on every test run, even if the weights themselves don't change, because of millisecond-level differences in the timing. To avoid adding a lot of unnecessary noise to my commit log, I have to manually discard those changes.

I could wrap my test execution in a script that examines the modified file to see if the weights have changed, and discards the file changes if they haven't. But that feels like a hack, and since this seems like it would probably be a common concern, I wanted to check first (a) whether maybe I'm using this library wrong, or I've missed a better solution that already exists; and (b) if not, whether a pull request to add this option would be welcome.