Spring boot踩坑记录
bug1:
junit:no runnable methods
1.导错包:@Test时import的是@org.testng.annotations.Test 所以会报错 我的问题在这一步已经解决。
解决方法:改为import org.junit.Test;
2.忘记在方法前面加入@Test注解
解决方法:使用自动提示引入import org.junit.Test;或将类设置成abstract
3.所测试的方法加上了输入参数, 系统信息会报:Method testAdd should have no parameters,IDEA说的很明确,测试的方法不能 有输入参数,这个虽然不算,解决 junit:no runnable methods异常,但可能是junit:no runnable methods的衍生错误
解决方法:所测方法去掉输入参数,并且要求方法无返回值.
4.可能 json-lib-2.4.jar丢失,重新拷一个到目标路径下,笔者还没有遇到过这种情况.
转载于:https://blog.csdn.net/lansexiuzhifu/article/details/81413477?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-1.channel_param

浙公网安备 33010602011771号