Package org.citrusframework.common
Interface TestLoader
public interface TestLoader
Test loader interface.
- Since:
- 2.1
- Author:
- Christoph Deppisch
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final org.slf4j.LoggerLoggerstatic final StringTest loader resource lookup pathstatic final Stringstatic final ResourcePathTypeResolverDefault Citrus test loader from classpath resource propertiesstatic final Stringstatic final String -
Method Summary
Modifier and TypeMethodDescriptionvoidconfigureTestCase(Consumer<TestCase> handler) Adds test case handler that is called before test case gets executed.voiddoWithTestCase(Consumer<TestCase> handler) Adds test case handler that is called once the test case has been loaded.Gets the loaded test case or null if it has not been loaded yet.voidload()Loads and creates new test case object.static Map<String,TestLoader> lookup()Resolves all available test loader from resource path lookup.static Optional<TestLoader>Resolves test loader from resource path lookup with given resource name.voidsetPackageName(String packageName) voidsetTestClass(Class<?> testClass) voidsetTestName(String testName)
-
Field Details
-
logger
static final org.slf4j.Logger loggerLogger -
RESOURCE_PATH
Test loader resource lookup path- See Also:
-
TYPE_RESOLVER
Default Citrus test loader from classpath resource properties -
XML
- See Also:
-
YAML
- See Also:
-
SPRING
- See Also:
-
GROOVY
- See Also:
-
-
Method Details
-
load
void load()Loads and creates new test case object. -
configureTestCase
Adds test case handler that is called before test case gets executed.- Parameters:
handler-
-
doWithTestCase
Adds test case handler that is called once the test case has been loaded.- Parameters:
handler-
-
setTestClass
-
setTestName
-
setPackageName
-
getTestCase
TestCase getTestCase()Gets the loaded test case or null if it has not been loaded yet.- Returns:
-
lookup
Resolves all available test loader from resource path lookup. Scans classpath for test loader meta information and instantiates the components.- Returns:
-
lookup
Resolves test loader from resource path lookup with given resource name. Scans classpath for test loader meta information with given name and returns instance of the loader. Returns optional instead of throwing exception when no test loader could be found.- Parameters:
loader-- Returns:
-