| java.lang.Object com.meterware.httpunit.WebClient com.meterware.servletunit.ServletUnitClient
ServletUnitClient | public class ServletUnitClient extends WebClient (Code) | | A client for use with the servlet runner class, allowing the testing of servlets
without an actual servlet container. Testing can be done in one of two ways.
End-to-end testing works much like the HttpUnit package, except that only servlets
actually registered with the ServletRunner will be invoked. It is also possible
to test servlets 'from the inside' by creating a ServletInvocationContext and then
calling any servlet methods which may be desired. Even in this latter mode, end-to-end
testing is supported, but requires a call to this class's getResponse method to update
its cookies and frames.
author: Russell Gold |
getSession | public HttpSession getSession(boolean create)(Code) | | Returns the session that would be used by the next request (if it asks for one).
Parameters: create - if true, will create a new session if no valid session is defined. since: 1.6 |
Methods inherited from com.meterware.httpunit.WebClient | public void addClientListener(WebClientListener listener)(Code)(Java Doc) public void addCookie(String name, String value)(Code)(Java Doc) public void addWindowListener(WebWindowListener listener)(Code)(Java Doc) public void clearContents()(Code)(Java Doc) public void clearProxyServer()(Code)(Java Doc) public ClientProperties getClientProperties()(Code)(Java Doc) public String[] getCookieNames()(Code)(Java Doc) public String getCookieValue(String name)(Code)(Java Doc) public WebResponse getCurrentPage()(Code)(Java Doc) public boolean getExceptionsThrownOnErrorStatus()(Code)(Java Doc) public WebResponse getFrameContents(String frameName)(Code)(Java Doc) public WebResponse getFrameContents(FrameSelector targetFrame)(Code)(Java Doc) public String[] getFrameNames()(Code)(Java Doc) public String getHeaderField(String fieldName)(Code)(Java Doc) protected Dictionary getHeaderFields(URL targetURL)(Code)(Java Doc) public WebWindow getMainWindow()(Code)(Java Doc) public String getNextAlert()(Code)(Java Doc) public WebWindow getOpenWindow(String name)(Code)(Java Doc) public WebWindow[] getOpenWindows()(Code)(Java Doc) public String getProxyHost()(Code)(Java Doc) public int getProxyPort()(Code)(Java Doc) public WebResponse getResource(WebRequest request) throws IOException(Code)(Java Doc) public WebResponse getResponse(String urlString) throws MalformedURLException, IOException, SAXException(Code)(Java Doc) public WebResponse getResponse(WebRequest request) throws MalformedURLException, IOException, SAXException(Code)(Java Doc) public String getUserAgent()(Code)(Java Doc) abstract protected WebResponse newResponse(WebRequest request, FrameSelector targetFrame) throws MalformedURLException, IOException(Code)(Java Doc) public String popNextAlert()(Code)(Java Doc) public void putCookie(String name, String value)(Code)(Java Doc) public void removeClientListener(WebClientListener listener)(Code)(Java Doc) public void removeWindowListener(WebWindowListener listener)(Code)(Java Doc) public WebResponse sendRequest(WebRequest request) throws MalformedURLException, IOException, SAXException(Code)(Java Doc) public void setAuthorization(String userName, String password)(Code)(Java Doc) public void setDialogResponder(DialogResponder responder)(Code)(Java Doc) public void setExceptionsThrownOnErrorStatus(boolean throwExceptions)(Code)(Java Doc) public void setHeaderField(String fieldName, String fieldValue)(Code)(Java Doc) public void setMainWindow(WebWindow mainWindow)(Code)(Java Doc) public void setProxyServer(String proxyHost, int proxyPort)(Code)(Java Doc) public void setProxyServer(String proxyHost, int proxyPort, String userName, String password)(Code)(Java Doc) public void setUserAgent(String userAgent)(Code)(Java Doc) final protected void updateMainWindow(FrameSelector frame, WebResponse response) throws MalformedURLException, IOException, SAXException(Code)(Java Doc) final protected void writeMessageBody(WebRequest request, OutputStream stream) throws IOException(Code)(Java Doc)
|
|
|