bio
bio
java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:386) at sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:401) Caused by: java.lang.NoClassDefFoundError: com/alibaba/testable/core/util/LogUtil at com.alibaba.testable.agent.config.PropertiesParser.parseFile(PropertiesParser.java:45) at com.alibaba.testable.agent.PreMain.premain(PreMain.java:22) ... 6 more Caused by: java.lang.ClassNotFoundException: com.alibaba.testable.core.util.LogUtil at...
现在这个工具要求单元测试类包路径必须严格与项目所在包路径相同,否则就无法产生mock效果。但是我个人更喜欢在测试类所在包路径添加一个junit包,用以区分类所在的位置。目前翻阅文档并没有看到相关设置。同时,对mock的测试类命名要求也是十分严格,如果能够有类似PowerMockito.spy(mockService)功能的函数,我觉得会更为方便一些。不知道后续会不会有这种功能。