关于powermock报错org.powermock.reflect.exceptions.FieldNotFoundException: Field 'fTestClass' was not found in class org.junit.internal.runners.MethodValidator.问题解决

 

事件背景

使用PowerMock模拟一个局部变量,添加@RunWith(PowerMockRunner.class)、@PrepareForTest(StudentService.class)注解成功

运行报错如下图:

 

 

 解决方案:

经过度娘发现,是jar包的原因升级就好了

 

posted @ 2019-11-20 21:38  久曲健  阅读(3282)  评论(0编辑  收藏  举报