rerunner-jupiter
rerunner-jupiter copied to clipboard
How can we repeat all the tests when they failed by only one declaration in BaseTest Class?
Rather than adding "@RepeatedIfExceptionsTest(repeats = 3)" for each test, how can we add a one declaration for all tests?
I wanted to do something like that and I came quite far with it but then I read this: https://github.com/artsok/rerunner-jupiter/issues/28#issuecomment-491564260.
That would probably be a problem.
I got it to work when I set List<Boolean> historyExceptionAppear
in RepeatIfExceptionsExtension
to Collections.synchronizedList(new ArrayList<>())
. But that used to be in the code and was removed in this commit:
https://github.com/artsok/rerunner-jupiter/commit/9416adc227c625c38a2e0c0036c44de1310e6ba6
To fix https://github.com/artsok/rerunner-jupiter/issues/11
Hi @616slayer616
It is greate, that you want to do it! I have'nt free time to invistigate it :(
I inited this value at line 87.

Is it matter for you to init it as class value, as you want?
Can you show work example of this feature?
Maybe you can try this. It seems to work but I'm not sure , maybe it only works on my machine https://github.com/616slayer616/rerunner-jupiter/tree/annotaion_on_class
@616slayer616 There seems to be good work in this PR; perhaps though the new test you added should have the @RepeatedIfExceptionsTest removed from the methods to verify with certainty that only the class-level annotation is working.
You are rigtht I forgot to remove the method level annotations.
This is not going to work this way.
The RepeatedIfExceptionsTest is supposed to replace the Test annotation https://github.com/artsok/rerunner-jupiter/issues/28#issuecomment-491564260
We would have to introduce a new annotation to achieve this (https://github.com/artsok/rerunner-jupiter/pull/44#issuecomment-507774583)