|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.ObjectHttpServlet
org.junitee.servlet.JUnitEEServlet
This servlet implements the JUnitEE test runner. By default the classloader of this servlet is used also for
loading the test classes. This will work in almost any case, but if necessary you can change this behaviour by
subclassing this class and overwrite the method getDynamicClassLoader() to answer the classloader of your
choice.
| Field Summary | |
static java.lang.String |
CACTUS_CONTEXT_URL_PROPERTY
|
static java.lang.String |
OUTPUT_HTML
|
static java.lang.String |
OUTPUT_XML
|
| Constructor Summary | |
JUnitEEServlet()
|
|
| Method Summary | |
void |
doGet(HttpServletRequest request,
HttpServletResponse response)
|
void |
doPost(HttpServletRequest request,
HttpServletResponse response)
|
protected void |
errorResponse(java.lang.String[] testCases,
java.lang.String servletPath,
java.lang.String message,
java.lang.String output,
HttpServletRequest request,
HttpServletResponse response,
java.lang.String xsl,
boolean filterTrace,
boolean showMethods)
|
protected java.lang.String |
getDefaultOutput()
Answer the default output format of the test report. |
protected boolean |
getDefaultThreadMode()
Answer the default for the thread mode. |
protected java.lang.ClassLoader |
getDynamicClassLoader()
Answer the classloader used to load the test classes. |
protected OutputProducer |
getOutputProducer(TestRunnerResults results,
java.lang.String outputParam,
HttpServletRequest request,
HttpServletResponse response,
java.lang.String xsl,
boolean filterTrace)
Answer the output producer for the given output format. |
protected java.lang.String[] |
getTestClassMethods(java.lang.String testClass)
Looks up all the test methods for a particular test class. |
void |
init(ServletConfig config)
|
protected java.lang.String[] |
parseTestCaseList(java.io.InputStream stream)
|
protected void |
printIndexHtml(java.lang.String[] testCases,
java.lang.String servletPath,
java.lang.String message,
java.io.PrintWriter pw,
boolean showMethods)
|
protected void |
printIndexHtmlTestMethods(java.lang.StringBuffer bufferList,
java.lang.String testCase,
java.lang.String servletPath)
Generates links to run individual test methods |
protected void |
renderResults(TestRunnerResults results,
HttpServletRequest request,
HttpServletResponse response,
java.lang.String xsl,
boolean filterTrace)
|
protected TestRunnerResults |
runTests(java.lang.String test,
java.lang.String[] testClassNames,
HttpServletRequest request,
boolean forkThread)
|
protected java.lang.String[] |
searchForTestCaseList()
|
protected java.lang.String[] |
searchForTests(java.lang.String param)
Search all resources set via the searchResources init parameter for classes ending with "Tests" |
protected java.lang.String[] |
searchForTests(java.lang.String[] param)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String OUTPUT_HTML
public static final java.lang.String OUTPUT_XML
public static final java.lang.String CACTUS_CONTEXT_URL_PROPERTY
| Constructor Detail |
public JUnitEEServlet()
| Method Detail |
protected java.lang.ClassLoader getDynamicClassLoader()
public void init(ServletConfig config)
throws ServletException
ServletException
public void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
java.io.IOException
ServletException
java.io.IOException
protected void renderResults(TestRunnerResults results,
HttpServletRequest request,
HttpServletResponse response,
java.lang.String xsl,
boolean filterTrace)
throws java.io.IOException
java.io.IOException
protected TestRunnerResults runTests(java.lang.String test,
java.lang.String[] testClassNames,
HttpServletRequest request,
boolean forkThread)
public void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException,
java.io.IOException
ServletException
java.io.IOException
protected java.lang.String[] searchForTests(java.lang.String[] param)
throws java.io.IOException,
ServletException
java.io.IOException
ServletException
protected java.lang.String[] searchForTests(java.lang.String param)
throws java.io.IOException,
ServletException
java.io.IOException
ServletException
protected java.lang.String[] searchForTestCaseList()
throws java.io.IOException
java.io.IOException
protected java.lang.String[] parseTestCaseList(java.io.InputStream stream)
throws java.io.IOException
java.io.IOExceptionprotected java.lang.String getDefaultOutput()
output request parameter. Overwrite this method
in your subclass to change the output format without the need for the request parameter.
protected boolean getDefaultThreadMode()
protected OutputProducer getOutputProducer(TestRunnerResults results,
java.lang.String outputParam,
HttpServletRequest request,
HttpServletResponse response,
java.lang.String xsl,
boolean filterTrace)
throws java.io.IOException
results - outputParam - request - response - xsl - filterTrace -
java.io.IOException
protected void errorResponse(java.lang.String[] testCases,
java.lang.String servletPath,
java.lang.String message,
java.lang.String output,
HttpServletRequest request,
HttpServletResponse response,
java.lang.String xsl,
boolean filterTrace,
boolean showMethods)
throws java.io.IOException
java.io.IOException
protected void printIndexHtml(java.lang.String[] testCases,
java.lang.String servletPath,
java.lang.String message,
java.io.PrintWriter pw,
boolean showMethods)
throws java.io.IOException
java.io.IOException
protected void printIndexHtmlTestMethods(java.lang.StringBuffer bufferList,
java.lang.String testCase,
java.lang.String servletPath)
bufferList - testCase - servletPath - protected java.lang.String[] getTestClassMethods(java.lang.String testClass)
testClass -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||