| com.canoo.webtest.steps.Step
All known Subclasses: com.canoo.webtest.extension.VerifyImages, com.canoo.webtest.plugins.emailtest.EmailSetConfig, com.canoo.webtest.steps.request.SelectWebClient, com.canoo.webtest.extension.ScriptStep, com.canoo.webtest.extension.spider.ReportLinksStep, com.canoo.webtest.plugins.emailtest.AbstractBaseStep, com.canoo.webtest.steps.TestInfoStep, com.canoo.webtest.steps.request.SelectWindow, com.canoo.webtest.steps.request.CloseWindow, com.canoo.webtest.plugins.exceltest.AbstractExcelStep, com.canoo.webtest.steps.AbstractBrowserAction, com.canoo.webtest.steps.AbstractStepContainer, com.canoo.webtest.extension.dialogs.VerifyNoDialogs, com.canoo.webtest.steps.store.BaseStoreStep, com.canoo.webtest.extension.MyCustomStep, com.canoo.webtest.extension.EnableJavaScript, com.canoo.webtest.extension.groovy.GroovyStep, com.canoo.webtest.plugins.pdftest.AbstractPdfStep, com.canoo.webtest.steps.verify.AbstractVerifyTextStep, com.canoo.webtest.steps.verify.VerifyLinks, com.canoo.webtest.extension.dialogs.ExpectDialog, com.canoo.webtest.steps.AbstractFilter, com.canoo.webtest.steps.form.SelectForm, com.canoo.webtest.extension.VerifyLinkedContent, com.canoo.webtest.steps.request.DragAndDrop, com.canoo.webtest.steps.verify.AbstractVerifyFormStep,
Step | abstract public class Step extends Task implements Serializable,Cloneable(Code) | | Abstract superclass for all test steps. Provides generic services for all subclasses.
author: Carsten Seibert author: Marc Guillemot author: Paul King, ASERT |
Constructor Summary | |
protected | Step() This is the abstract base class for all test step specifications. |
Method Summary | |
protected void | addComputedParameters(Map map) | public Object | clone() This creates a bitwise copy of the receiver. | abstract public void | doExecute() Called to perform the step's functionality. | protected void | emptyParamCheck(String param, String paramName) | public void | execute() Ant calls this method to invoke this task's functionality. | protected Map | getComputedParameters() | public Context | getContext() | protected String | getDefaultPropertyType() | public String | getDescription(String prefix, String suffix) Gets the description with a prefix and suffix if the description is set.
Parameters: prefix - A string to display before the description. Parameters: suffix - A string to display after the description. | public long | getDuration() Gets the execution time for a completed step. | public Map | getParameterDictionary() Gets a snapshot of the values. | protected String | getStepLabel() | protected static IStringVerifier | getVerifier(boolean useRegex) | public Map | getWebtestProperties() | public Map | getWebtestProperties(String propertyType) | public String | getWebtestProperty(String name) Gets a property of the default type.
Parameters: name - The name of the property. | public String | getWebtestProperty(String name, String propertyType) Gets a property of the specified type
Parameters: name - The name of the property. Parameters: propertyType - The kind of property desired. | protected void | handleException(Throwable t) | public boolean | hasDescription() | protected void | integerParamCheck(String param, String paramName, boolean nonNegative) | public boolean | isCompleted() | public boolean | isStarted() | public boolean | isSuccessful() | public void | notifyCompleted() | public void | notifyStarted() | protected void | notifyStepResultsListeners() | public void | notifySuccess() | protected void | nullParamCheck(Object param, String paramName) | protected void | nullResponseCheck() | protected void | optionalIntegerParamCheck(String param, String paramName, boolean nonNegative) | protected void | paramCheck(boolean condition, String message) Throw an exception if the condition holds. | protected void | positiveOrZeroParamCheck(int value, String paramName) | public void | setStepid(String description) | public void | setWebtestProperty(String name, String value) Sets a property of the default type. | public void | setWebtestProperty(String name, String value, String propertyType) Sets a property of the default type.
Parameters: name - The name of the property. Parameters: value - The value of the property. Parameters: propertyType - The kind of property desired. | public String | toString() | protected void | verifyParameters() Called to let the step's implementation validate its parameters. |
DEFAULT_DESCRIPTION | final public static String DEFAULT_DESCRIPTION(Code) | | |
ELEMENT_ATTRIBUTE_ID | final public static String ELEMENT_ATTRIBUTE_ID(Code) | | |
ELEMENT_ATTRIBUTE_NAME | final public static String ELEMENT_ATTRIBUTE_NAME(Code) | | |
PROPERTY_TYPE_ANT | final public static String PROPERTY_TYPE_ANT(Code) | | The property is an ant property.
|
PROPERTY_TYPE_ANT_STRICT | final public static String PROPERTY_TYPE_ANT_STRICT(Code) | | The property is an ant property that must not overwrite an existing property.
|
PROPERTY_TYPE_DEFAULT | final public static String PROPERTY_TYPE_DEFAULT(Code) | | The property type is set according to webtest's defaultPropertyType.
|
PROPERTY_TYPE_DYNAMIC | final public static String PROPERTY_TYPE_DYNAMIC(Code) | | The property is a dynamic property.
|
Step | protected Step()(Code) | | This is the abstract base class for all test step specifications.
|
addComputedParameters | protected void addComputedParameters(Map map)(Code) | | Adds parameters that are not issued from the config file but computed at runtime by the step
Parameters: map - the map in which the parameters should be added |
clone | public Object clone() throws CloneNotSupportedException(Code) | | This creates a bitwise copy of the receiver. Since we do not reference
any complex objects as attributes, the default implementation of
object will do.
The mere relay to the super implementation is left in the code as a
reminder that this needs to be updated as soon as complex objects
are aggregated right here or in a subclass.
|
doExecute | abstract public void doExecute() throws Exception(Code) | | Called to perform the step's functionality.
Before calling this method, the step has been completely initialized (including expanding and verifying the parameters)
and the environment notified of the start.
throws: Exception - |
execute | public void execute()(Code) | | Ant calls this method to invoke this task's functionality.
We expand and verify the steps parameters then call doExecute()
as well as handle lifecycle notifications.
|
getComputedParameters | protected Map getComputedParameters()(Code) | | TODO: would be cleaner to notify the result listener and to give him this information
the "results" parameter of the step |
getDefaultPropertyType | protected String getDefaultPropertyType()(Code) | | |
getDescription | public String getDescription(String prefix, String suffix)(Code) | | Gets the description with a prefix and suffix if the description is set.
Parameters: prefix - A string to display before the description. Parameters: suffix - A string to display after the description. the concatenation of prefix, description and suffix. |
getDuration | public long getDuration()(Code) | | Gets the execution time for a completed step.
the execution time in ms |
getParameterDictionary | public Map getParameterDictionary()(Code) | | Gets a snapshot of the values.
As the value of the attributes can change over time,
it is not possible to fill and cache the Map.
Either fill the Map everytime, or skip the fields and use only the Map.
This method returns all the parameters that were discovered at build time and stored in the .attributes resource.
Overwrite this method if your step doesn't have a .attributes resource
A Map of (attribute name, attribute value) for this step. |
getWebtestProperties | public Map getWebtestProperties()(Code) | | |
getWebtestProperties | public Map getWebtestProperties(String propertyType)(Code) | | |
getWebtestProperty | public String getWebtestProperty(String name)(Code) | | Gets a property of the default type.
Parameters: name - The name of the property. The value of the property. |
hasDescription | public boolean hasDescription()(Code) | | |
integerParamCheck | protected void integerParamCheck(String param, String paramName, boolean nonNegative)(Code) | | |
isCompleted | public boolean isCompleted()(Code) | | |
isStarted | public boolean isStarted()(Code) | | |
isSuccessful | public boolean isSuccessful()(Code) | | |
notifyCompleted | public void notifyCompleted()(Code) | | Called after
Step.doExecute() has completed (successfully or not)
|
notifySuccess | public void notifySuccess()(Code) | | |
nullResponseCheck | protected void nullResponseCheck()(Code) | | |
optionalIntegerParamCheck | protected void optionalIntegerParamCheck(String param, String paramName, boolean nonNegative)(Code) | | |
paramCheck | protected void paramCheck(boolean condition, String message)(Code) | | Throw an exception if the condition holds.
Parameters: condition - If true, throws the exception. Parameters: message - The error message. |
positiveOrZeroParamCheck | protected void positiveOrZeroParamCheck(int value, String paramName)(Code) | | Checks that the parameter's value is non negative
Parameters: paramName - the name of the parameter Parameters: value - the parameter value throws: StepExecutionException - if the value is negative |
setStepid | public void setStepid(String description)(Code) | | Parameters: description - Task.setDescription(String) |
setWebtestProperty | public void setWebtestProperty(String name, String value)(Code) | | Sets a property of the default type.
Parameters: name - The name of the property. Parameters: value - The value of the property. |
verifyParameters | protected void verifyParameters()(Code) | | Called to let the step's implementation validate its parameters.
The method is called after parameter extensions but before
Step.doExecute() .
This implementation does nothing, overwrite as needed.
|
|
|