Package org.citrusframework.container
Class Template
java.lang.Object
org.citrusframework.actions.AbstractTestAction
org.citrusframework.container.Template
- All Implemented Interfaces:
Described,Named,TestAction,TestActorAware
This class represents a previously defined block of test actions. Test cases can call
templates and reuse their functionality.
Templates operate on test variables. While calling, the template caller can set these
variables as parameters.
Nested test actions are executed in sequence.
The template execution may affect existing variable values in the calling test case. So
variables may have different values in the test case after template execution. Therefore
users can create a local test context by setting globalContext to false. Templates then will
have no affect on the variables used in the test case.
- Since:
- 2007
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classTemplate.AbstractTemplateBuilder<T extends Template,B extends Template.AbstractTemplateBuilder<T, B>> Action builder.static classAction builder. -
Field Summary
Fields inherited from class org.citrusframework.actions.AbstractTestAction
description -
Constructor Summary
ConstructorsConstructorDescriptionTemplate(Template.AbstractTemplateBuilder<? extends Template, ?> builder) Default constructor -
Method Summary
Modifier and TypeMethodDescriptionvoiddoExecute(TestContext context) Subclasses may add custom execution logic here.Gets the list of action builders.Gets the actions.Gets the parameter.booleanGets the globalContext.Methods inherited from class org.citrusframework.actions.AbstractTestAction
execute, getActor, getDescription, getName, isDisabled, setActor, setDescription, setName
-
Constructor Details
-
Template
Default constructor- Parameters:
builder-
-
-
Method Details
-
doExecute
Description copied from class:AbstractTestActionSubclasses may add custom execution logic here.- Specified by:
doExecutein classAbstractTestAction
-
getParameter
Gets the parameter.- Returns:
- the parameter
-
isGlobalContext
public boolean isGlobalContext()Gets the globalContext.- Returns:
- the globalContext
-
getActions
Gets the actions.- Returns:
- the actions
-
getActionBuilders
Gets the list of action builders.- Returns:
- the action builders.
-
getTemplateName
-