public class TestClassesUtil extends 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,
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 ClassLoader |
createTestClassLoader(PlatformConfig platformConfig,
ClassLoader parent) |
Collection<Class> |
getAllBugProofTestClasses()
This method resets all filters and scans for
BugProofTest annotated classes. |
Collection<Class> |
getAllDemoTestClasses()
This method resets all filters and scans for
DemoTest annotated classes. |
Collection<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! |
Collection<Class> |
getAllManualTestClasses()
This method resets all filters and scans for
ManualTest annotated classes. |
Collection<Class> |
getAllPerformanceTestClasses()
This method resets all filters and scans for
PerformanceTest annotated classes. |
Collection<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. |
Collection<Class> |
getAllUnitTestClasses()
This method resets all filters and scans for
UnitTest annotated classes. |
Collection<Class> |
getAllWebTestClasses() |
ClassLoader |
getClassLoaderForTests() |
Collection<Class> |
getFilteredTestClasses()
Returns all test classes according to the filters that are set.
|
String |
getWebModuleClasspaths() |
boolean |
matchesPackageFilters(Class clazz) |
boolean |
matchesPackageFilters(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 ClassLoader createTestClassLoader(PlatformConfig platformConfig, ClassLoader parent)
public static void addTestSrcFoldersToClassPath(PlatformConfig platformConfig, GroovyClassLoader ret)
public ClassLoader getClassLoaderForTests()
public Collection<Class> getAllTestClasses()
UnitTest, IntegrationTest, DemoTest,
ManualTest and PerformanceTest annotated classes.public Collection<Class> getAllWebTestClasses()
public Collection<Class> getAllUnitTestClasses()
UnitTest annotated classes.UnitTestpublic Collection<Class> getAllIntegrationTestClasses()
IntegrationTest annotated classes.IntegrationTest or have at least one @Test
annotationpublic Collection<Class> getAllDemoTestClasses()
DemoTest annotated classes.DemoTestpublic Collection<Class> getAllPerformanceTestClasses()
PerformanceTest annotated classes.PerformanceTestpublic Collection<Class> getAllManualTestClasses()
ManualTest annotated classes.ManualTestpublic Collection<Class> getAllBugProofTestClasses()
BugProofTest annotated classes.BugProofTestpublic void addFilter(TestClassesUtil.FILTER filter, 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 Collection<Class> getFilteredTestClasses()
public String getWebModuleClasspaths()
public boolean matchesPackageFilters(Class clazz)
public void setLogging(boolean logging)
public boolean matchesPackageFilters(String string)
Copyright © 2017 SAP SE. All Rights Reserved.