Unable to get Jacoco to work with Powermockito using offline instrumentation

前端 未结 12 1759
醉梦人生
醉梦人生 2020-12-13 01:56

Given that Jacoco doesn\'t play nicely with PowerMockito when instrumenting \"on the fly\", I\'ve been trying to configure offline instrumentation in the hope this will give

12条回答
  •  一个人的身影
    2020-12-13 02:42

    For me this sample of Offline Instrumentation works well.

    But it turns in my case that there is a simplier solution: just do not include the tested class in @PrepareForTest({}) annotation before its declaration.

提交回复
热议问题