eclipse selenium-testng-包括和排除不起作用

4szc88ey  于 2023-03-12  发布在  Eclipse
关注(0)|答案(1)|浏览(124)

包括和排除在 selenium 检测中不起作用,请告知其背后的原因

jv4diomz

jv4diomz1#

您需要在<exclude />标签中给予测试方法名称。但是,从屏幕截图中,我可以看到您没有给出方法名称,而是给出了一些字符串。要排除测试方法“ploan”和“MobilelOGINcarloan”,请在exclude标签中给出这些名称,如下所示:

<?xml version=“1.0” encode=“UTF-8”?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite thread-count = “10” name=“Loan Department”>
  <test name=“Personal loan”>
    <classes>
      <class name=“rangu.amma2”>
        <methods>
          <exclude name=“ploan” />
        </methods>
      </class>
    </classes>
  </test> <!-- Personal loan -->

  <test name=“Car loan”>
    <classes>
      <class name=“rangu.amm3”>
        <methods>
          <exclude name=“MobilelOGINcarloan />
        </methods>
      </class> <!-- test.day3 -->
    </classes>
  </test> <!-- Car Loan -->
</suite> <!-- Loan Department -->

相关问题