public class TestClassesUtil
extends java.lang.Object
IntegrationTest.
see IntegrationTest, DemoTest and UnitTest| Modifier and Type | Class and Description |
|---|---|
static class |
TestClassesUtil.FILTER
FILTER_BY_EXTENSIONIf set, this filter will only allow extensions to be scanned that are in the given list. The expected format is a single String or a Collection of Strings
FILTER_BY_PACKAGEIf set, this filter will only accept test classes for the given packages. Reg expressions like de.hybris.*.cockpit.* are allowed! The expected format is a single String or a Collection of Strings The positive list is evaluated before the negative list! FILTER_BY_PACKAGE_NEGATIVEIf set, this filter will only accept test classes that NOT match these packages. Reg expressions like de.hybris.*.cockpit.* are allowed! The expected format is a single String or a Collection of Strings The positive list is evaluated before the negative list! FILTER_BY_ANNOTATIONIf set, this filter will only accept test classes that are annotated with the given annotation classes. The expected format is a single (annotation) class or a Collection of class files Supported are DemoTest, IntegrationTest, PerformanceTest, ManualTest and/or
UnitTest
SPLIT_FILTERIf set, this filter will split the final amount of tests by the given string, which can be used for automatic testing purposes. |
| Modifier and Type | Method and Description |
|---|---|
void |
addFilter(TestClassesUtil.FILTER filter,
java.lang.Object filterValue)
This method adds a filter to the scanning process.
|
static void |
addTestSrcFoldersToClassPath(PlatformConfig platformConfig,
GroovyClassLoader ret) |
static TestClassesUtil |
createBootstrapInstance(PlatformConfig platformConfig)
Constructs an instance in the bootstrap environment.
|
static TestClassesUtil |
createInstance(PlatformConfig platformConfig,
PlatformInPlaceClassLoader inPlaceClassLoader) |
static TestClassesUtil |
createIntegrationInstance(PlatformConfig platformConfig)
Constructs an instance in the integrated environment.
|
static java.lang.ClassLoader |
createTestClassLoader(PlatformConfig platformConfig,
java.lang.ClassLoader parent) |
java.util.Collection<java.lang.Class> |
getAllBugProofTestClasses()
This method resets all filters and scans for
BugProofTest annotated classes. |
java.util.Collection<java.lang.Class> |
getAllDemoTestClasses()
This method resets all filters and scans for
DemoTest annotated classes. |
java.util.Collection<java.lang.Class> |
getAllIntegrationTestClasses()
This method resets all filters and scans for
IntegrationTest annotated classes.This method also returns classes that only have Test annotations before test methods! |
java.util.Collection<java.lang.Class> |
getAllManualTestClasses()
This method resets all filters and scans for
ManualTest annotated classes. |
java.util.Collection<java.lang.Class> |
getAllPerformanceTestClasses()
This method resets all filters and scans for
PerformanceTest annotated classes. |
java.util.Collection<java.lang.Class> |
getAllTestClasses()
This method resets all filters and scans for
UnitTest, IntegrationTest, DemoTest,
ManualTest and PerformanceTest annotated classes.Classes that only have @Test annotations before methods are treated as IntegrationTests. |
java.util.Collection<java.lang.Class> |
getAllUnitTestClasses()
This method resets all filters and scans for
UnitTest annotated classes. |
java.util.Collection<java.lang.Class> |
getAllWebTestClasses() |
java.lang.ClassLoader |
getClassLoaderForTests() |
java.util.Collection<java.lang.Class> |
getFilteredTestClasses()
Returns all test classes according to the filters that are set.
|
java.lang.String |
getModuleClasspaths(ExtensionModule... modules)
Get classpaths for selected modules.
|
java.lang.String |
getWebModuleClasspaths() |
boolean |
matchesPackageFilters(java.lang.Class clazz) |
boolean |
matchesPackageFilters(java.lang.String string) |
void |
resetFilter()
Clears all filters!
|
void |
setLogging(boolean logging) |
void |
setWebRelated(boolean webRelated) |
public static TestClassesUtil createBootstrapInstance(PlatformConfig platformConfig)
PlatformInPlaceClassLoader
for give platformConfig.public void setWebRelated(boolean webRelated)
public static TestClassesUtil createIntegrationInstance(PlatformConfig platformConfig)
public static TestClassesUtil createInstance(PlatformConfig platformConfig, PlatformInPlaceClassLoader inPlaceClassLoader)
public static java.lang.ClassLoader createTestClassLoader(PlatformConfig platformConfig, java.lang.ClassLoader parent)
public static void addTestSrcFoldersToClassPath(PlatformConfig platformConfig, GroovyClassLoader ret)
public java.lang.ClassLoader getClassLoaderForTests()
public java.util.Collection<java.lang.Class> getAllTestClasses()
UnitTest, IntegrationTest, DemoTest,
ManualTest and PerformanceTest annotated classes.public java.util.Collection<java.lang.Class> getAllWebTestClasses()
public java.util.Collection<java.lang.Class> getAllUnitTestClasses()
UnitTest annotated classes.UnitTestpublic java.util.Collection<java.lang.Class> getAllIntegrationTestClasses()
IntegrationTest annotated classes.IntegrationTest or have at least one @Test
annotationpublic java.util.Collection<java.lang.Class> getAllDemoTestClasses()
DemoTest annotated classes.DemoTestpublic java.util.Collection<java.lang.Class> getAllPerformanceTestClasses()
PerformanceTest annotated classes.PerformanceTestpublic java.util.Collection<java.lang.Class> getAllManualTestClasses()
ManualTest annotated classes.ManualTestpublic java.util.Collection<java.lang.Class> getAllBugProofTestClasses()
BugProofTest annotated classes.BugProofTestpublic void addFilter(TestClassesUtil.FILTER filter, java.lang.Object filterValue)
filter - see TestClassesUtil.FILTERfilterValue - The filterValue can either be an Object or a Collection of Objects. See description of TestClassesUtil.FILTERpublic void resetFilter()
public java.util.Collection<java.lang.Class> getFilteredTestClasses()
public java.lang.String getWebModuleClasspaths()
public java.lang.String getModuleClasspaths(ExtensionModule... modules)
modules - List of modules to retrieve classpaths for.null is returned.public boolean matchesPackageFilters(java.lang.Class clazz)
public void setLogging(boolean logging)
public boolean matchesPackageFilters(java.lang.String string)
Copyright © 2018 SAP SE. All Rights Reserved.