Java Doc for GWTTestCase.java in  » Ajax » GWT » com » google » gwt » junit » client » 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 » Ajax » GWT » com.google.gwt.junit.client 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.google.gwt.junit.client.GWTTestCase

All known Subclasses:   com.google.gwt.user.client.CommandExecutorTest,  com.google.gwt.user.client.ui.WidgetOnLoadTest,  com.google.gwt.emultest.java.lang.ByteTest,  com.google.gwt.user.client.rpc.CustomFieldSerializerTest,  com.google.gwt.emultest.java.lang.SystemTest,  com.google.gwt.user.client.ui.TabBarTest,  com.google.gwt.dev.jjs.test.ClassObjectTest,  com.google.gwt.dev.jjs.test.AutoboxTest,  com.google.gwt.dev.jjs.test.NativeLongTest,  com.google.gwt.user.client.ui.RichTextAreaTest,  com.google.gwt.dev.jjs.test.EnhancedForLoopTest,  com.google.gwt.user.client.ui.PanelTest,  com.google.gwt.dev.jjs.test.ClassCastTest,  com.google.gwt.user.client.ui.WidgetIteratorsTest,  com.google.gwt.i18n.client.I18N2Test,  com.google.gwt.user.client.ui.ListBoxTest,  com.google.gwt.user.client.ui.LinearPanelTest,  com.google.gwt.emultest.java.lang.DoubleTest,  com.google.gwt.user.client.rpc.ObjectGraphTest,  com.google.gwt.user.client.ui.AbsolutePanelTest,  com.google.gwt.emultest.java.lang.ObjectTest,  com.google.gwt.junit.client.TestManualAsync,  com.google.gwt.user.client.CookieTest,  com.google.gwt.dev.jjs.test.HostedTest,  com.google.gwt.dev.jjs.test.MethodBindTest,  com.google.gwt.emultest.java.lang.ShortTest,  com.google.gwt.user.client.ui.CustomButtonTest,  test.ServletMappingTest,  com.google.gwt.user.client.ui.impl.ClippedImagePrototypeTest,  com.google.gwt.emultest.java.lang.StringBufferTest,  com.google.gwt.user.client.rpc.EnumsTest,  com.google.gwt.user.client.ui.TreeTest,  com.google.gwt.http.client.RequestBuilderTest,  com.google.gwt.dev.jjs.test.BlankInterfaceTest,  com.google.gwt.user.client.RandomTest,  com.google.gwt.user.client.ui.WidgetCollectionTest,  com.google.gwt.dev.jjs.test.CompilerTest,  com.google.gwt.i18n.client.NumberParse_fr_Test,  com.google.gwt.user.client.ui.PopupTest,  com.google.gwt.dev.shell.test.MultiModuleTest,  com.google.gwt.emultest.java.util.StackTest,  com.google.gwt.dev.jjs.test.MethodCallTest,  com.google.gwt.emultest.java.util.EmulTestBase,  com.google.gwt.user.client.ui.DelegatingKeyboardListenerCollectionTest,  com.google.gwt.user.client.ui.HistoryTest,  com.google.gwt.user.client.ui.ImageTest,  com.google.gwt.user.client.ui.FastStringMapTest,  com.google.gwt.i18n.client.NumberParse_en_Test,  com.google.gwt.dev.jjs.test.EnumsTest,  com.google.gwt.user.client.ui.DisclosurePanelTest,  com.google.gwt.user.client.ui.PrefixTreeTest,  com.google.gwt.i18n.client.NumberFormat_fr_Test,  com.google.gwt.dev.jjs.test.InnerOuterSuperTest,  com.google.gwt.i18n.client.DateTimeParse_zh_CN_Test,  com.google.gwt.emultest.java.util.EnumMapTest,  com.google.gwt.http.client.RequestTest,  com.google.gwt.user.client.ui.UIObjectTest,  com.google.gwt.user.client.rpc.UnicodeEscapingTest,  com.google.gwt.user.client.rpc.CollectionsTest,  com.google.gwt.json.client.JSONTest,  com.google.gwt.user.client.ui.TabPanelTest,  com.google.gwt.user.client.ui.StackPanelTest,  com.google.gwt.module.client.SingleScriptInjectionTest,  com.google.gwt.user.client.ui.FormPanelTest,  com.google.gwt.i18n.client.I18NTest,  com.google.gwt.user.client.ui.SplitPanelTest,  com.google.gwt.i18n.client.NumberFormat_en_Test,  com.google.gwt.user.client.ui.FocusPanelTest,  com.google.gwt.user.client.ui.TextAreaTest,  com.google.gwt.dev.jjs.test.MiscellaneousTest,  com.google.gwt.emultest.java.lang.IntegerTest,  com.google.gwt.user.client.ui.HiddenTest,  com.google.gwt.dev.jjs.test.MemberShadowingTest,  com.google.gwt.emultest.java.util.EnumSetTest,  com.google.gwt.user.client.ui.RadioButtonTest,  com.google.gwt.dev.jjs.test.InnerClassTest,  com.google.gwt.emultest.java.lang.BooleanTest,  com.google.gwt.user.client.ui.DOMTest,  com.google.gwt.user.client.ui.HorizontalPanelTest,  com.google.gwt.module.client.DoubleScriptInjectionTest,  com.google.gwt.emultest.java.util.DateTest,  com.google.gwt.user.client.WindowTest,  com.google.gwt.user.client.rpc.ValueTypesTest,  com.google.gwt.user.client.ui.HTMLTableTestBase,  com.google.gwt.junit.client.Benchmark,  com.google.gwt.dev.jjs.test.VarargsTest,  com.google.gwt.http.client.ResponseTest,  com.google.gwt.emultest.java.lang.StringTest,  com.google.gwt.user.client.ui.CheckBoxTest,  com.google.gwt.dev.jjs.test.MethodInterfaceTest,  com.google.gwt.junit.client.GWTTestCaseTest,  com.google.gwt.user.client.rpc.RemoteServiceServletTest,  com.google.gwt.user.client.ui.DockPanelTest,  com.google.gwt.user.client.ui.NamedFrameTest,  com.google.gwt.user.client.ui.ScrollPanelTest,  com.google.gwt.emultest.java.lang.FloatTest,  com.google.gwt.http.client.URLTest,  com.google.gwt.user.client.rpc.InheritanceTest,  com.google.gwt.user.client.ui.VerticalPanelTest,  com.google.gwt.emultest.java.lang.CharacterTest,  com.google.gwt.user.client.ui.FlowPanelTest,  com.google.gwt.xml.client.XMLTest,  com.google.gwt.i18n.client.DateTimeFormat_de_Test,  com.google.gwt.junit.client.ParallelRemoteTest,  com.google.gwt.i18n.client.DateTimeParse_en_Test,  com.google.gwt.user.client.ui.HTMLPanelTest,  com.google.gwt.user.client.Profile,
GWTTestCase
abstract public class GWTTestCase extends TestCase (Code)
Acts as a bridge between the JUnit environment and the GWT environment. We hook the run method and stash the TestResult object for later communication between the test runner and the unit test shell that drives the test case inside a hosted browser.

