問題描述
即將用 Maven+TestNG+Selenium 實(shí)現(xiàn)一個(gè)測(cè)試框架.
Just about to implement a test framework with Maven+TestNG+Selenium.
你如何聲明一個(gè)告訴 TestNG 運(yùn)行 ALL 測(cè)試的 suite.xml?我已經(jīng)嘗試了所有這些都無濟(jì)于事:
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>
我需要使用不同的參數(shù)指定不同的套件配置,但都運(yùn)行所有測(cè)試.我可以挖掘的每個(gè)示例都明確列出了對(duì)我來說意義小于零的每個(gè)類或包.
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.
推薦答案
據(jù)我所知,應(yīng)該使用 .* 來匹配它們.
Should use .* to match them all as far as I know.
這篇關(guān)于TestNG.xml 套件包含所有包的所有文件的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!