Java Doc for Step.java in  » Testing » webtest » com » canoo » webtest » steps » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Testing » webtest » com.canoo.webtest.steps 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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


Field Summary
final public static  StringDEFAULT_DESCRIPTION
    
final public static  StringELEMENT_ATTRIBUTE_ID
    
final public static  StringELEMENT_ATTRIBUTE_NAME
    
final public static  StringPROPERTY_TYPE_ANT
     The property is an ant property.
final public static  StringPROPERTY_TYPE_ANT_STRICT
     The property is an ant property that must not overwrite an existing property.
final public static  StringPROPERTY_TYPE_DEFAULT
     The property type is set according to webtest's defaultPropertyType.
final public static  StringPROPERTY_TYPE_DYNAMIC
     The property is a dynamic property.

Constructor Summary
protected  Step()
     This is the abstract base class for all test step specifications.

Method Summary
protected  voidaddComputedParameters(Map map)
    
public  Objectclone()
     This creates a bitwise copy of the receiver.
abstract public  voiddoExecute()
     Called to perform the step's functionality.
protected  voidemptyParamCheck(String param, String paramName)
    
public  voidexecute()
     Ant calls this method to invoke this task's functionality.
protected  MapgetComputedParameters()
    
public  ContextgetContext()
    
protected  StringgetDefaultPropertyType()
    
public  StringgetDescription(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  longgetDuration()
     Gets the execution time for a completed step.
public  MapgetParameterDictionary()
     Gets a snapshot of the values.
protected  StringgetStepLabel()
    
protected static  IStringVerifiergetVerifier(boolean useRegex)
    
public  MapgetWebtestProperties()
    
public  MapgetWebtestProperties(String propertyType)
    
public  StringgetWebtestProperty(String name)
     Gets a property of the default type.
Parameters:
  name - The name of the property.
public  StringgetWebtestProperty(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  voidhandleException(Throwable t)
    
public  booleanhasDescription()
    
protected  voidintegerParamCheck(String param, String paramName, boolean nonNegative)
    
public  booleanisCompleted()
    
public  booleanisStarted()
    
public  booleanisSuccessful()
    
public  voidnotifyCompleted()
    
public  voidnotifyStarted()
    
protected  voidnotifyStepResultsListeners()
    
public  voidnotifySuccess()
    
protected  voidnullParamCheck(Object param, String paramName)
    
protected  voidnullResponseCheck()
    
protected  voidoptionalIntegerParamCheck(String param, String paramName, boolean nonNegative)
    
protected  voidparamCheck(boolean condition, String message)
     Throw an exception if the condition holds.
protected  voidpositiveOrZeroParamCheck(int value, String paramName)
    
public  voidsetStepid(String description)
    
public  voidsetWebtestProperty(String name, String value)
     Sets a property of the default type.
public  voidsetWebtestProperty(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  StringtoString()
    
protected  voidverifyParameters()
     Called to let the step's implementation validate its parameters.

Field Detail
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.




Constructor Detail
Step
protected Step()(Code)
This is the abstract base class for all test step specifications.




Method Detail
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 -



emptyParamCheck
protected void emptyParamCheck(String param, String paramName)(Code)



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



getContext
public Context getContext()(Code)



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.




getStepLabel
protected String getStepLabel()(Code)



getVerifier
protected static IStringVerifier getVerifier(boolean useRegex)(Code)



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.



getWebtestProperty
public String getWebtestProperty(String name, String propertyType)(Code)
Gets a property of the specified type
Parameters:
  name - The name of the property.
Parameters:
  propertyType - The kind of property desired. One of Step.PROPERTY_TYPE_ANT,Step.PROPERTY_TYPE_DYNAMIC or Step.PROPERTY_TYPE_DEFAULT. The value of the property.



handleException
protected void handleException(Throwable t)(Code)
Called if Step.doExecute() throws an exception
Parameters:
  t - the thrown exception



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)



notifyStarted
public void notifyStarted()(Code)
Called before calling Step.doExecute()



notifyStepResultsListeners
protected void notifyStepResultsListeners()(Code)
Notifies the interested project build listeners (typically only the com.canoo.webtest.reporting.StepExecutionListener ) that this step has produced results



notifySuccess
public void notifySuccess()(Code)



nullParamCheck
protected void nullParamCheck(Object param, String paramName)(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.



setWebtestProperty
public void setWebtestProperty(String name, String value, String propertyType)(Code)
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. One of Step.PROPERTY_TYPE_ANT,Step.PROPERTY_TYPE_ANT_STRICT, Step.PROPERTY_TYPE_DYNAMIC or Step.PROPERTY_TYPE_DEFAULT.



toString
public String toString()(Code)



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.



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.