com.meterware.servletunit |
Classes for unit testing servlets, providing internal access to running servlets using a simulated servlet container.
Each test session should begin by creating a
{@link com.meterware.servletunit.ServletRunner ServletRunner} which will act as a servlet application context.
The definition of application context may be supplied in one of two ways.
The {@link com.meterware.servletunit.ServletRunner#registerServlet(String,String) registerServlet} method allows the
association of a servlet with a url path. Alternately, an entire servlet application may be defined by passing the
name of the desired web.xml file.
The {@link com.meterware.servletunit.ServletRunner#newClient newClient} method will return a
{@link com.meterware.servletunit.ServletUnitClient ServletUnitClient} object which can be
used to invoke the defined servlets, just as any subclass of
{@link com.meterware.httpunit.WebClient WebClient}. In addition, this client object defines methods which allow
access to the fully initializated servlet itself, as well as the request, response, and servlet session.
A tutorial is available.
Please direct any questions to Russell Gold.
|
Java Source File Name | Type | Comment |
BasicAuthenticationRequiredException.java | Class | Thrown when servletunit wants to indicate that a resource is protected in an application using Basic Authorization. |
DispatchedRequestWrapper.java | Class | This class represents a request dispatched via a RequestDispatcherImpl. |
FilterConfigImpl.java | Class | |
FilterMetaData.java | Interface | |
FilterUrlMap.java | Class | |
InvocationContext.java | Interface | An interface which represents the invocation of a servlet. |
InvocationContextFactory.java | Interface | |
InvocationContextImpl.java | Class | This class represents the context in which a specific servlet request is being made. |
JSPServletDescriptor.java | Interface | Describes a servlet used to handle JSPs. |
JUnitServlet.java | Class | A servlet which can run unit tests inside a servlet context. |
RequestContext.java | Class | |
RequestDispatcherImpl.java | Class | |
ServletInputStreamImpl.java | Class | |
ServletMetaData.java | Interface | |
ServletRunner.java | Class | This class acts as a test environment for servlets. |
ServletTestCase.java | Class | A base class for test cases to be run via
JUnitServlet JUnitServlet . |
ServletUnitClient.java | Class | A client for use with the servlet runner class, allowing the testing of servlets
without an actual servlet container. |
ServletUnitContext.java | Class | |
ServletUnitHttpRequest.java | Class | This class represents a servlet request created from a WebRequest. |
ServletUnitHttpResponse.java | Class | |
ServletUnitHttpSession.java | Class | |
ServletUnitServletConfig.java | Class | This class acts as a test environment for servlets. |
ServletUnitServletContext.java | Class | This class is a private implementation of the ServletContext class. |
ServletUnitWebResponse.java | Class | A response from to a request from the simulated servlet environment. |
SessionListenerDispatcher.java | Interface | |
WebApplication.java | Class | This class represents the information recorded about a single web
application. |
WebResourceConfiguration.java | Class | |
XMLUtils.java | Class | |