I am running parameterized jUnit tests by using Annotation @RunWith(Parameterized.class)
on my Test class. However now I need to also run my test class using PowerMockRunner
and therefore use annotation @RunWith(PowerMockRunner.class)
. Obviously this is not possible as only one @RunWith
annotation is allowed.
How can I implement a parameterized test without using the annotation @RunWith(Parameterized.class)
?
You can bootstrap PowerMock using a JUnit Rule, so you no longer need the RunWith for that.
https://code.google.com/p/powermock/wiki/PowerMockRule
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With