Source Code Cross Referenced for WebappTestRunner.java in  » Testing » jakarta-cactus » org » apache » cactus » internal » server » runner » 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 » jakarta cactus » org.apache.cactus.internal.server.runner 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* 
002:         * ========================================================================
003:         * 
004:         * Copyright 2001-2004 The Apache Software Foundation.
005:         *
006:         * Licensed under the Apache License, Version 2.0 (the "License");
007:         * you may not use this file except in compliance with the License.
008:         * You may obtain a copy of the License at
009:         * 
010:         *   http://www.apache.org/licenses/LICENSE-2.0
011:         * 
012:         * Unless required by applicable law or agreed to in writing, software
013:         * distributed under the License is distributed on an "AS IS" BASIS,
014:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
015:         * See the License for the specific language governing permissions and
016:         * limitations under the License.
017:         * 
018:         * ========================================================================
019:         */
020:        package org.apache.cactus.internal.server.runner;
021:
022:        import junit.framework.AssertionFailedError;
023:        import junit.framework.Test;
024:        import junit.runner.BaseTestRunner;
025:        import junit.runner.TestSuiteLoader;
026:
027:        /**
028:         * JUnit Test Runner that can load test cases that are in the classpath of
029:         * a webapp. This test runner is supposed to be executed from within the
030:         * webapp.
031:         *
032:         * @version $Id: WebappTestRunner.java 238991 2004-05-22 11:34:50Z vmassol $
033:         */
034:        public class WebappTestRunner extends BaseTestRunner {
035:            /**
036:             * Error message if the suite failed to load.
037:             */
038:            private String errorMessage;
039:
040:            /**
041:             * Overridden from BaseTestRunner in order to use either the context
042:             * class loader or the webapp one.
043:             *
044:             * @return a loader that loads classes using the context class loader or
045:             *         the webapp class loader.
046:             */
047:            public TestSuiteLoader getLoader() {
048:                return new WebappTestSuiteLoader();
049:            }
050:
051:            /**
052:             * Event called by the base test runner when it fails to load a test suite.
053:             *
054:             * @param theMessage the message of the failure
055:             */
056:            protected void runFailed(String theMessage) {
057:                this .errorMessage = theMessage;
058:            }
059:
060:            /**
061:             * @return the error message provided by <code>BaseTestRunner</code> if it
062:             *         failed to load the test suite
063:             */
064:            public String getErrorMessage() {
065:                return this .errorMessage;
066:            }
067:
068:            /**
069:             * Event called by the base test runner when the test ends.
070:             *
071:             * @param theTestName the test case name
072:             */
073:            public void testEnded(String theTestName) {
074:                // not used
075:            }
076:
077:            /**
078:             * Event called by the base test runner when the test fails.
079:             *
080:             * @param theStatus the status code of the error
081:             * @param theTest the test object that failed
082:             * @param theThrowable the exception that was thrown
083:             */
084:            public void testFailed(int theStatus, Test theTest,
085:                    Throwable theThrowable) {
086:                // not used
087:            }
088:
089:            /**
090:             * Event called by the base test runner when the test starts.
091:             *
092:             * @param theTestName the test case name
093:             */
094:            public void testStarted(String theTestName) {
095:                // not used
096:            }
097:
098:            /**
099:             * @see BaseTestRunner#addError(Test, Throwable)
100:             */
101:            public void addError(Test theTest, Throwable theThrowable) {
102:                // not used
103:            }
104:
105:            /**
106:             * @see BaseTestRunner#addFailure(Test, AssertionFailedError)
107:             */
108:            public void addFailure(Test theTest,
109:                    AssertionFailedError theAssertionFailedError) {
110:                // not used
111:            }
112:
113:            /**
114:             * @see BaseTestRunner#endTest(Test)
115:             */
116:            public void endTest(Test theTest) {
117:                // not used
118:            }
119:
120:            /**
121:             * @see BaseTestRunner#startTest(Test)
122:             */
123:            public void startTest(Test theTest) {
124:                // not used
125:            }
126:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.