示例#1
0
 /** Generate testng-failed.xml */
 private void createXmlTest(
     ITestContext context, List<ITestNGMethod> methods, XmlTest srcXmlTest) {
   XmlTest xmlTest = new XmlTest(m_xmlSuite);
   xmlTest.setName(context.getName() + "(failed)");
   xmlTest.setBeanShellExpression(srcXmlTest.getExpression());
   xmlTest.setIncludedGroups(srcXmlTest.getIncludedGroups());
   xmlTest.setExcludedGroups(srcXmlTest.getExcludedGroups());
   xmlTest.setParallel(srcXmlTest.getParallel());
   xmlTest.setParameters(srcXmlTest.getLocalParameters());
   xmlTest.setJUnit(srcXmlTest.isJUnit());
   List<XmlClass> xmlClasses = createXmlClasses(methods, srcXmlTest);
   xmlTest.setXmlClasses(xmlClasses);
 }
示例#2
0
文件: XmlTest.java 项目: JIGD/testng
  /**
   * Clone the <TT>source</TT> <CODE>XmlTest</CODE> by including: - test attributes - groups
   * definitions - parameters
   *
   * <p>The &lt;classes&gt; sub element is ignored for the moment.
   *
   * @return a clone of the current XmlTest
   */
  @Override
  public Object clone() {
    XmlTest result = new XmlTest(getSuite());

    result.setName(getName());
    result.setIncludedGroups(getIncludedGroups());
    result.setExcludedGroups(getExcludedGroups());
    result.setJUnit(isJUnit());
    result.setParallel(getParallel());
    result.setVerbose(getVerbose());
    result.setParameters(getParameters());
    result.setXmlPackages(getXmlPackages());

    Map<String, List<String>> metagroups = getMetaGroups();
    for (Map.Entry<String, List<String>> group : metagroups.entrySet()) {
      result.addMetaGroup(group.getKey(), group.getValue());
    }

    return result;
  }
示例#3
0
文件: XmlTest.java 项目: JIGD/testng
 // For YAML
 public void setJunit(boolean isJUnit) {
   setJUnit(isJUnit);
 }