我有一些包
com.company.testing.module1
com.company.testing.module2
com.company.testing.module3
我还有一些在
中有TestNG注释的类com.company.testing.tests
现在我把testng.xml放在
中com.company.testing
XML文件看起来像
<?xml version="1.0" encoding="UTF-8"?>
<suite name="Foo">
<test name="Bar">
<package>
<package name="com.company.testing.tests" />
</package>
</test>
</suite>
如何从Eclipse运行套件?我应该做什么运行配置?
答案 0 :(得分:11)
安装TestNG plug-in,完成后,您可以右键单击XML文件,然后“运行为/调试为... TestNG。
答案 1 :(得分:1)
你需要testng插件。然后它只是运行testng任务的问题。有关详细信息,请参阅docs。
答案 2 :(得分:0)
通过testNG.xml
进行测试
转到类文件右键单击并选择Run as&gt;&gt; run configuratins
。
选择Suite
并浏览您的testNG.xml
(默认情况下在eclipse - testng-customsuite.xml中)并运行。