Java Doc for Test.java in  » IDE-Netbeans » jemmy » org » netbeans » jemmy » 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 » IDE Netbeans » jemmy » org.netbeans.jemmy 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.lang.Thread
      org.netbeans.jemmy.ActionProducer
         org.netbeans.jemmy.Test

All known Subclasses:   org.netbeans.jemmy.testing.JemmyTest,
Test
public class Test extends ActionProducer implements Timeoutable,Outputable,Scenario(Code)
Jemmy itself provides a way to create tests. Test should implement org.netbeans.jemmy.Scenario interface. Test can be executed from command line:
java [application options] [jemmy options] org.netbeans.jemmy.Test [full name of test class] [test args]
Test elso can be executed by one of the run(...) methods or by
new Test([test class name]).startTest([test args]);


Timeouts used:
Test.WholeTestTimeout - time for the whole test

author:
   Alexandre Iline (alexandre.iline@sun.com)


Field Summary
public static  intSCENARIO_EXCEPTION_STATUS
     Status returned by test if exception appeared inside scenario.
public static  intTEST_PASSED_STATUS
     Positive test status.
public static  intWRONG_PARAMETERS_STATUS
     Status returned by test if wrong parameter was passed.
protected  TestOutoutput
     Test output.
protected  Timeoutstimeouts
     Test timeouts.

Constructor Summary
public  Test(String testClassName)
     Constructor for tests requiring only a class instance.
public  Test(Scenario scenario)
     Constructor for scenarios that require an instance and might require an argument.
protected  Test()
     No argument constructor.

Method Summary
public static  voidcloseDown(int status)
     Throws TestCompletedException exception.
protected  voiddoSleep(long time)
     Sleeps.
final public  StringgetDescription()
    
public  TestOutgetOutput()
     Get the streams or writers used for print output.
public  TimeoutsgetTimeouts()
     Get the timeouts used by this Test.
final public  Objectlaunch(Object obj)
     Launch an action.
public static  voidmain(String[] argv)
     Invoke this Test.
public  voidprintSynopsis()
     Supposed to be overridden to print a synopsys into test output.
public static  intrun(String[] argv)
     Executes a test.
Parameters:
  argv - First element should be a test class name,all others - test args.
public static  intrun(String[] argv, PrintStream output)
     Executes a test.
Parameters:
  argv - First element should be a test class name,all others - test args.
Parameters:
  output - Stream to put test output and errput into.
public static  intrun(String[] argv, PrintStream output, PrintStream errput)
     Executes a test.
Parameters:
  argv - First element should be a test class name,all others - test args.
Parameters:
  output - Stream to put test output into.
Parameters:
  errput - Stream to put test errput into.
public static  intrun(String[] argv, PrintWriter output)
     Executes a test.
Parameters:
  argv - First element should be a test class name,all others - test args.
Parameters:
  output - Writer to put test output and errput into.
public static  intrun(String[] argv, PrintWriter output, PrintWriter errput)
     Executes a test.
Parameters:
  argv - First element should be a test class name,all others - test args.
Parameters:
  output - Writer to put test output into.
Parameters:
  errput - Writer to put test errput into.
public  intrunIt(Object param)
     Defines a way to execute this Test.
Parameters:
  param - An object passed to configure the test scenarioexecution.
public  voidsetOutput(TestOut out)
     Set the streams or writers used for print output.
public  voidsetTimeouts(Timeouts timeouts)
     Set the timeouts used by this Test.
public  intstartTest(Object param)
     Executes test.
Parameters:
  param - Object to be passed into this test's launch(Object) method.
public  ScenariotestForName(String testName)
     Creates an instance of a class named by the parameter.

Field Detail
SCENARIO_EXCEPTION_STATUS
public static int SCENARIO_EXCEPTION_STATUS(Code)
Status returned by test if exception appeared inside scenario.



TEST_PASSED_STATUS
public static int TEST_PASSED_STATUS(Code)
Positive test status.



WRONG_PARAMETERS_STATUS
public static int WRONG_PARAMETERS_STATUS(Code)
Status returned by test if wrong parameter was passed.



output
protected TestOut output(Code)
Test output.



timeouts
protected Timeouts timeouts(Code)
Test timeouts.




