mocha-parallel / mocha-parallel-tests

Parallel test runner for mocha tests. Looking for maintainer.
MIT License
199 stars 45 forks source link

Run one file many times #269

Closed DJ-Glock closed 4 years ago

DJ-Glock commented 4 years ago

Hello I am looking for a simple way to run some kind of load e2e tests using mocha-parallel-tests and puppeteer. Is there any possibility to run one test file many times in parallel? As for now I can see the only one option - to make many copies of one file and run them in parallel. But it sounds stupid :) Checked issues, possible parameters, but did not found anything.

1999 commented 4 years ago

What about wrapping your file contents into a for loop?

DJ-Glock commented 4 years ago

@1999 would you be so kind to provide some example? Because I do not understand how it will help. As per my understanding at the moment all files and flat suites are run in parallel. Should I generate test suites by a for loop?

1999 commented 4 years ago

Ah, I guess I missed that point. Yes, probably generating the same files would be the best option. As for the test logic, you can probably put it into the file that you import from your tests.

DJ-Glock commented 4 years ago

Thanks!