本文介紹了TestNG.xml 套件包含所有包的所有文件的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
即將用 Maven+TestNG+Selenium 實現一個測試框架.
Just about to implement a test framework with Maven+TestNG+Selenium.
你如何聲明一個告訴 TestNG 運行 ALL 測試的 suite.xml?我已經嘗試了所有這些都無濟于事:
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>
我需要使用不同的參數指定不同的套件配置,但都運行所有測試.我可以挖掘的每個示例都明確列出了對我來說意義小于零的每個類或包.
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 套件包含所有包的所有文件的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!