org.apache.cactus.server.runner
Class ServletTestRunner
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.apache.cactus.server.runner.ServletTestRunner
- All Implemented Interfaces:
- java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig
- public class ServletTestRunner
- extends javax.servlet.http.HttpServlet
Helper servlet to start a JUnit Test Runner in a webapp.
This class currently does a couple of reflection tricks to avoid a direct
dependancy on the TraX API (javax.xml.transform.*
),
encapsulated in the XMLTransformer
class.
- Version:
- $Id: ServletTestRunner.java,v 1.14 2003/02/22 11:31:50 vmassol Exp $
- Author:
- Vincent Massol, Christopher Lenz
- See Also:
- Serialized Form
Method Summary |
void |
doGet(javax.servlet.http.HttpServletRequest theRequest,
javax.servlet.http.HttpServletResponse theResponse)
Starts the test suite passed as a HTTP parameter |
void |
init()
Called by the container when the servlet is initialized. |
protected java.lang.String |
run(java.lang.String theSuiteClassName,
java.lang.String theXslFileName)
Run the suite tests and return the result. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ServletTestRunner
public ServletTestRunner()
init
public void init()
throws javax.servlet.ServletException
- Called by the container when the servlet is initialized.
- Throws:
javax.servlet.ServletException
- If an initialization parameter contains an
illegal value
doGet
public void doGet(javax.servlet.http.HttpServletRequest theRequest,
javax.servlet.http.HttpServletResponse theResponse)
throws javax.servlet.ServletException,
java.io.IOException
- Starts the test suite passed as a HTTP parameter
- Parameters:
theRequest
- the incoming HTTP client requesttheResponse
- the outgoing HTTP client request to send back.
- Throws:
javax.servlet.ServletException
- if an error occurs when servicing the
request
java.io.IOException
- if an error occurs when servicing the request
run
protected java.lang.String run(java.lang.String theSuiteClassName,
java.lang.String theXslFileName)
throws javax.servlet.ServletException
- Run the suite tests and return the result.
- Parameters:
theSuiteClassName
- the suite containing the tests to runtheXslFileName
- the name of the XSL stylesheet or null if we don't
want to apply a stylesheet to the returned XML data
- Returns:
- the result object
- Throws:
javax.servlet.ServletException
- if the suite failed to be loaded
Copyright © 2000-2003 Apache Software Foundation. All Rights Reserved.