1

我正在尝试运行 testng.suite,但它没有运行每个类的所有方法。它只是从每个类中运行前几个方法。我将 .xml 文件分成两个 .xml 文件。在一个文件中,我添加了前四个类并成功运行,testng.xml 文件运行了每个类的每个方法,甚至没有错过一个方法。然后我创建了第二个 .xml 并运行了我的最后一个类,“”它也成功并运行了该类中的每个方法。但是当我在一个 .xml 文件中运行所有五个测试类时,它只运行每个类的几个方法。我们可以在一个 .xml 文件中运行的类/方法是否有任何限制。我们可以在一个 .xml 文件中运行多少个类/方法?我不明白这一点,如果有人在这里帮助我,我将不胜感激。下面是我的 testng.xml 文件。

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd">
<suite name="finalSuite">
  <test name="final Test">
    <classes>
      <class name="com.qa.MurcryTour.Tests.HomePageTest"/>
      <class name="com.qa.MurcryTour.Tests.LoginPageTest"/>
      <class name="com.qa.MurcryTour.Tests.RegisterPageTest"/>
      <class name="com.qa.MurcryTour.Tests.FlightsPageTest"/>
      <class name="com.qa.MurcryTour.Tests.DataDriven_RegisterPageTest"/>
    </classes>
  </test> <!-- final Test -->
</suite> <!-- finalSuite -->
4

0 回答 0