事件背景

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

运行报错如下图:

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

 

 

 解决方案:

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

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-04
  • 2022-02-05
  • 2021-12-11
  • 2022-12-23
  • 2021-07-23
  • 2022-12-23
猜你喜欢
  • 2021-09-13
  • 2021-07-19
  • 2021-09-26
  • 2021-07-06
  • 2021-10-03
  • 2022-02-19
  • 2021-06-11
相关资源
相似解决方案