Run parameterized jUnit tests without using annotation

I am running jUnit parameterized tests using Annotation @RunWith(Parameterized.class) in my Test class. However, now I also need to run my test class using PowerMockRunner and therefore use the @RunWith(PowerMockRunner.class) annotation @RunWith(PowerMockRunner.class) . Obviously this is not possible since only one @RunWith annotation is @RunWith .

How can I implement a parameterized test without using the @RunWith(Parameterized.class) annotation?

+6
source share
1 answer

You can load PowerMock using the JUnit rule, so you no longer need RunWith.

https://code.google.com/p/powermock/wiki/PowerMockRule

+3
source

Source: https://habr.com/ru/post/981043/


All Articles