Xml文件  |  80行  |  2.36 KB

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count="4" configfailurepolicy="skip" verbose="2" name="SingleSuite" skipfailedinvocationcounts="false" parallel="false" annotations="JDK" data-provider-thread-count="3">
  <parameter name="n" value="42"/>
  <parameter name="p" value="10"/>
  <parameter name="s" value="a b c"/>
  <parameter name="t" value="a,b"/>
  <listeners>
    <listener class-name="test.invokedmethodlistener.MyListener"/>
  </listeners>
  <packages>
    <package name="test.testng355.org.apache.tapestry5">
      <include name="Foo"/>
      <include name="Foo2"/>
      <exclude name="Bar"/>
    </package>
    <package name="test.testng355.org.apache.tapestry5.dom">
    </package>
  </packages>
  <method-selectors>
	  <method-selector>
	    <selector-class name="org.testng.internal.XmlMethodSelector" priority="1"/>
	  </method-selector>
	  <method-selector>
	    <script language="beanshell">
	      <![CDATA[groups.containsKey("test1")]]>
	    </script>
	  </method-selector>
  </method-selectors>
  <test verbose="1" name="Test3" junit="false" preserve-order="false">
    <method-selectors>
      <method-selector>
        <selector-class name="org.testng.internal.XmlMethodSelector" priority="1"/>
      </method-selector>
      <method-selector>
        <script language="beanshell">
          <![CDATA[groups.containsKey("test1")]]>
        </script>
      </method-selector>
    </method-selectors>
    <parameter name="n" value="43"/>
    <parameter name="z" value="foo"/>
    <groups>
      <define name="a">
        <include name="b"/>
        <include name="d"/>
      </define>
      <run>
        <include name="A"/>
        <include name="B"/>
        <exclude name="C"/>
        <exclude name="D"/>
      </run>
    </groups>
    <packages>
      <package name="com.example1">
      </package>
      <package name="com.example2">
      </package>
    </packages>
  </test>
  <test verbose="1" name="Test1" junit="false" preserve-order="false">
    <classes>
      <class name="test.tmp.A">
        <methods>
          <include name="test1"/>
          <include name="test2"/>
          <exclude name="test3"/>
        </methods>
      </class>
      <class name="test.tmp.B"/>
    </classes>
  </test>
  <test verbose="1" name="Test2" junit="false" preserve-order="false">
    <classes>
      <class name="test.tmp.B"/>
    </classes>
  </test>
</suite>