Class AbstractTestAction

java.lang.Object
org.citrusframework.actions.AbstractTestAction
All Implemented Interfaces:
org.citrusframework.common.Described, org.citrusframework.common.Named, org.citrusframework.TestAction, org.citrusframework.TestActorAware
Direct Known Subclasses:
AbstractActionContainer, AbstractAsyncTestAction, AntRunAction, ApplyTestBehaviorAction, CreateEndpointAction, CreateVariablesAction, EchoAction, FailAction, InputAction, JavaAction, LoadPropertiesAction, PurgeEndpointAction, ReceiveMessageAction, ReceiveTimeoutAction, SendMessageAction, SleepAction, StartServerAction, StopServerAction, StopTimeAction, StopTimerAction, Template, TraceVariablesAction, TransformAction, Wait

public abstract class AbstractTestAction extends Object implements org.citrusframework.TestAction, org.citrusframework.common.Named, org.citrusframework.common.Described, org.citrusframework.TestActorAware
Abstract base class for test actions. Class provides a default name and description.
  • Field Details

    • description

      protected String description
      Describing the test action
  • Constructor Details

  • Method Details

    • execute

      public void execute(org.citrusframework.context.TestContext context)
      Do basic logging and delegate execution to subclass.
      Specified by:
      execute in interface org.citrusframework.TestAction
    • isDisabled

      public boolean isDisabled(org.citrusframework.context.TestContext context)
      Checks if this test action is disabled. Delegates to test actor defined for this test action by default. Subclasses may add additional disabled logic here.
      Specified by:
      isDisabled in interface org.citrusframework.TestAction
      Parameters:
      context - the current test context.
      Returns:
    • doExecute

      public abstract void doExecute(org.citrusframework.context.TestContext context)
      Subclasses may add custom execution logic here.
    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.citrusframework.common.Described
    • setDescription

      public AbstractTestAction setDescription(String description)
      Specified by:
      setDescription in interface org.citrusframework.common.Described
    • getName

      public String getName()
      Specified by:
      getName in interface org.citrusframework.TestAction
    • setName

      public void setName(String name)
      Specified by:
      setName in interface org.citrusframework.common.Named
    • getActor

      public org.citrusframework.TestActor getActor()
      Gets the actor.
      Specified by:
      getActor in interface org.citrusframework.TestAction
      Returns:
      the actor to get.
    • setActor

      public AbstractTestAction setActor(org.citrusframework.TestActor actor)
      Sets the actor.
      Specified by:
      setActor in interface org.citrusframework.TestActorAware
      Parameters:
      actor - the actor to set