我一直收到此錯誤測試標籤(在行測試名=「炳搜索-樣本...)在TestNG的XML配置文件中,當Eclipse試圖驗證針對其DTD的XML文件操作正常,並且似乎沒有什麼問題。TestNG的XML配置文件DTD「測試」標籤錯誤
The content of element type "test" must match "(method-selectors?,parameter*,groups?,packages?,classes?)".
XML文件:
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="tests" allow-return-values="true"
verbose="10">
<test name="Bing-Search-Sample-Test">
<classes>
<class name="package.TestFactory" />
</classes>
<groups>
<run>
<include name="sample-tests" />
</run>
</groups>
<parameter name="testInterfaceXML" value="SearchInterface.xml"></parameter>
<parameter name="testSuiteXML" value="SearchTest.xml"></parameter>
</test>
</suite>
由於XML工作正常,我想知道如果有一個公關使用TestNG DTD或使用eclipse進行XML文件驗證。
當我嘗試驗證此站點上的XML時,我得到了同樣的確切錯誤:http://www.xmlvalidation.com/index.php?id=1&L=0 – djangofan
您是否嘗試重新排序標記答案建議? – atavakoli
是的,我嘗試過。它沒有效果。我意識到我的問題並未完全烘托。我投票結束了我自己的問題。 – djangofan