| |
|
| java.lang.Object org.apache.cactus.internal.server.AbstractWebTestCaller
All known Subclasses: org.apache.cactus.internal.server.ServletTestCaller, org.apache.cactus.internal.server.FilterTestCaller,
AbstractWebTestCaller | abstract public class AbstractWebTestCaller (Code) | | Responsible for instanciating the TestCase class on the server
side, set up the implicit objects and call the test method. This class
provides a common abstraction for all test web requests.
version: $Id: AbstractWebTestCaller.java 238991 2004-05-22 11:34:50Z vmassol $ |
Field Summary | |
final protected static String | TEST_RESULTS Name of the attribute in the application scope that will
hold the results of the test. | protected WebImplicitObjects | webImplicitObjects The implicit objects (which will be used to set the test case fields
in the setTesCaseFields method. |
TEST_RESULTS | final protected static String TEST_RESULTS(Code) | | Name of the attribute in the application scope that will
hold the results of the test.
|
webImplicitObjects | protected WebImplicitObjects webImplicitObjects(Code) | | The implicit objects (which will be used to set the test case fields
in the setTesCaseFields method.
|
AbstractWebTestCaller | public AbstractWebTestCaller(WebImplicitObjects theObjects)(Code) | | Parameters: theObjects - the implicit objects coming from the redirector |
doCreateSession | public void doCreateSession() throws ServletException(Code) | | Create an HTTP Session and returns the response that contains the
HTTP session as a cookie (unless URL rewriting is used in which
case the jsesssionid cookie is not returned).
exception: ServletException - if an unexpected error occurred |
doGetVersion | public void doGetVersion() throws ServletException(Code) | | Return the cactus version. This is to make sure both the client side
and server side are using the same version.
exception: ServletException - if an unexpected error occurred |
doRunTest | public void doRunTest() throws ServletException(Code) | | Run the connection test between client and server. This is just to
ensure that configuration is set up correctly.
exception: ServletException - if an unexpected error occurred |
doTest | public void doTest() throws ServletException(Code) | | Calls a test method. The parameters needed to call this method are found
in the HTTP request. Save the results in the application
scope so that the Get Test Result service can find them.
exception: ServletException - if an unexpected error occurred |
getResponseWriter | abstract protected Writer getResponseWriter() throws IOException(Code) | | a Writer object that will be used to return thetest result to the client side. exception: IOException - if an error occurs when retrieving the writer |
getTestClassClass | protected Class getTestClassClass(String theClassName) throws ServletException(Code) | | Parameters: theClassName - the name of the test class the class object the test class to call exception: ServletException - if the class of the current test casecannot be loaded in memory (i.e. it is not in theclasspath) |
getTestClassInstance | protected TestCase getTestClassInstance(String theClassName, String theWrappedClassName, String theTestCaseName) throws ServletException(Code) | | Parameters: theClassName - the name of the test class Parameters: theWrappedClassName - the name of the wrapped test class. Can benull if there is none Parameters: theTestCaseName - the name of the current test case an instance of the test class to call exception: ServletException - if the test case instance for the currenttest fails to be instanciated (for example if someinformation is missing from the HTTP request) |
getTestClassName | protected String getTestClassName() throws ServletException(Code) | | the class to test class name, extracted from the HTTP request exception: ServletException - if the class name of the test case is missingfrom the HTTP request |
getTestMethodName | protected String getTestMethodName() throws ServletException(Code) | | the class method to call for the current test case, extractedfrom the HTTP request exception: ServletException - if the method name of the test case ismissing from the HTTP request |
getWrappedTestClassName | protected String getWrappedTestClassName() throws ServletException(Code) | | the optional test class that is wrapped by a Cactus test case, extracted from the HTTP request exception: ServletException - if the wrapped class name is missing from the HTTP request |
isAutoSession | protected boolean isAutoSession()(Code) | | true if the auto session flag for the Session can be found inthe HTTP request |
setTestCaseFields | abstract protected void setTestCaseFields(TestCase theTestCase) throws Exception(Code) | | Sets the implicit object in the test case class
Parameters: theTestCase - the instance of the test case class on which theclass variable (implicit objects) should be set exception: Exception - if an errors occurs when setting the implicitobjects |
|
|
|