Constructor Detail
Test
public Test(String testClassName)(Code)
Constructor for tests requiring only a class instance. Creates a subclass of ActionProducer and java.lang.Thread that runs in a separate thread of execution and waits for execution to finish. The current output stream assignments and timeouts are used.
Parameters:
  testClassName - Full test class name



Test
public Test(Scenario scenario)(Code)
Constructor for scenarios that require an instance and might require an argument. Creates a subclass of ActionProducer and java.lang.Thread that runs in a separate thread of execution and waits for execution to finish. The current output stream assignments and timeouts are used.
Parameters:
  scenario - a test scenario
See Also:   org.netbeans.jemmy.Scenario



Test
protected Test()(Code)
No argument constructor. Used by subclasses of this Test class. Creates a subclass of ActionProducer and java.lang.Thread that runs in a separate thread of execution and waits for execution to finish. The current output stream assignments and timeouts are used.




Method Detail
closeDown
public static void closeDown(int status)(Code)
Throws TestCompletedException exception. The exception thrown contains a pass/fail status and a short status java.lang.String. Can by invoked from test to abort test execution.
Parameters:
  status - If 0 - test passed, otherwise failed.
throws:
  TextCompletedException - all of the time.



doSleep
protected void doSleep(long time)(Code)
Sleeps.
Parameters:
  time - The sleep time in milliseconds.



getDescription
final public String getDescription()(Code)

See Also:   org.netbeans.jemmy.Action



getOutput
public TestOut getOutput()(Code)
Get the streams or writers used for print output. an object containing references to both output and error printstreams.
See Also:   org.netbeans.jemmy.Outputable
See Also:   org.netbeans.jemmy.TestOut
See Also:   Test.setOutput



getTimeouts
public Timeouts getTimeouts()(Code)
Get the timeouts used by this Test.
See Also:   org.netbeans.jemmy.Timeoutable
See Also:   org.netbeans.jemmy.Timeouts
See Also:   Test.setTimeouts



launch
final public Object launch(Object obj)(Code)
Launch an action. Pass arguments to and execute a test Scenario.
Parameters:
  obj - An argument object that controls test execution.This might be a java.lang.String[] containingcommand line arguments.
See Also:   org.netbeans.jemmy.Action an Integer containing test status.



main
public static void main(String[] argv)(Code)
Invoke this Test. The call might be directly from the command line.
Parameters:
  argv - First element should be a test class name,all others - test args.



printSynopsis
public void printSynopsis()(Code)
Supposed to be overridden to print a synopsys into test output.



run
public static int run(String[] argv)(Code)
Executes a test.
Parameters:
  argv - First element should be a test class name,all others - test args. test status.



run
public static int run(String[] argv, PrintStream output)(Code)
Executes a test.
Parameters:
  argv - First element should be a test class name,all others - test args.
Parameters:
  output - Stream to put test output and errput into. test status.



run
public static int run(String[] argv, PrintStream output, PrintStream errput)(Code)
Executes a test.
Parameters:
  argv - First element should be a test class name,all others - test args.
Parameters:
  output - Stream to put test output into.
Parameters:
  errput - Stream to put test errput into. test status.



run
public static int run(String[] argv, PrintWriter output)(Code)
Executes a test.
Parameters:
  argv - First element should be a test class name,all others - test args.
Parameters:
  output - Writer to put test output and errput into. test status.



run
public static int run(String[] argv, PrintWriter output, PrintWriter errput)(Code)
Executes a test.
Parameters:
  argv - First element should be a test class name,all others - test args.
Parameters:
  output - Writer to put test output into.
Parameters:
  errput - Writer to put test errput into. test status.



runIt
public int runIt(Object param)(Code)
Defines a way to execute this Test.
Parameters:
  param - An object passed to configure the test scenarioexecution. For example, this parameter might be ajava.lang.String[] object that lists thecommand line arguments to the Java application correspondingto a test. an int that tells something about the execution.For, example, a status code.
See Also:   org.netbeans.jemmy.Scenario



setOutput
public void setOutput(TestOut out)(Code)
Set the streams or writers used for print output.
Parameters:
  out - An object used to identify both output and errorprint streams.
See Also:   org.netbeans.jemmy.Outputable
See Also:   org.netbeans.jemmy.TestOut
See Also:   Test.getOutput



