Class TestStep


  • public class TestStep
    extends java.lang.Object
    This class represents a test step in a FunctionalTestStep
    Since:
    1.0.0
    • Constructor Detail

      • TestStep

        public TestStep()
        Instantiates a new Test step.
        Since:
        1.0.0
      • TestStep

        public TestStep​(TestStep tStep)
        Instantiates a new Test step using an existing TestStep
        Parameters:
        tStep - the test step
        Since:
        1.0.0
    • Method Detail

      • getStepNumber

        public int getStepNumber()
        Gets step number.
        Returns:
        the step number
        Since:
        1.0.0
      • setStepNumber

        public void setStepNumber​(int stepNumber)
        Sets step number.
        Parameters:
        stepNumber - the step number
        Since:
        1.0.0
      • getStepName

        public java.lang.String getStepName()
        Gets step name.
        Returns:
        the step name
        Since:
        1.0.0
      • setStepName

        public void setStepName​(java.lang.String stepName)
        Sets step name.
        Parameters:
        stepName - the step name
        Since:
        1.0.0
      • getDescription

        public java.lang.String getDescription()
        Gets description.
        Returns:
        the description
        Since:
        1.0.0
      • setDescription

        public void setDescription​(java.lang.String description)
        Sets description.
        Parameters:
        description - the description
        Since:
        1.0.0
      • getObjectMap

        public java.lang.String getObjectMap()
        Gets object map.
        Returns:
        The name of the Object Map that was used with this TestStep
        Since:
        1.0.0
      • setObjectMap

        public void setObjectMap​(java.lang.String objectMap)
        Sets object map.
        Parameters:
        objectMap - The name of the Object Map this TestStep may be using
        Since:
        1.0.0
      • getPage

        public java.lang.String getPage()
        Gets page. Currently the Fast framework expects this field to follow the format "Title={titleOfPage}"
        Returns:
        Information pertaining to a page TestStep is to interact with.
        Since:
        1.0.0
      • setPage

        public void setPage​(java.lang.String page)
        Sets page. Used to know which tab to switch to in a web browser. Currently the Fast framework expects this field to follow the format "Title={titleOfPage}"
        Parameters:
        page - The page this TestStep is to interact with.
        Since:
        1.0.0
      • getFrame

        public java.lang.String getFrame()
        Gets frame. Usually contains the attributes needed to find a frame. The Fast framework uses this field to switch into a particular frame that may exist on a web page.
        Returns:
        Information pertaining to a frame this TestStep interacts with.
        Since:
        1.0.0
      • setFrame

        public void setFrame​(java.lang.String frame)
        Sets frame. Usually contains the attributes needed to find this frame. The Fast framework uses this field to switch into a particular frame that may exist on a web page.
        Parameters:
        frame - The frame this TestStep interacts with.
        Since:
        1.0.0
      • getObject

        public java.lang.String getObject()
        Gets object. Usually contains the attributes needed to find an object. The Fast framework uses this field to find an object on a web page.
        Returns:
        Information pertaining to an object this TestStep interacts with.
        Since:
        1.0.0
      • setObject

        public void setObject​(java.lang.String object)
        Sets object. Usually contains the attributes or xpath needed to find this object. The Fast framework uses this field to find an object on a web page.
        Parameters:
        object - The object this TestStep interacts with.
        Since:
        1.0.0
      • getData

        public java.lang.String getData()
        Gets data.
        Returns:
        Data that may be used with this TestStep, that may serve a different function depending on which action is being used.
        Since:
        1.0.0
      • setData

        public void setData​(java.lang.String data)
        Sets data.
        Parameters:
        data - Data that may be used with this TestStep, that may serve a different function depending on which action is being used.
        Since:
        1.0.0
      • getAction

        public java.lang.String getAction()
        Gets action. Unless using a custom action, this value should match an Action. If this field does not exactly match an Action, the user will need to implement custom logic for the action.
        Returns:
        The action this TestStep is going to use. "NONE" if the value is null or an empty string.
        Since:
        1.0.0
      • setAction

        public void setAction​(java.lang.String action)
        Sets action. Unless using a custom action, this value should match an Action. If this field does not exactly match an Action, the user will need to implement custom logic for the action.
        Parameters:
        action - The action this TestStep is going to use.
        Since:
        1.0.0
      • getDataGen

        public java.lang.String getDataGen()
        Gets data gen. Unless using a custom datagen, this value should match a DataGen. If this field does not match a DataGen, the user will need to implement custom logic for the datagen.
        Returns:
        The datagen this TestStep is going to use. "NONE" if the value is null or an empty string
        Since:
        1.0.0
      • setDataGen

        public void setDataGen​(java.lang.String dataGen)
        Sets data gen. Unless using a custom datagen, this value should match a DataGen. If this field does not match a DataGen, the user will need to implement custom logic for the datagen.
        Parameters:
        dataGen - The datagen this TestStep is going to use.
        Since:
        1.0.0
      • getDataType

        public java.lang.String getDataType()
        Gets data type. Unless using a custom datatype, this value should match an AutoGenerateDataType. If this field does not match an AutoGenerateDataType, the user will need to implement custom logic to work with the datatype.
        Returns:
        the data type
        Since:
        1.0.0
      • setDataType

        public void setDataType​(java.lang.String dataType)
        Sets data type. Unless using a custom datatype, this value should match an AutoGenerateDataType. If this field does not match an AutoGenerateDataType, the user will need to implement custom logic to work with the datatype.
        Parameters:
        dataType - The dataType this TestStep is going to use.
        Since:
        1.0.0
      • getDataParameters

        public java.lang.String getDataParameters()
        Gets data parameters. Used to provide additional data parameters for executing test steps.
        Returns:
        the data parameters
        Since:
        1.0.0
      • setDataParameters

        public void setDataParameters​(java.lang.String dataParameters)
        Sets data parameters. Used to provide additional data parameters for executing test steps.
        Parameters:
        dataParameters - the data parameters
        Since:
        1.0.0
      • getReference

        public java.lang.String getReference()
        Gets reference. This field can be used to set a value into a reference with or without using the CREATE_REFERENCE action. The data in data is what will be set into the reference..
        Returns:
        the reference
        Since:
        1.0.0
      • setReference

        public void setReference​(java.lang.String reference)
        Sets reference. The data in data will be set into the designated reference. If the reference is not properly created, use the CREATE_REFERENCE action to create the reference instead.
        Parameters:
        reference - the reference
        Since:
        1.0.0
      • getScreenshot

        public java.lang.String getScreenshot()
        Gets screenshot. This field tells the framework to take a screeshot.
        Returns:
        The value in the screenshot field.
        Since:
        1.0.0
      • setScreenshot

        public void setScreenshot​(java.lang.String screenshot)
        Sets screenshot. This field tells the framework to take a screenshot.
        Parameters:
        screenshot - Expected values are "true" or "yes" case insensitive for if you want a screenshot taken. Anything else will result in no screenshot being taken.
        Since:
        1.0.0
      • isScreenshotTaken

        public boolean isScreenshotTaken()
        Is screenshot taken boolean.
        Returns:
        true if a screenshot has been taken by this TestStep
        Since:
        1.0.0
      • setScreenshotTaken

        public void setScreenshotTaken​(boolean screenshotTaken)
        Sets screenshot taken.
        Parameters:
        screenshotTaken - true if a screenshot was taken
        Since:
        1.0.0
      • setStatus

        public void setStatus​(Status status)
        Sets status.
        Parameters:
        status - the status
        Since:
        1.0.0
      • getMessage

        public java.lang.String getMessage()
        Gets message. Can potentially have information pertaining to a TestStep's execution.
        Returns:
        the message
        Since:
        1.0.0
      • setMessage

        public void setMessage​(java.lang.String message)
        Sets message.
        Parameters:
        message - the message
        Since:
        1.0.0
      • setFramework

        public void setFramework​(Framework framework)
        Sets framework.
        Parameters:
        framework - the Framework that FAST will use to execute steps.
        Since:
        1.0.0
      • getParentFramework

        public Framework getParentFramework()
        Gets the Framework of the FunctionalTestStep this TestStep is a part of. Will be null if not being parsed from a FAST xml file.
        Returns:
        the parent framework
        Since:
        1.0.0
      • setParentFramework

        public void setParentFramework​(Framework parentFramework)
        Sets parent framework.
        Parameters:
        parentFramework - The Framework that this TestStep should use as its parent framework
        Since:
        1.0.0
      • setFailType

        public void setFailType​(FailType failType)
        Sets the FailType this TestStep should use if its execution fails.
        Parameters:
        failType - the fail type
      • getFastException

        public FastException getFastException()
        An exception that may have been thrown if this TestStep failed during execution
        Returns:
        A FastException
        Since:
        1.0.0
      • setFastException

        public void setFastException​(FastException fastException)
        Sets fast exception.
        Parameters:
        fastException - the fast exception
        Since:
        1.0.0
      • setFastException

        public void setFastException​(java.lang.Exception exception)
        Sets fast exception. Uses an Exception to create a FastException
        Parameters:
        exception - the exception
        Since:
        1.0.0
      • setTestStepFields

        public void setTestStepFields​(TestStepFields testStepFields)
        Sets test step fields.
        Parameters:
        testStepFields - the test step fields
        Since:
        1.0.0
      • setFastRunProperties

        public void setFastRunProperties​(FastRunProperties fastRunProperties)
        Sets fast run properties.
        Parameters:
        fastRunProperties - the fast run properties
        Since:
        1.0.0
      • getDetailedResultFolder

        public java.lang.String getDetailedResultFolder()
        Gets detailed result folder. This is the location that the detailed result reports will be written to
        Returns:
        the detailed result folder
        Since:
        1.0.0
      • setDetailedResultFolder

        public void setDetailedResultFolder​(java.lang.String detailedResultFolder)
        Sets detailed result folder.
        Parameters:
        detailedResultFolder - the filepath to the detailed result folder
        Since:
        1.0.0
      • getStartTime

        public java.util.Date getStartTime()
        Gets start time. The Date this TestStep begins executing
        Returns:
        the start time
        Since:
        1.0.0
      • setStartTime

        public void setStartTime​(java.util.Date startTime)
        Sets start time. The time this TestStep is to begin executing
        Parameters:
        startTime - the start time
        Since:
        1.0.0
      • getEndTime

        public java.util.Date getEndTime()
        Gets end time. The Date this TestStep stops executing
        Returns:
        the end time
        Since:
        1.0.0
      • setEndTime

        public void setEndTime​(java.util.Date endTime)
        Sets end time. The time this TestStep stops executing
        Parameters:
        endTime - the end time
        Since:
        1.0.0
      • getRunId

        public java.lang.String getRunId()
        Gets run id. Usually set by eFast
        Returns:
        the run id
        Since:
        1.0.0
      • setRunId

        public void setRunId​(java.lang.String runId)
        Sets run id.
        Parameters:
        runId - the run id
        Since:
        1.0.0
      • getFtsNumber

        public int getFtsNumber()
        Gets fts number. This should match the ftsNumber of the FunctionalTestStep this TestStep belongs to
        Returns:
        the fts number
        Since:
        1.0.0
      • setFtsNumber

        public void setFtsNumber​(int ftsNumber)
        Sets fts number.
        Parameters:
        ftsNumber - the fts number
        Since:
        1.0.0
      • getTestScriptNumber

        public int getTestScriptNumber()
        Gets test script number. This should match the testScriptNumber of the TestScript this TestStep belongs to
        Returns:
        the test script number
        Since:
        1.0.0
      • setTestScriptNumber

        public void setTestScriptNumber​(int testScriptNumber)
        Sets test script number.
        Parameters:
        testScriptNumber - the test script number
        Since:
        1.0.0
      • execute

        public void execute()
                     throws FastException
        This method executes this TestStep
        Throws:
        FastException - the fast exception that could have been thrown if this step failed during execution
        Since:
        1.0.0