Using PowerMock without the RunWith?

4,486 views
Skip to first unread message

Viktor

unread,
Apr 21, 2009, 7:10:20 PM4/21/09
to PowerMock
Is there any way to use PowerMock without the @RunWith annotation and
without extending anything? The reason is that I would like to use
PowerMock with FitNesse and both of those limitations would prevent us
from doing that. Currently I use a combination of JMockit (for static/
final/private mocks) and Mockito (for everything else) to create stubs
in FitNesse fixtures, which is a bit cumbersome.

Also, removing the annotation would allow the use of a different JUnit
test runner, e.g. @RunWith(Parameterized.class).

Jan Kronquist

unread,
Apr 22, 2009, 6:23:38 AM4/22/09
to powe...@googlegroups.com
Unfortunately no, there is currently no way to run the tests with
PowerMock without the annotation. However, we are having some ideas
for nested runners. We have also have ideas for other ways of
bootstrapping PowerMock than JUnit, but currently nothing has been
implemented.

Johan and me will have a meeting next week and discuss what features
we should include in the next release.

/Jan

Johan Haleby

unread,
Feb 1, 2011, 10:31:29 AM2/1/11
to powe...@googlegroups.com
This is possible since version 1.4.7. Have a look at the PowerMock Rule.

/Johan

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "PowerMock" group.
To post to this group, send email to powe...@googlegroups.com
To unsubscribe from this group, send email to powermock+...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/powermock?hl=en
-~----------~----~----~----~------~----~------~--~---


Reply all
Reply to author
Forward
0 new messages