的testng.xml套件,包括所有包中的所有文件 [英] TestNG.xml suite to include all packages all files
本文介绍了的testng.xml套件,包括所有包中的所有文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
刚想实现与Maven + TestNG的硒+一个测试框架。
Just about to implement a test framework with Maven+TestNG+Selenium.
你如何声明suite.xml告诉TestNG的运行的所有的测试?我已经尝试了所有这些都无济于事:
How do you declare a suite.xml that tells TestNG to run ALL tests? I've tried all these to no avail:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Toplevel TestNG configuration" verbose="10">
<test name="all">
<classes>
<class name="*" />
</classes>
</test>
</suite>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Toplevel TestNG configuration" verbose="10">
<test name="all">
<groups>
<run>
<include name="*" />
<exclude name="disabled" />
</run>
</groups>
</test>
</suite>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Toplevel TestNG configuration" verbose="10">
<test name="all">
<packages>
<package name="*" />
</packages>
</test>
</suite>
我需要指定不同的paramers但所有正在运行的所有测试不同的套件配置。每个例子,我可以明确地挖列出了每个使得小于零意义,我类或包。
I need to specify different suite configurations with different paramers but all running all tests. Every example I could dig up explicitely lists each class or package which makes less than zero sense to me.
推荐答案
应该使用*为据我所知匹配他们。
Should use .* to match them all as far as I know.
这篇关于的testng.xml套件,包括所有包中的所有文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文