参考方案:
排查你的Method是否含有返回值。
原因是使用@Test标签注释的方法,不能带有返回值,如果有返回值需要额外声明,否则会报如下异常,且用例会被直接跳过。
java.lang.InterruptedException,java.io.IOException has a @Test annotation but also a return value: ignoring it. Use <suite allow-return-values="true"> to fix this
- 1
解决方案:
如果想要带返回值执行用例,需要在testng.xml的suite标签中添加如下声明:
<suite allow-return-values="true">
- 1