Package de.bmiag.tapir.execution.plan
Class ExecutionPlanBuilder
- java.lang.Object
-
- de.bmiag.tapir.execution.plan.ExecutionPlanBuilder
-
@Component("tapirExecutionPlanBuilder") public class ExecutionPlanBuilder extends java.lang.Object
TheExecutionPlanBuilder
builds the execution plan based on a given Class which has to be annotated byTestSuite
orTestClass
. It does so by traversing the test suites and test classes and gathering the information provided by classes, method/steps and annotations. Using this information the execution plan is constructed.
TheExecutionPlanBuilder
is aware of all annotations defined in the de.bmiag.tapir.execution.annotations package.Parameter
andIteratedParameter
is evaluated by this class and the constructed execution plan includes test classes and test steps for each calculated iteration.- Since:
- 2.0.0
- Author:
- Oliver Libutzki <[email protected]>
-
-
Constructor Summary
Constructors Constructor Description ExecutionPlanBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutionPlan
buildExecutionPlan(java.lang.Class<?> javaClass)
Builds an execution plan based on he given javaClass.protected java.util.Optional<? extends StructuralElement>
buildStructuralElement(java.lang.Class<?> javaClass, StructuralElementContainer parent)
protected java.util.Optional<? extends StructuralElement>
buildTestClass(java.lang.Class<?> javaClass, TestClass testClassAnnotation, StructuralElementContainer parent)
protected java.util.List<TestStep>
buildTestSteps(java.lang.Object testInstance, TestClass parentTestClass)
protected java.lang.Iterable<TestStep>
buildTestSteps(java.lang.reflect.Method stepMethod, java.lang.Object testInstance, TestClass parentTestClass)
protected java.util.Optional<TestSuite>
buildTestSuite(java.lang.Class<?> javaClass, TestSuite testSuiteAnnotation, StructuralElementContainer parent)
void
checkDataProviderElementsForLicense(java.lang.Iterable<?> values)
protected java.util.Optional<java.lang.String>
getDescription(java.lang.reflect.AnnotatedElement annotatedElement)
protected java.util.List<java.lang.String>
getIssues(java.lang.reflect.AnnotatedElement annotatedElement)
protected java.util.List<java.lang.reflect.Method>
getStepMethods(java.lang.Class<?> testClass)
protected java.util.List<java.lang.String>
getTags(java.lang.reflect.AnnotatedElement annotatedElement)
protected java.lang.Object
getTestClassInstance(java.lang.Class<?> javaClass)
protected java.lang.Object
getTestSuiteInstance(java.lang.Class<?> javaClass)
protected java.util.Optional<java.lang.String>
getTitle(java.lang.reflect.AnnotatedElement annotatedElement)
protected boolean
isParallelized(java.lang.reflect.AnnotatedElement annotatedElement)
protected boolean
isProceedOnFailure(java.lang.reflect.AnnotatedElement annotatedElement)
-
-
-
Method Detail
-
buildExecutionPlan
public ExecutionPlan buildExecutionPlan(java.lang.Class<?> javaClass)
Builds an execution plan based on he given javaClass.- Parameters:
javaClass
- the root test suite or test class- Returns:
- the constructed execution plan
- Since:
- 2.0.0
-
buildStructuralElement
protected java.util.Optional<? extends StructuralElement> buildStructuralElement(java.lang.Class<?> javaClass, StructuralElementContainer parent)
-
buildTestSuite
protected java.util.Optional<TestSuite> buildTestSuite(java.lang.Class<?> javaClass, TestSuite testSuiteAnnotation, StructuralElementContainer parent)
-
buildTestClass
protected java.util.Optional<? extends StructuralElement> buildTestClass(java.lang.Class<?> javaClass, TestClass testClassAnnotation, StructuralElementContainer parent)
-
checkDataProviderElementsForLicense
public void checkDataProviderElementsForLicense(java.lang.Iterable<?> values)
-
getTestSuiteInstance
protected java.lang.Object getTestSuiteInstance(java.lang.Class<?> javaClass)
-
getTestClassInstance
protected java.lang.Object getTestClassInstance(java.lang.Class<?> javaClass)
-
buildTestSteps
protected java.util.List<TestStep> buildTestSteps(java.lang.Object testInstance, TestClass parentTestClass)
-
buildTestSteps
protected java.lang.Iterable<TestStep> buildTestSteps(java.lang.reflect.Method stepMethod, java.lang.Object testInstance, TestClass parentTestClass)
-
getStepMethods
protected java.util.List<java.lang.reflect.Method> getStepMethods(java.lang.Class<?> testClass)
-
isProceedOnFailure
protected boolean isProceedOnFailure(java.lang.reflect.AnnotatedElement annotatedElement)
-
getTitle
protected java.util.Optional<java.lang.String> getTitle(java.lang.reflect.AnnotatedElement annotatedElement)
-
getDescription
protected java.util.Optional<java.lang.String> getDescription(java.lang.reflect.AnnotatedElement annotatedElement)
-
getTags
protected java.util.List<java.lang.String> getTags(java.lang.reflect.AnnotatedElement annotatedElement)
-
getIssues
protected java.util.List<java.lang.String> getIssues(java.lang.reflect.AnnotatedElement annotatedElement)
-
isParallelized
protected boolean isParallelized(java.lang.reflect.AnnotatedElement annotatedElement)
-
-