您的位置: 首页 > 文章 > 在做单元测试,Debug启动方法提示“Connected to the target VM, address: '127.0.0.1:11640', transport: 'socket'” 在做单元测试,Debug启动方法提示“Connected to the target VM, address: '127.0.0.1:11640', transport: 'socket'” 分类: 文章 • 2024-04-25 08:03:10 在做单元测试,Debug启动方法提示“Connected to the target VM, address: ‘127.0.0.1:11640’, transport: ‘socket’” 直接上问题: 经过很长时间的排查,发现在使用Junit做单元测试时,Test方法是不可以携带参数的,否则就不会执行测试方法,并且不会打印任何日志信息,只有debug调试才会有上图的日志。 解决方法: 删除测试方法中携带的参数,如下图: 运行结果: 如有不对之处,敬请留言,非常感谢!