Enum Class PlanningStrategy
- All Implemented Interfaces:
Serializable
,Comparable<PlanningStrategy>
,Constable
Spec#planExecutionWith
.
Specifies how actual execution of actions (given by Spec#{beforeAll,beforeEach,value,afterEach,afterAll}
) is planned.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionActions will be executed based on dependency resolution.Actions will be executed as they are specified. -
Method Summary
Modifier and TypeMethodDescriptionabstract AutotestEngine.ExecutionPlan
planExecution
(AutotestExecution.Spec executionSpec, Map<String, List<String>> sceneCallGraph, Map<String, List<String>> assertions) Returns an execution plan based on the design which this instance specifies.static PlanningStrategy
Returns the enum constant of this class with the specified name.static PlanningStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PASSTHROUGH
Actions will be executed as they are specified. That is, actions specified forbeforeAll
will be executed inbeforeAll
test execution phase JUnit, as such. -
DEPENDENCY_BASED
Actions will be executed based on dependency resolution. That is, ones specified in
value
will be considered "true" tests and actions depended on by them will be considered "arranging" (or "set up") actions. The framework ensures ones not explicitly specified invalue
but depended on by one in the step to be included inbeforeAll
step.If an action is annotated with
@ClosedBy
and it is inbeforeAll
step, the referenced action will be included inafterAll
step. This addition is done in the reverse order, where actions which have@ClosedBy
are found. At this addition, the target action (an action by specified by@ClosedBy
annotation) should be wrapped by the actionunit 'sWhen
action, so that it will be performed the original action has succeeded. (Without this mechanism, a releasing action will be executed even if a resource to be released is not allocated because of a failure)Similarly, if an action in
beforeEach
has@ClosedBy
, the referenced action will be included inafterEach
step.Suppose,
open
has the@ClosedBy("close")
. If it is inbeforeAll
,close
will be included inafterAll
. Ifclose
is already inafterAll
, it will not be added again. If it is inbeforeEach
,close
will be included inafterEach
.This feature is useful to ensure allocated resources are released.
- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
composeDependencyMapInMain
-
planExecution
public abstract AutotestEngine.ExecutionPlan planExecution(AutotestExecution.Spec executionSpec, Map<String, List<String>> sceneCallGraph, Map<String, List<String>> assertions) Returns an execution plan based on the design which this instance specifies.- Parameters:
executionSpec
- A "spec" object of the execution given at runtime.sceneCallGraph
- A graph that describes relationships between sceneCalls.assertions
- A map from a normal scene to assertion scenes.- Returns:
- An execution plan.
-