setTimeouts
public void setTimeouts(Timeouts timeouts)(Code)
Set the timeouts used by this Test.
Parameters:
  timeouts - A collection of timeout assignments.
See Also:   org.netbeans.jemmy.Timeoutable
See Also:   org.netbeans.jemmy.Timeouts
See Also:   Test.getTimeouts



startTest
public int startTest(Object param)(Code)
Executes test.
Parameters:
  param - Object to be passed into this test's launch(Object) method. test status.



testForName
public Scenario testForName(String testName)(Code)
Creates an instance of a class named by the parameter.
Parameters:
  testName - Full test class name an instance of the test Scenario to launch.
See Also:   org.netbeans.jemmy.Scenario



Methods inherited from org.netbeans.jemmy.ActionProducer
final public Object actionProduced(Object obj)(Code)(Java Doc)
public String getDescription()(Code)(Java Doc)
public Throwable getException()(Code)(Java Doc)
public boolean getFinished()(Code)(Java Doc)
public Object getResult()(Code)(Java Doc)
public Timeouts getTimeouts()(Code)(Java Doc)
public Object launch(Object obj)(Code)(Java Doc)
public Object produceAction(Object obj) throws InterruptedException(Code)(Java Doc)
final public void run()(Code)(Java Doc)
public void setActionPriority(int newPriority)(Code)(Java Doc)
public void setOutput(TestOut out)(Code)(Java Doc)
public void setTimeouts(Timeouts ts)(Code)(Java Doc)

Fields inherited from java.lang.Thread
final public static int MAX_PRIORITY(Code)(Java Doc)
final public static int MIN_PRIORITY(Code)(Java Doc)
final public static int NORM_PRIORITY(Code)(Java Doc)

Methods inherited from java.lang.Thread
public static int activeCount()(Code)(Java Doc)
final public void checkAccess()(Code)(Java Doc)
native public int countStackFrames()(Code)(Java Doc)
native public static Thread currentThread()(Code)(Java Doc)
public void destroy()(Code)(Java Doc)
public static void dumpStack()(Code)(Java Doc)
public static int enumerate(Thread tarray)(Code)(Java Doc)
public static Map<Thread, StackTraceElement[]> getAllStackTraces()(Code)(Java Doc)
public ClassLoader getContextClassLoader()(Code)(Java Doc)
public static UncaughtExceptionHandler getDefaultUncaughtExceptionHandler()(Code)(Java Doc)
public long getId()(Code)(Java Doc)
final public String getName()(Code)(Java Doc)
final public int getPriority()(Code)(Java Doc)
public StackTraceElement[] getStackTrace()(Code)(Java Doc)
public State getState()(Code)(Java Doc)
final public ThreadGroup getThreadGroup()(Code)(Java Doc)
public UncaughtExceptionHandler getUncaughtExceptionHandler()(Code)(Java Doc)
native public static boolean holdsLock(Object obj)(Code)(Java Doc)
public void interrupt()(Code)(Java Doc)
public static boolean interrupted()(Code)(Java Doc)
final native public boolean isAlive()(Code)(Java Doc)
final public boolean isDaemon()(Code)(Java Doc)
public boolean isInterrupted()(Code)(Java Doc)
final public synchronized void join(long millis) throws InterruptedException(Code)(Java Doc)
final public synchronized void join(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
final public void join() throws InterruptedException(Code)(Java Doc)
final public void resume()(Code)(Java Doc)
public void run()(Code)(Java Doc)
public void setContextClassLoader(ClassLoader cl)(Code)(Java Doc)
final public void setDaemon(boolean on)(Code)(Java Doc)
public static void setDefaultUncaughtExceptionHandler(UncaughtExceptionHandler eh)(Code)(Java Doc)
final public void setName(String name)(Code)(Java Doc)
final public void setPriority(int newPriority)(Code)(Java Doc)
public void setUncaughtExceptionHandler(UncaughtExceptionHandler eh)(Code)(Java Doc)
native public static void sleep(long millis) throws InterruptedException(Code)(Java Doc)
public static void sleep(long millis, int nanos) throws InterruptedException(Code)(Java Doc)
public synchronized void start()(Code)(Java Doc)
final public void stop()(Code)(Java Doc)
final public synchronized void stop(Throwable obj)(Code)(Java Doc)
final public void suspend()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
native public static void yield()(Code)(Java Doc)

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.