There are two versions of this class. This version is the binary version that derives from JUnit's TestCase and handles all the work of starting up the GWT environment. The other version is a translatable class that is used within the browser. See the translatable subpackage for the translatable implementation.





Method Summary
final public  voidaddCheckpoint(String msg)
     Add a checkpoint message to the current test.
public  booleancatchExceptions()
     Determines whether or not exceptions will be caught by the test fixture. Override this method and return false to let exceptions escape to the browser.
final public  voidclearCheckpoints()
     Clears the accumulated list of checkpoint messages.
final protected  voiddelayTestFinish(int timeoutMillis)
     Put the current test in asynchronous mode.
final protected  voidfinishTest()
     Cause this test to succeed during asynchronous mode.
final public  String[]getCheckpoints()
     Returns the current set of checkpoint messages.
abstract public  StringgetModuleName()
     Specifies a module to use when running this test case.
final protected  TestResultsgetTestResults()
     Returns the overall test results for this unit test.
final public  voidrun(TestResult result)
     Stashes result so that it can be accessed during GWTTestCase.runTest() .
final protected  voidrunTest()
     Runs the test via the JUnitShell environment.



Method Detail
addCheckpoint
final public void addCheckpoint(String msg)(Code)
Add a checkpoint message to the current test. If this test fails, all checkpoint messages will be appended to the getException description. This can be useful in web mode for determining how far test execution progressed before a failure occurs.
Parameters:
  msg - the checkpoint message to add



catchExceptions
public boolean catchExceptions()(Code)
Determines whether or not exceptions will be caught by the test fixture. Override this method and return false to let exceptions escape to the browser. This will break the normal JUnit reporting functionality, but can be useful in web mode with a JavaScript debugger to pin down where exceptions are originating. true for normal JUnit behavior, orfalse to disable normal JUnit getException reporting



clearCheckpoints
final public void clearCheckpoints()(Code)
Clears the accumulated list of checkpoint messages.
See Also:   GWTTestCase.addCheckpoint(String)



delayTestFinish
final protected void delayTestFinish(int timeoutMillis)(Code)
Put the current test in asynchronous mode. If the test method completes normally, this test will not immediately succeed. Instead, a delay period begins. During the delay period, the test system will wait for one of three things to happen:
  1. If GWTTestCase.finishTest() is called before the delay period expires, the test will succeed.
  2. If any getException escapes from an event handler during the delay period, the test will error with the thrown getException.
  3. If the delay period expires and neither of the above has happened, the test will error with a TimeoutException .

This method is typically used to test event driven functionality.

Example:


Parameters:
  timeoutMillis - how long to wait before the current test will time out
See Also:   GWTTestCase.finishTest()
throws:
  UnsupportedOperationException - if this test case is aBenchmark



finishTest
final protected void finishTest()(Code)
Cause this test to succeed during asynchronous mode. After calling GWTTestCase.delayTestFinish(int) , call this method during the delay period to cause this test to succeed. This method is typically called from an event handler some time after the test method returns control to the caller.

Calling this method before the test method completes, will undo the effect of having called delayTestFinish(). The test will revert to normal, non-asynchronous mode.

Example:


throws:
  IllegalStateException - if this test is not in asynchronous mode.
throws:
  UnsupportedOperationException - if this test case is aBenchmark
See Also:   GWTTestCase.delayTestFinish(int)



getCheckpoints
final public String[] getCheckpoints()(Code)
Returns the current set of checkpoint messages. a non-null array of checkpoint messages
See Also:   GWTTestCase.addCheckpoint(String)



getModuleName
abstract public String getModuleName()(Code)
Specifies a module to use when running this test case. Subclasses must return the name of a module that will cause the source for that subclass to be included. the fully qualified name of a module



getTestResults
final protected TestResults getTestResults()(Code)
Returns the overall test results for this unit test. These TestResults are more comprehensive than JUnit's default test results, and are automatically collected by GWT's testing infrastructure.



run
final public void run(TestResult result)(Code)
Stashes result so that it can be accessed during GWTTestCase.runTest() .



runTest
final protected void runTest() throws Throwable(Code)
Runs the test via the JUnitShell environment.



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