testng问题解决

2019-02-14  文晶 

idea结合testng测试数据生成工具类时报错如下:

1、org.testng.TestNGException: org.xml.sax.SAXParseException; lineNumber: 3; columnNumber: 44; 值为 "none" 的属性 "parallel" 必须具有列表 "false methods tests classes instances " 中的值。

经百度原因如下:


原因为6.9.10版本的testng,开始验证xml中的元素;而idea默认的testng.xml模板中parallel设置为none,因此报错。

所以解决方法:

1. testng 使用6.9.9

或者

2. testng使用6.9.10, 在testng.xml中parallel设置为false

本工程未显示配置testng.xml 采用工具默认xml(/Users/yp-tc-m-2492/Library/Caches/IntelliJIdea13/temp-testng-customsuite.xml)所以降低testng版本到6.9.9


642°/6426 人阅读/0 条评论 发表评论

登录 后发表评论