org.testng.TestNG.populateSuiteGraph()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(2.4k)|赞(0)|评价(0)|浏览(134)

本文整理了Java中org.testng.TestNG.populateSuiteGraph()方法的一些代码示例,展示了TestNG.populateSuiteGraph()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。TestNG.populateSuiteGraph()方法的具体详情如下:
包路径:org.testng.TestNG
类名称:TestNG
方法名:populateSuiteGraph

TestNG.populateSuiteGraph介绍

[英]Populates the dynamic graph with the reverse hierarchy of suites. Edges are added pointing from child suite runners to parent suite runners, hence making parent suite runners dependent on all the child suite runners
[中]使用套件的反向层次结构填充动态图形。添加了从子套件跑步者指向父套件跑步者的边,从而使父套件跑步者依赖于所有子套件跑步者

代码示例

代码示例来源:origin: org.testng/testng

/**
 * Populates the dynamic graph with the reverse hierarchy of suites. Edges are
 * added pointing from child suite runners to parent suite runners, hence making
 * parent suite runners dependent on all the child suite runners
 *
 * @param suiteGraph dynamic graph representing the reverse hierarchy of SuiteRunners
 * @param suiteRunnerMap Map with XMLSuite as key and its respective SuiteRunner as value
 * @param xmlSuite XML Suite
 */
private void populateSuiteGraph(DynamicGraph<ISuite> suiteGraph /* OUT */,
  SuiteRunnerMap suiteRunnerMap, XmlSuite xmlSuite) {
 ISuite parentSuiteRunner = suiteRunnerMap.get(xmlSuite);
 if (xmlSuite.getChildSuites().isEmpty()) {
  suiteGraph.addNode(parentSuiteRunner);
 }
 else {
  for (XmlSuite childSuite : xmlSuite.getChildSuites()) {
   suiteGraph.addEdge(0, parentSuiteRunner, suiteRunnerMap.get(childSuite));
   populateSuiteGraph(suiteGraph, suiteRunnerMap, childSuite);
  }
 }
}

代码示例来源:origin: cbeust/testng

/**
 * Populates the dynamic graph with the reverse hierarchy of suites. Edges are added pointing from
 * child suite runners to parent suite runners, hence making parent suite runners dependent on all
 * the child suite runners
 *
 * @param suiteGraph dynamic graph representing the reverse hierarchy of SuiteRunners
 * @param suiteRunnerMap Map with XMLSuite as key and its respective SuiteRunner as value
 * @param xmlSuite XML Suite
 */
private void populateSuiteGraph(
  DynamicGraph<ISuite> suiteGraph /* OUT */, SuiteRunnerMap suiteRunnerMap, XmlSuite xmlSuite) {
 ISuite parentSuiteRunner = suiteRunnerMap.get(xmlSuite);
 if (xmlSuite.getChildSuites().isEmpty()) {
  suiteGraph.addNode(parentSuiteRunner);
 } else {
  for (XmlSuite childSuite : xmlSuite.getChildSuites()) {
   suiteGraph.addEdge(0, parentSuiteRunner, suiteRunnerMap.get(childSuite));
   populateSuiteGraph(suiteGraph, suiteRunnerMap, childSuite);
  }
 }
}

代码示例来源:origin: org.testng/testng

populateSuiteGraph(suiteGraph, suiteRunnerMap, xmlSuite);

代码示例来源:origin: cbeust/testng

populateSuiteGraph(suiteGraph, suiteRunnerMap, xmlSuite);

相关文章

TestNG类方法