|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.util.test.HttpClient
HttpClient can send requests and execute matchers against the request. This is the main tool that is used to test tomcat's web applications. Typical use:
Part of GTest - send a Http request.
Constructor Summary | |
HttpClient()
|
Method Summary | |
void |
addGoldenMatch(GoldenMatch m)
|
void |
addHeaderMatch(HeaderMatch m)
|
void |
addHttpRequest(HttpRequest b)
Add a request that will be executed. |
void |
addHttpStatusMatch(HttpStatusMatch m)
|
void |
addMatcher(Matcher m)
Add a matcher. |
void |
addResponseMatch(ResponseMatch m)
|
void |
addResponseMatchFile(ResponseMatchFile m)
|
void |
addSessionMatch(SessionMatch m)
|
Body |
createComment()
|
void |
execute()
|
java.lang.String |
getComment()
|
int |
getDebug()
|
Matcher |
getFailingMatch()
|
java.lang.String |
getFailureMessage()
|
HttpRequest |
getFirstRequest()
|
static java.util.Hashtable |
getHttpClients()
Return one of the "named" clients that have been executed so far. |
java.lang.String |
getMatchDescription()
|
org.apache.tools.ant.Project |
getProject()
|
boolean |
getResult()
|
static java.util.Vector |
getTestFailures()
Vector of GTest elements, containing all test instances that were run and failed. |
static java.util.Vector |
getTestResults()
Vector of GTest elements, containing all test instances that were run. |
static java.util.Vector |
getTestSuccess()
Vector of GTest elements, containing all test instances that were run and failed. |
static java.lang.String |
read(java.io.InputStream input)
Read a line from the specified servlet input stream, and strip off the trailing carriage return and newline (if any). |
void |
setDebug(int d)
Display debug info |
void |
setDescription(java.lang.String s)
|
void |
setId(java.lang.String id)
Set an unique id to this request. |
void |
setIf(java.lang.String prop)
|
void |
setOutput(java.lang.String t)
|
void |
setProject(org.apache.tools.ant.Project p)
|
void |
setUnless(java.lang.String prop)
|
void |
setWriter(java.io.PrintWriter pw)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HttpClient()
Method Detail |
public void setProject(org.apache.tools.ant.Project p)
public org.apache.tools.ant.Project getProject()
public void setIf(java.lang.String prop)
public void setUnless(java.lang.String prop)
public void setId(java.lang.String id)
public void setDebug(int d)
public int getDebug()
public void addHttpRequest(HttpRequest b)
public Body createComment()
public java.lang.String getComment()
public void setDescription(java.lang.String s)
public void setWriter(java.io.PrintWriter pw)
public void setOutput(java.lang.String t)
public void addMatcher(Matcher m)
public void addGoldenMatch(GoldenMatch m)
public void addHeaderMatch(HeaderMatch m)
public void addHttpStatusMatch(HttpStatusMatch m)
public void addResponseMatch(ResponseMatch m)
public void addResponseMatchFile(ResponseMatchFile m)
public void addSessionMatch(SessionMatch m)
public HttpRequest getFirstRequest()
public Matcher getFailingMatch()
public java.lang.String getFailureMessage()
public boolean getResult()
public void execute()
public static java.lang.String read(java.io.InputStream input) throws java.io.IOException
java.io.IOException
- if an input/output error occurredpublic static java.util.Hashtable getHttpClients()
public static java.util.Vector getTestResults()
public static java.util.Vector getTestFailures()
public static java.util.Vector getTestSuccess()
public java.lang.String getMatchDescription()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |