Example #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);
 }
Example #2
0
  /**
   * 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;
  }
Example #3
0
 // For YAML
 public void setJunit(boolean isJUnit) {
   setJUnit(isJUnit);
 }