Package com.qcefast.fastXml
Class TestStep
- java.lang.Object
-
- com.qcefast.fastXml.TestStep
-
public class TestStep extends java.lang.Object
This class represents a test step in aFunctionalTestStep
- Since:
- 1.0.0
-
-
Method Summary
Modifier and Type Method Description void
execute()
This method executes thisTestStep
java.lang.String
getAction()
Gets action.java.lang.String
getData()
Gets data.java.lang.String
getDataGen()
Gets data gen.java.lang.String
getDataParameters()
Gets data parameters.java.lang.String
getDataType()
Gets data type.java.lang.String
getDescription()
Gets description.java.lang.String
getDetailedResultFolder()
Gets detailed result folder.java.util.Date
getEndTime()
Gets end time.FailType
getFailType()
FastException
getFastException()
An exception that may have been thrown if thisTestStep
failed during executionFastRunProperties
getFastRunProperties()
GetsFastRunProperties
thisTestStep
will execute withjava.lang.String
getFrame()
Gets frame.Framework
getFramework()
int
getFtsNumber()
Gets fts number.java.lang.String
getMessage()
Gets message.java.lang.String
getObject()
Gets object.java.lang.String
getObjectMap()
Gets object map.java.lang.String
getPage()
Gets page.Framework
getParentFramework()
java.lang.String
getReference()
Gets reference.java.lang.String
getRunId()
Gets run id.java.lang.String
getScreenshot()
Gets screenshot.java.util.Date
getStartTime()
Gets start time.Status
getStatus()
java.lang.String
getStepName()
Gets step name.int
getStepNumber()
Gets step number.int
getTestScriptNumber()
Gets test script number.TestStepFields
getTestStepFields()
Gets test step fields.boolean
isScreenshotTaken()
Is screenshot taken boolean.void
setAction(java.lang.String action)
Sets action.void
setData(java.lang.String data)
Sets data.void
setDataGen(java.lang.String dataGen)
Sets data gen.void
setDataParameters(java.lang.String dataParameters)
Sets data parameters.void
setDataType(java.lang.String dataType)
Sets data type.void
setDescription(java.lang.String description)
Sets description.void
setDetailedResultFolder(java.lang.String detailedResultFolder)
Sets detailed result folder.void
setEndTime(java.util.Date endTime)
Sets end time.void
setFailType(FailType failType)
void
setFastException(FastException fastException)
Sets fast exception.void
setFastException(java.lang.Exception exception)
Sets fast exception.void
setFastRunProperties(FastRunProperties fastRunProperties)
Sets fast run properties.void
setFrame(java.lang.String frame)
Sets frame.void
setFramework(Framework framework)
Sets framework.void
setFtsNumber(int ftsNumber)
Sets fts number.void
setMessage(java.lang.String message)
Sets message.void
setObject(java.lang.String object)
Sets object.void
setObjectMap(java.lang.String objectMap)
Sets object map.void
setPage(java.lang.String page)
Sets page.void
setParentFramework(Framework parentFramework)
Sets parent framework.void
setReference(java.lang.String reference)
Sets reference.void
setRunId(java.lang.String runId)
Sets run id.void
setScreenshot(java.lang.String screenshot)
Sets screenshot.void
setScreenshotTaken(boolean screenshotTaken)
Sets screenshot taken.void
setStartTime(java.util.Date startTime)
Sets start time.void
setStatus(Status status)
Sets status.void
setStepName(java.lang.String stepName)
Sets step name.void
setStepNumber(int stepNumber)
Sets step number.void
setTestScriptNumber(int testScriptNumber)
Sets test script number.void
setTestStepFields(TestStepFields testStepFields)
Sets test step fields.
-
-
-
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 thisTestStep
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 thisTestStep
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 thisTestStep
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 thisTestStep
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 thisTestStep
, 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 anAction
. If this field does not exactly match anAction
, 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 anAction
. If this field does not exactly match anAction
, the user will need to implement custom logic for the action.- Parameters:
action
- The action thisTestStep
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 aDataGen
. If this field does not match aDataGen
, 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 aDataGen
. If this field does not match aDataGen
, the user will need to implement custom logic for the datagen.- Parameters:
dataGen
- The datagen thisTestStep
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 anAutoGenerateDataType
. If this field does not match anAutoGenerateDataType
, 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 anAutoGenerateDataType
. If this field does not match anAutoGenerateDataType
, the user will need to implement custom logic to work with the datatype.- Parameters:
dataType
- The dataType thisTestStep
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 indata
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 indata
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
-
getStatus
public Status getStatus()
- Returns:
- The execution
Status
. ReturnsStatus.NO_RUN
ifstatus
is null. - 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 aTestStep
'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
- theFramework
that FAST will use to execute steps.- Since:
- 1.0.0
-
getParentFramework
public Framework getParentFramework()
Gets theFramework
of theFunctionalTestStep
thisTestStep
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.
-
getFailType
public FailType getFailType()
- Returns:
- A
FailType
. IffailType
is null, returnsFailType.FAIL_TSTEP
- Since:
- 1.0.0
-
setFailType
public void setFailType(FailType failType)
- Parameters:
failType
- the fail type
-
getFastException
public FastException getFastException()
An exception that may have been thrown if thisTestStep
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 anException
to create aFastException
- Parameters:
exception
- the exception- Since:
- 1.0.0
-
getTestStepFields
public TestStepFields getTestStepFields()
Gets test step fields.TestStepFields
contains informationTestStep
's may need to execute steps, and build reports- Returns:
- A
TestStepFields
- Since:
- 1.0.0
-
setTestStepFields
public void setTestStepFields(TestStepFields testStepFields)
Sets test step fields.- Parameters:
testStepFields
- the test step fields- Since:
- 1.0.0
-
getFastRunProperties
public FastRunProperties getFastRunProperties()
GetsFastRunProperties
thisTestStep
will execute with- Returns:
- the fast run properties
- 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. TheDate
thisTestStep
begins executing- Returns:
- the start time
- Since:
- 1.0.0
-
setStartTime
public void setStartTime(java.util.Date startTime)
Sets start time. The time thisTestStep
is to begin executing- Parameters:
startTime
- the start time- Since:
- 1.0.0
-
getEndTime
public java.util.Date getEndTime()
Gets end time. TheDate
thisTestStep
stops executing- Returns:
- the end time
- Since:
- 1.0.0
-
setEndTime
public void setEndTime(java.util.Date endTime)
Sets end time. The time thisTestStep
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 theFunctionalTestStep
thisTestStep
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 theTestScript
thisTestStep
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 thisTestStep
- Throws:
FastException
- the fast exception that could have been thrown if this step failed during execution- Since:
- 1.0.0
-
-