Interface Scene

All Superinterfaces:
WithOid

public interface Scene extends WithOid

An interface that represents a reusable unit of an action in insdog's programming model. An instance of this object contains 0 or more Act instances.

Note that Scene uses the same map for both input and output.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    A builder for Scene class.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    A default value of default variable name for Scene.Builder and @Export.
    static final String
    A place-holder variable name to which an output from a sink will be assigned
  • Method Summary

    Modifier and Type
    Method
    Description
    // @formatter:off A synonym of new Scene.Builder().
    begin(String defaultVariableName)
     
    Returns members of this scene object, which are executed as "children".
    static Scene
    create(String variableName, Act<?,?>... acts)
    Creates a scene by chaining acts.
    static Scene
    create(Act<?,?>... acts)
    Creates a scene by chaining acts.
    default List<String>
    Returns a list of variables that are accessed by child scenes of this object.
    default String
    Returns a name of this object.
    oid()
    Returns an object identifier of this object.
    default List<String>
    Returns a list of variables that are assigned by child scenes of this object.
    default com.github.dakusui.actionunit.core.Action
    Creates a sequential action from the child calls of this object

    Methods inherited from interface jp.co.moneyforward.autotest.framework.action.WithOid

    workingVariableStoreName
  • Field Details

    • DEFAULT_DEFAULT_VARIABLE_NAME

      static final String DEFAULT_DEFAULT_VARIABLE_NAME
      A default value of default variable name for Scene.Builder and @Export. This value is currently defined page for historical reason. However, InspektorDog is designed not only for GUI end-to-end test, but a general purpose testing framework. The value should be changed to a more context neutral keyword, such as var or session.
      See Also:
    • DUMMY_OUTPUT_VARIABLE_NAME

      static final String DUMMY_OUTPUT_VARIABLE_NAME
      A place-holder variable name to which an output from a sink will be assigned
  • Method Details

    • begin

      static Scene.Builder begin()

      // @formatter:off A synonym of new Scene.Builder(). Use this in combination with Scene#end() so that your code looks like:

      class YourClass {
        void method() {
          Scene.begin()
               .act(yourAct())
               .assertion(s -> s.then().looksOkay())
               .end()
        }
      }
      

      // @formatter:on

      Returns:
      A new Scene.Builder object.
    • begin

      static Scene.Builder begin(String defaultVariableName)
    • create

      static Scene create(String variableName, Act<?,?>... acts)
      Creates a scene by chaining acts. When you need to handle multiple variables, use Scene.Builder directly.
      Parameters:
      variableName - A variable chained acts read input value from and write output value to.
      acts - Acts from which a scene is created.
      Returns:
      Created scene.
    • create

      static Scene create(Act<?,?>... acts)

      Creates a scene by chaining acts. This method internally calls create(String, Act[]) using DEFAULT_DEFAULT_VARIABLE_NAME as a variableName.

      When you need to handle other variables, use create(String, Act[]) or Scene.Builder, instead.

      Parameters:
      acts - Acts from which a scene is created.
      Returns:
      Created scene.
    • toSequentialAction

      default com.github.dakusui.actionunit.core.Action toSequentialAction(ActionComposer actionComposer)
      Creates a sequential action from the child calls of this object
      Parameters:
      actionComposer - A visitor that builds a sequential action from child calls of this object.
      Returns:
      A sequential action created from child calls
      See Also:
    • children

      List<Call> children()
      Returns members of this scene object, which are executed as "children".
      Returns:
      members of this scene object.
    • oid

      String oid()
      Returns an object identifier of this object.
      Specified by:
      oid in interface WithOid
      Returns:
      An object identifier of this object.
    • name

      default String name()
      Returns a name of this object. The returned string will appear in an action tree printed during the action execution.
      Returns:
      A name of this object.
    • outputVariableNames

      default List<String> outputVariableNames()
      Returns a list of variables that are assigned by child scenes of this object.
      Returns:
      A list of variables that are assigned by child scenes of this object.
    • inputVariableNames

      default List<String> inputVariableNames()
      Returns a list of variables that are accessed by child scenes of this object.
      Returns:
      A list of variables that are accessed by child scenes of this object.