org.apache.tomcat.util.test
Class GTest

java.lang.Object
  |
  +--org.apache.tomcat.util.test.GTest

Deprecated. Use HttpClient instead. This class has very limited support for multiple matchers, requests, etc.

public class GTest
extends java.lang.Object

Original tester for a web application. Will send a http request and verify the response code, compare the response with a golden file or find strings. This class is using the well-known ant patterns.


Constructor Summary
GTest()
          Deprecated.  
 
Method Summary
 void execute()
          Deprecated.  
 java.lang.String getComment()
          Deprecated.  
 java.lang.String getDescription()
          Deprecated. Description should be in
 java.lang.String getFailureMessage()
          Deprecated.  
 HttpClient getHttpClient()
          Deprecated.  
 java.lang.String getMatchDescription()
          Deprecated.  
static java.util.Vector getTestFailures()
          Deprecated. Vector of GTest elements, containing all test instances that were run and failed.
static java.util.Hashtable getTestProperties()
          Deprecated. Various global test propertis
static java.util.Vector getTestResults()
          Deprecated. Vector of GTest elements, containing all test instances that were run.
static java.util.Vector getTestSuccess()
          Deprecated. Vector of GTest elements, containing all test instances that were run and failed.
static void resetGTest()
          Deprecated.  
 void setContent(java.lang.String s)
          Deprecated. Do a POST with the specified content
 void setDebug(java.lang.String debugS)
          Deprecated. Display debug info
static void setDefaultDebug(int d)
          Deprecated.  
static void setDefaultOutput(java.lang.String s)
          Deprecated.  
static void setDefaultWriter(java.io.PrintWriter pw)
          Deprecated.  
 void setDescription(java.lang.String description)
          Deprecated.  
 void setExactMatch(boolean exact)
          Deprecated.  
 void setExpectHeaders(java.lang.String s)
          Deprecated. Verify that response includes the expected headers The value is a "|" separated list of headers to expect.
 void setFailureOnly(java.lang.String e)
          Deprecated. Report only tests that fail
 void setGoldenFile(java.lang.String s)
          Deprecated. Compare with the golden file
 void setHeaders(java.lang.String s)
          Deprecated. Send additional headers The value is a "|" separated list of headers to send
 void setHost(java.lang.String h)
          Deprecated.  
 void setIf(java.lang.String prop)
          Deprecated.  
 void setMagnitude(boolean m)
          Deprecated. True if this is a positive test, false for negative
 void setOutput(java.lang.String t)
          Deprecated. text, xml, html
 void setPort(java.lang.String portS)
          Deprecated.  
 void setPortInt(int i)
          Deprecated. Set the port as int - different name to avoid confusing ant
 void setProject(org.apache.tools.ant.Project p)
          Deprecated.  
 void setRequest(java.lang.String s)
          Deprecated. Request line ( will have the host and context path prefix)
 void setResponseMatch(java.lang.String s)
          Deprecated. Verify that response match the string
 void setResponseMatchFile(java.lang.String s)
          Deprecated. Verify that response matches a list of strings in a file
 void setReturnCode(java.lang.String s)
          Deprecated. Verify the response code
 void setUnless(java.lang.String prop)
          Deprecated.  
 void setWriter(java.io.PrintWriter pw)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GTest

public GTest()
Deprecated. 
Method Detail

setDefaultDebug

public static void setDefaultDebug(int d)
Deprecated. 

setDefaultWriter

public static void setDefaultWriter(java.io.PrintWriter pw)
Deprecated. 

setDefaultOutput

public static void setDefaultOutput(java.lang.String s)
Deprecated. 

getTestResults

public static java.util.Vector getTestResults()
Deprecated. 
Vector of GTest elements, containing all test instances that were run.

getTestFailures

public static java.util.Vector getTestFailures()
Deprecated. 
Vector of GTest elements, containing all test instances that were run and failed.

getTestSuccess

public static java.util.Vector getTestSuccess()
Deprecated. 
Vector of GTest elements, containing all test instances that were run and failed.

getTestProperties

public static java.util.Hashtable getTestProperties()
Deprecated. 
Various global test propertis

resetGTest

public static void resetGTest()
Deprecated. 

setProject

public void setProject(org.apache.tools.ant.Project p)
Deprecated. 

setIf

public void setIf(java.lang.String prop)
Deprecated. 

setUnless

public void setUnless(java.lang.String prop)
Deprecated. 

setWriter

public void setWriter(java.io.PrintWriter pw)
Deprecated. 

setOutput

public void setOutput(java.lang.String t)
Deprecated. 
text, xml, html

setFailureOnly

public void setFailureOnly(java.lang.String e)
Deprecated. 
Report only tests that fail

getHttpClient

public HttpClient getHttpClient()
Deprecated. 

getComment

public java.lang.String getComment()
Deprecated. 

getDescription

public java.lang.String getDescription()
Deprecated. 
Description should be in

setDescription

public void setDescription(java.lang.String description)
Deprecated. 

getMatchDescription

public java.lang.String getMatchDescription()
Deprecated. 

getFailureMessage

public java.lang.String getFailureMessage()
Deprecated. 

setDebug

public void setDebug(java.lang.String debugS)
Deprecated. 
Display debug info

setHost

public void setHost(java.lang.String h)
Deprecated. 

setPort

public void setPort(java.lang.String portS)
Deprecated. 

setPortInt

public void setPortInt(int i)
Deprecated. 
Set the port as int - different name to avoid confusing ant

setContent

public void setContent(java.lang.String s)
Deprecated. 
Do a POST with the specified content

setRequest

public void setRequest(java.lang.String s)
Deprecated. 
Request line ( will have the host and context path prefix)

setHeaders

public void setHeaders(java.lang.String s)
Deprecated. 
Send additional headers The value is a "|" separated list of headers to send

setExactMatch

public void setExactMatch(boolean exact)
Deprecated. 

setMagnitude

public void setMagnitude(boolean m)
Deprecated. 
True if this is a positive test, false for negative

setGoldenFile

public void setGoldenFile(java.lang.String s)
Deprecated. 
Compare with the golden file

setExpectHeaders

public void setExpectHeaders(java.lang.String s)
Deprecated. 
Verify that response includes the expected headers The value is a "|" separated list of headers to expect.

setResponseMatch

public void setResponseMatch(java.lang.String s)
Deprecated. 
Verify that response match the string

setResponseMatchFile

public void setResponseMatchFile(java.lang.String s)
Deprecated. 
Verify that response matches a list of strings in a file

setReturnCode

public void setReturnCode(java.lang.String s)
Deprecated. 
Verify the response code

execute

public void execute()
Deprecated. 


Copyright © 2001 Apache Software Foundation. All Rights Reserved.