public XmlSuite.ParallelMode getParallel() { XmlSuite.ParallelMode result; if (null != m_parallel || XmlSuite.DEFAULT_PARALLEL.equals(m_parallel)) { result = m_parallel; } else { result = m_suite.getParallel(); } return result; }
/** * Helps represent the contents of {@link XmlTest} as a String. * @param xmlTest - The {@link XmlTest} that needs to be transformed to a String. * @param indent - The indentation. * @return - The String representation */ static String asXml(XmlTest xmlTest, String indent) { return getInstance().asXml(xmlTest, indent); }
/** * @return Returns the excludedGroups. * Note: do not modify the returned value, use {@link #addExcludedGroup(String)}. */ public List<String> getExcludedGroups() { if (m_parentSuite != null) { return m_parentSuite.getExcludedGroups(); } else if (m_xmlGroups != null && (m_xmlGroups.getRun() != null)) { return m_xmlGroups.getRun().getExcludes(); } else { return m_excludedGroups; } }
/** * Clone an XmlClass by copying all its components. */ @Override public Object clone() { XmlClass result = new XmlClass(getName(), getIndex(), loadClasses()); result.setExcludedMethods(getExcludedMethods()); result.setIncludedMethods(getIncludedMethods()); return result; }
@Override public void process(Node node) { XmlTest xmlTest = new XmlTest(xmlSuite); populateTest(xmlTest, node); } });
public int getThreadCount() { return m_threadCount > 0 ? m_threadCount : getSuite().getThreadCount(); }
public Boolean getAllowReturnValues() { if (m_allowReturnValues != null) return m_allowReturnValues; else return getSuite().getAllowReturnValues(); }
/** * @return Returns the includedGroups. * Note: do not modify the returned value, use {@link #addIncludedGroup(String)}. */ public List<String> getIncludedGroups() { if (m_parentSuite != null) { return m_parentSuite.getIncludedGroups(); } else if (m_xmlGroups != null && (m_xmlGroups.getRun() != null)) { return m_xmlGroups.getRun().getIncludes(); } else { // deprecated return m_includedGroups; } }
private static Parser newParser(String path, IPostProcessor processor) { Parser result = new Parser(path); result.setPostProcessor(processor); return result; }
@Override public String getParallel() { return xmlSuite.getParallel().toString(); }
/** * @return Returns the isJUnit. */ public boolean skipFailedInvocationCounts() { Boolean result = m_skipFailedInvocationCounts; if (null == result) { result = m_suite.skipFailedInvocationCounts(); } return result; }
private static IWeaveXml getInstance() { if (testMode) { //Donot resort to caching when running Unit tests for TestNG, because we have to check //both implementations. If we cache the instance, then its not possible to do that. return attemptDefaultImplementationInstantiation(); } return instantiateIfRequired(); }
public Boolean getPreserveOrder() { if (m_preserveOrder == null) { return m_suite.getPreserveOrder(); } return m_preserveOrder; }
/** * @return the verbose level, checking in order: the verbose level on * the suite, the verbose level on the TestNG object, or 1. */ private int getVerbose(XmlSuite xmlSuite) { int result = xmlSuite.getVerbose() != null ? xmlSuite.getVerbose() : (m_verbose != null ? m_verbose : DEFAULT_VERBOSE); return result; }
/** * @return Returns the className. */ public Class<?> getSupportClass() { if (m_class == null) loadClass(); return m_class; }
/** * @return A String representation of this XML suite. */ public String toXml() { return XmlWeaver.asXml(this); }
/** * {@inheritDoc} */ @Override public long getTimeOut() { long result = m_timeOut != 0 ? m_timeOut : (m_xmlTest != null ? m_xmlTest.getTimeOut(0) : 0); return result; }
/** * @return Returns the expression. */ public String getExpression() { return m_script.getScript(); }
/** * Helps represent the contents of {@link XmlSuite} as a String. * * @param suite - The {@link XmlSuite} that needs to be transformed to a String. * @return - The String representation */ static String asXml(XmlSuite suite) { return getInstance().asXml(suite); }