public class ServletTestRunner
extends javax.servlet.http.HttpServlet
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CMD_NAME_EVENT |
static java.lang.String |
CMD_NAME_TEST |
(package private) static java.lang.ThreadLocal<java.lang.String> |
currentCall |
private static java.lang.ThreadLocal<javax.servlet.ServletContext> |
currentServletContext |
(package private) static java.util.concurrent.ConcurrentHashMap<java.lang.String,Command<?>> |
events |
static java.lang.String |
OUTPUT_MODE_HTML |
static java.lang.String |
OUTPUT_MODE_SERIALIZED |
static java.lang.String |
PARA_CLASS_NAME |
static java.lang.String |
PARA_CMD_NAME |
static java.lang.String |
PARA_METHOD_NAME |
static java.lang.String |
PARA_OUTPUT_MODE |
private static long |
serialVersionUID |
Constructor and Description |
---|
ServletTestRunner() |
Modifier and Type | Method and Description |
---|---|
private TestResult |
createFailedResult(java.lang.Throwable throwable) |
void |
destroy() |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
protected void |
execute(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
void |
executeEvent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String className,
java.lang.String methodName) |
void |
executeTest(javax.servlet.http.HttpServletResponse response,
java.lang.String outputMode,
java.lang.String className,
java.lang.String methodName) |
static javax.servlet.ServletContext |
getCurrentServletContext() |
void |
init() |
private void |
writeObject(java.lang.Object object,
javax.servlet.http.HttpServletResponse response) |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service
private static final long serialVersionUID
public static final java.lang.String PARA_METHOD_NAME
public static final java.lang.String PARA_CLASS_NAME
public static final java.lang.String PARA_OUTPUT_MODE
public static final java.lang.String PARA_CMD_NAME
public static final java.lang.String OUTPUT_MODE_SERIALIZED
public static final java.lang.String OUTPUT_MODE_HTML
public static final java.lang.String CMD_NAME_TEST
public static final java.lang.String CMD_NAME_EVENT
private static java.lang.ThreadLocal<javax.servlet.ServletContext> currentServletContext
static java.util.concurrent.ConcurrentHashMap<java.lang.String,Command<?>> events
static java.lang.ThreadLocal<java.lang.String> currentCall
public static javax.servlet.ServletContext getCurrentServletContext()
public void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doPost
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
doGet
in class javax.servlet.http.HttpServlet
javax.servlet.ServletException
java.io.IOException
protected void execute(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
public void executeTest(javax.servlet.http.HttpServletResponse response, java.lang.String outputMode, java.lang.String className, java.lang.String methodName) throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
java.io.IOException
public void executeEvent(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String className, java.lang.String methodName) throws java.lang.ClassNotFoundException, java.io.IOException
java.lang.ClassNotFoundException
java.io.IOException
private void writeObject(java.lang.Object object, javax.servlet.http.HttpServletResponse response)
private TestResult createFailedResult(java.lang.Throwable throwable)