public final class XmlSuiteUtils
extends java.lang.Object
XmlSuite
Modifier and Type | Method and Description |
---|---|
static void |
adjustSuiteNamesToEnsureUniqueness(java.util.List<XmlSuite> suites)
Ensure that two XmlSuite don't have the same name
|
static XmlSuite |
cloneIfContainsTestsWithNamesMatchingAny(XmlSuite xmlSuite,
java.util.List<java.lang.String> testNames)
Creates a cloned copy of the current
XmlSuite if the current suite
contains at-least on <test> whose name matches with the provided names. |
static XmlSuite |
newXmlSuiteUsing(java.util.List<java.lang.String> classes) |
static void |
validateIfSuitesContainDuplicateTests(java.util.List<XmlSuite> suites)
A validator that runs through the list of suites and checks if each of the suites contains
any
XmlTest with the same name. |
public static XmlSuite cloneIfContainsTestsWithNamesMatchingAny(XmlSuite xmlSuite, java.util.List<java.lang.String> testNames)
XmlSuite
if the current suite
contains at-least on <test> whose name matches with the provided names.xmlSuite
- The XmlSuite
to work with.testNames
- The list of testnames to iterate throughXmlSuite
that contains all the tests whose name matched with the provided names.
that was passed. If there were no <test> match that was found throws a TestNGException
public static void validateIfSuitesContainDuplicateTests(java.util.List<XmlSuite> suites)
XmlTest
with the same name. If found, then a TestNGException
is raised.suites
- - The list of XmlSuite
to validate.public static void adjustSuiteNamesToEnsureUniqueness(java.util.List<XmlSuite> suites)
suites
- - The List of XmlSuite
that are to be tested and names updated if duplicate
names found.public static XmlSuite newXmlSuiteUsing(java.util.List<java.lang.String> classes)