Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

eclipse debugger not working with power Rule in Junit

I am working on Junits with Mockito + PowerMock + PowerRule

Refer my Previous question: Getting javassist not found with PowerMock and PowerRule in Junit with Mockito

Now that I have got my Junits working successfully, I am getting a strange problem that the Eclipse debugger is not working ie I donot stop on the breakpoints although my tests are getting executed (checked with SOP statements)

Now when I remove PowerRule from Junits, The debugger starts working again

I don't know why is this happening. Please let me know if you have any idea on this

Thanks

like image 205
Bhuvan Avatar asked Aug 31 '12 04:08

Bhuvan


1 Answers

If you have used annotation @PrepareForTest({ClassName.class}) at the class level, then issue would have been occurred. One work around is to declare that annotation at method.It would allow you to debug it even though power mocking is used in your test case.

like image 95
027 Avatar answered Oct 14 '22 15:10

027