Java Doc for StepRunner.java in  » Testing » abbot-1.0.1 » abbot » script » 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 » abbot 1.0.1 » abbot.script 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   abbot.script.StepRunner

All known Subclasses:   abbot.script.ForkedStepRunner,
StepRunner
public class StepRunner (Code)
Provides control and tracking of the execution of a step or series of steps. By default the runner stops execution on the first encountered failure/error. The running environment is preserved to the extent possible, which includes discarding any GUI components created by the code under test.

If you wish to preserve the application state when there is an error, you can use the method StepRunner.setTerminateOnError(boolean) .


Inner Class :protected class ExitHandler extends NoExitSecurityManager

Field Summary
protected  AWTFixtureHelperhelper
    
protected  Hierarchyhierarchy
    

Constructor Summary
public  StepRunner()
     This ctor uses a new instance of TestHierarchy as the default Hierarchy.
public  StepRunner(AWTFixtureHelper helper)
     Create a new runner.

Method Summary
public  voidaddStepListener(StepListener sl)
    
protected  voidcheckFile(Script script)
     Throw an exception if the file does not exist.
protected  voidclearErrors()
    
protected  SecurityManagercreateSecurityManager()
     Create a security manager to use for the duration of this runner's execution.
protected  voidfireStepEnd(Step step)
    
protected  voidfireStepError(Step step, Throwable thr)
    
protected  voidfireStepEvent(StepEvent event)
     If this is used to propagate a failure/error, be sure to invoke setError on the step first.
protected  voidfireStepFailure(Step step, Throwable afe)
    
protected  voidfireStepProgress(Step step, int val)
    
protected  voidfireStepStart(Step step)
    
public  UIContextgetCurrentContext()
    
public  ThrowablegetError(Step step)
    
public  HierarchygetHierarchy()
    
public  booleangetStopOnError()
    
public  booleangetStopOnFailure()
    
public  booleangetTerminateOnError()
    
protected synchronized  voidinstallSecurityManager()
     Install a security manager to ensure we prevent the AUT from exiting and can clean up when it tries to.
public  voidlaunch(Script step)
     Similar to StepRunner.run(Step) , but defers to the Script to determine what subset of steps should be run as the UI context.
protected synchronized  voidremoveSecurityManager()
    
public  voidremoveStepListener(StepListener sl)
    
public  voidrun(Step step)
     Run the given step, propagating any failures or errors to listeners.
protected  voidrunStep(Step step)
     Main run method, which stores any failures or exceptions for later retrieval.
protected  voidsetError(Step step, Throwable thr)
    
public  voidsetStopOnError(boolean stop)
    
public  voidsetStopOnFailure(boolean stop)
    
public  voidsetTerminateOnError(boolean state)
     Set whether the application under test should be terminated when an error is encountered and script execution stopped.
public  voidstop()
     Stop execution of the script after the current step completes.
public  voidstop(boolean terminate)
     Stop execution, indicating whether to terminate the app.
public  booleanstopped()
     Return whether the runner has been stopped.
public  voidterminate()
     Dispose of any extant windows and restore any saved environment state.

Field Detail
helper
protected AWTFixtureHelper helper(Code)



hierarchy
protected Hierarchy hierarchy(Code)




Constructor Detail
StepRunner
public StepRunner()(Code)
This ctor uses a new instance of TestHierarchy as the default Hierarchy. Note that any existing GUI components at the time of this object's creation will be ignored.



StepRunner
public StepRunner(AWTFixtureHelper helper)(Code)
Create a new runner. The given Hierarchy maintains which GUI components are in or out of scope of the runner. The AWTFixtureHelper will be used to restore state if StepRunner.terminate() is called.




Method Detail
addStepListener
public void addStepListener(StepListener sl)(Code)



checkFile
protected void checkFile(Script script) throws InvalidScriptException(Code)
Throw an exception if the file does not exist.



clearErrors
protected void clearErrors()(Code)



createSecurityManager
protected SecurityManager createSecurityManager()(Code)
Create a security manager to use for the duration of this runner's execution. The default prevents invoked applications from invoking System.exit(int) and invokes StepRunner.terminate() instead.



fireStepEnd
protected void fireStepEnd(Step step)(Code)



fireStepError
protected void fireStepError(Step step, Throwable thr)(Code)



fireStepEvent
protected void fireStepEvent(StepEvent event)(Code)
If this is used to propagate a failure/error, be sure to invoke setError on the step first.



fireStepFailure
protected void fireStepFailure(Step step, Throwable afe)(Code)



fireStepProgress
protected void fireStepProgress(Step step, int val)(Code)



fireStepStart
protected void fireStepStart(Step step)(Code)



getCurrentContext
public UIContext getCurrentContext()(Code)



getError
public Throwable getError(Step step)(Code)



getHierarchy
public Hierarchy getHierarchy()(Code)
The designated hierarchy for this StepRunner,or null if none.



getStopOnError
public boolean getStopOnError()(Code)



getStopOnFailure
public boolean getStopOnFailure()(Code)



getTerminateOnError
public boolean getTerminateOnError()(Code)



installSecurityManager
protected synchronized void installSecurityManager()(Code)
Install a security manager to ensure we prevent the AUT from exiting and can clean up when it tries to.



launch
public void launch(Script step) throws Throwable(Code)
Similar to StepRunner.run(Step) , but defers to the Script to determine what subset of steps should be run as the UI context.
Parameters:
  step -



removeSecurityManager
protected synchronized void removeSecurityManager()(Code)



removeStepListener
public void removeStepListener(StepListener sl)(Code)



run
public void run(Step step) throws Throwable(Code)
Run the given step, propagating any failures or errors to listeners. This method should be used for any execution that should be treated as a single logical action. This method is primarily used to execute a script, but may be used in other circumstances to execute one or more steps in isolation. The StepRunner.terminate() method will be invoked if the script is stopped for any reason, unless StepRunner.setTerminateOnError(boolean) has been called with a false argument. Otherwise StepRunner.terminate() will only be called if a Terminate step is encountered.
See Also:   StepRunner.terminate()



runStep
protected void runStep(Step step) throws Throwable(Code)
Main run method, which stores any failures or exceptions for later retrieval. Any step will fire STEP_START events to all registered StepListener s on starting, and exactly one of STEP_END, STEP_FAILURE, or STEP_ERROR upon termination. If stopOnFailure/stopOnError is set false, then both STEP_FAILURE/ERROR may be sent in addition to STEP_END.



setError
protected void setError(Step step, Throwable thr)(Code)



setStopOnError
public void setStopOnError(boolean stop)(Code)



setStopOnFailure
public void setStopOnFailure(boolean stop)(Code)



setTerminateOnError
public void setTerminateOnError(boolean state)(Code)
Set whether the application under test should be terminated when an error is encountered and script execution stopped. The default implementation always terminates.



stop
public void stop()(Code)
Stop execution of the script after the current step completes. The launched application will be left in its current state.



stop
public void stop(boolean terminate)(Code)
Stop execution, indicating whether to terminate the app.



stopped
public boolean stopped()(Code)
Return whether the runner has been stopped.



terminate
public void terminate()(Code)
Dispose of any extant windows and restore any saved environment state.



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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