org.testng.TestNGException:在以下位置找不到空闲节点:[DynamicGraph

nil*_*esh 4 testng automation

我在 testng 中使用了同一个类的两种方法,但它不允许我这样......它给出了例外

org.testng.TestNGException:在以下位置找不到空闲节点:[DynamicGraph

我的测试文件是

<test name="User Data" preserve-order="true">
<classes>
    <class name="LoginTest">
        <methods>
            <include name="Login" />         
        </methods>
    </class>
<class name="xtr.chaut.test.PatientProfileTest">
      <methods>
            <include name="openPatientProfile"></include>
            <include name="checkUserData"></include>
       </methods>
</class>
  <class name="xtr.chaut.test.Login">
      <methods>
          <include name="logout"></include>
      </methods>
  </class>
</classes> 
Run Code Online (Sandbox Code Playgroud)

这里的登录和注销方法来自同一个类

请给我任何解决方案

提前致谢

小智 5

似乎每个类只能在列表中声明一次,即使每个声明中包含不同的方法,否则您将看到此错误消息:( 使用最新的 TestNG 6.8.8。我能够使用 @ Test(priority=#) 与每个测试方法的特定优先级。请参阅http://testng.org/doc/documentation-main.html#annotations

我的用例:实体的 crud 测试。每个实体都有自己的测试类,有 4 个方法(所以我只能单独测试单个实体 CRUD),但我也想运行整个套件(由于完整性约束和不同生成的 ID 密钥会失败,除非它们在完全正确的顺序)。

Getting org.testng.TestNGException: No free nodes found in:[DynamicGraph Exception 中提出了同样的问题。