Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to run same test multiple times #424

Open
ravimandala opened this issue Mar 18, 2020 · 5 comments
Open

Ability to run same test multiple times #424

ravimandala opened this issue Mar 18, 2020 · 5 comments

Comments

@ravimandala
Copy link
Contributor

Bluepill should support a use case to run a particular test like 100 times. Even better, if Bluepill can support running a given set of tests any given number of times, then it would help in debugging flaky tests.

Can this be done by using include and repeat-count parameters in conjunction? 🤔

@ravimandala
Copy link
Contributor Author

It's worth testing if that flow still works. Wondering if anyone of the Bluepill users is using this regularly!!!???

@RainNapper
Copy link
Contributor

RainNapper commented Mar 24, 2020

I'm currently working on parallel retries to deflake tests.

The plan is:

  1. Run all tests once, with no retries
  2. Run all failures 2x
    Flaky tests are all tests with at least 1 pass.

I originally had hoped there was some minimal configuration on a single run like:

bp --failure-tolerance=2 --run-retries-in-parallel

I did not see an existing flag that looked like --run-retries-in-parallel. So instead, I worked on having multiple runs:

bp --failure-tolerance=0
[parse failures and rerun]
bp --repeat-count=2 --include failedTest1 --include failedTest2

Based on the output below, it looks like the repeats are run in series. As a result, this doesn't work for us either.

{73078} 20200324.144027 [  INFO  ] (BLUEPILL) BP-1 (PID 73098) has finished with exit code 1.
{73078} 20200324.144027 [  INFO  ] (BLUEPILL) PID 73098 exited 1.
{73078} 20200324.144027 [  INFO  ] (BLUEPILL) Started BP-2 (PID 73279).

In your case of running a particular case 100 times, it would be prohibitively slow if these repeats were NOT run in parallel.

Based on above, I think the ability to either run repeats or retries in parallel would be a very useful feature to add. I'd also imagine this is not too difficult considering the parallelism is already there for running multiple different tests.

@ravimandala
Copy link
Contributor Author

The parallel execution of repeats is certainly possible, just that it might not be the way it is done now. Especially if a test or a set of tests has to be run n number of times, then running in series is not a good option. Thanks for pointing that out.

@RainNapper
Copy link
Contributor

I was able to add parallel execution of repeats with a fairly small change. I will make a PR.

That said, parallel retries seems a bit more complicated. A task is not retried by adding a new bundle to the queue, but rather a task restarting itself. This means that it will be more complicated to have a task restart itself multiple times. To support this, I think it would be a good idea to first have tasks add themselves back into the queue and let the scheduler handle the rest.

@ravimandala
Copy link
Contributor Author

@RainNapper It would be great to have this implemented in some form, whether it is integrating https://github.com/RainNapper/bluepill/tree/mmark/pinpill/pinpill/pinpill in some capacity or in full capacity into the Bluepill. Do you have some time to revisit this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants