执行testNG.xml文件时出错

问题描述 投票:1回答:1

我在Eclipse中执行Java testNG.xml文件时收到以下错误:

[TestNGContentHandler] [WARN] It is strongly recommended to add "<!DOCTYPE suite SYSTEM "
http://testng.org/testng-1.0.dtd" >" at the top of your file, otherwise TestNG may fail 
or not work as expected.

有人能帮忙吗?

java testng
1个回答
0
投票

在testng.xml文件中添加<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >这一行,它将是testng.xml文件的第二行。

    <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
© www.soinside.com 2019 - 2024. All rights reserved.