org.testng.TestNGException:在没有找到免费的节点:[DynamicGraph [英] org.testng.TestNGException: No free nodes found in:[DynamicGraph

查看:469
本文介绍了org.testng.TestNGException:在没有找到免费的节点:[DynamicGraph的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用TestNG中同一类的两个方法,但它没有让我这样......这是给例外

I am using two methods of same class in testng, but it is not allowing me so... it is giving exception

org.testng.TestNGException:在没有找到免费的节点:[DynamicGraph

org.testng.TestNGException: No free nodes found in:[DynamicGraph

我的TestNG的文件是

my testng file is

<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> 


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

here login and logout methods are from same class

请给我这个任何解决方案

please give me any solution for this

在此先感谢

推荐答案

看来,每一个类只能在清单申报一次,即使被包含在每个声明不同的方法,否则你会看到此错误消息:(它采用了最新TestNG的6.8.8。我能得到这个与@Test(优先级=#),在每个测试方法的具体优先工作。参考的 http://testng.org/doc/documentation-main.html#annotations

It appears that each class can only be declared once in the list, even if different methods are included on each declaration, otherwise you will see this error message :( Using latest TestNG 6.8.8. I was able to get this to work with @Test(priority=#) with the specific priority on each test method. See http://testng.org/doc/documentation-main.html#annotations.

我的用例:对于实体CRUD的测试。每个实体有4种方法(这样我就可以测试只能在孤立单个实体CRUD)自己的测试类,但我也想,除非他们是在连续运行的整体套件(将失败归因于完整性约束和不同的生成的ID钥匙完全正确的顺序)。

My use case: crud tests for entities. Each Entity has its own test class with 4 methods (so I can test only a single entity CRUD in isolation), but I also want to run the overall suite (will fail due to integrity constraints and different generated ID keys unless they are run in exactly the right order).

在<一问同样的问题href=\"http://stackoverflow.com/questions/18737442/getting-org-testng-testngexception-no-free-nodes-found-indynamicgraph-excepti\">Getting org.testng.TestNGException:在没有找到免费的节点:[DynamicGraph异常

这篇关于org.testng.TestNGException:在没有找到免费的节点:[DynamicGraph的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