TNG / junit-dataprovider

A TestNG like dataprovider runner for JUnit with many additional features
Apache License 2.0
246 stars 164 forks source link

How to use junit-dataprovider with powermock #133

Closed zzkyeee closed 3 years ago

zzkyeee commented 3 years ago

I want to use both junit-dataprovider and powermock, but @Runwith only one class.

aaschmid commented 3 years ago

Related to https://github.com/TNG/junit-dataprovider/issues/120

aaschmid commented 3 years ago

Yes, junit4 only allows one @RunWith and the junit-dataprovider requires one - I tried to change but it is not possible to get rid of it. However powermock seems to provide a @Rule, see https://github.com/powermock/powermock/wiki/powermockrule.

Does that help?

aaschmid commented 3 years ago

@zzkyeee If you have any further questions, don't hesitate to reopen this issue but for now I will close it as there is no further response on an issue which seems to be unsolvable due to JUnit4s architectural constraints :-(