Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.tester.shared.* (1)org.apache.tester.unpshared.* (1)org.apache.tester.unshared.* (1)

org.apache.tester: Javadoc index of package org.apache.tester.


Package Samples:

org.apache.tester.shared
org.apache.tester.unpshared
org.apache.tester.unshared

Classes:

TestClient: This class contains a Task for Ant that is used to send HTTP requests to a servlet container, and examine the responses. It is similar in purpose to the GTest task in Watchdog, but uses the JDK's HttpURLConnection for underlying connectivity. The task is registered with Ant using a taskdef directive: <taskdef name="tester" classname="org.apache.tester.TestClient"> and accepts the following configuration properties: golden - The server-relative path of the static resource containing the golden file for this request. host - The server name to which this request will be sent. Defaults to localhost ...
Resources05: Positive test for ServletContext.getResource() as well as ClassLoader.getResource() . The URL returned by these calls is then opened with url.openStream() in order to ensure that the correct data is actually read. Operation is controlled by query parameters: mode - Use context for servlet context test, or class for class loader test. [context] path - Resource path to the requested resource, starting with a slash. [/WEB-INF/web.xml] stringify - If set to any arbitrary value, the URL returned by getResource() will be converted to a String and then back to a URL before being opened. [not set]
Lifecycle03: Test for servlet lifecycle management. It's behavior is controlled by a request parameter step , which must be set to one of the following values: 1 - Throw an UnavailableException that indicates permanent unavailablility, which should cause this servlet instance to be destroyed and thrown away. 2 - Check the lifecycle variables to ensure that the old instance was not reused.
Aggregate02: Test aggregation of query string and POST parameters. According to Servlet 2.4 PFD, Section 4.1, all such parameters should be aggregated, and if there are duplicate parameter names from both sources, the parameter value(s) from the query string should appear first in the values returned by request.getParameterValues(). This test is the same as Aggregate01, except that it uses the new getParameterMap() method to retrieve parameter values.
Resources03: Positive test for ServletContext.getResourceAsStream() as well as ClassLoader.getResourceAsStream() . Operation is controlled by query parameters: mode - Use context for servlet context test, or class for class loader test. [context] path - Resource path to the requested resource, starting with a slash. [/WEB-INF/web.xml]
Resources04: Negative test for ServletContext.getResourceAsStream() as well as ClassLoader.getResourceAsStream() . Operation is controlled by query parameters: mode - Use context for servlet context test, or class for class loader test. [context] path - Resource path to the requested resource, starting with a slash. [/WEB-INF/web.xml]
Resources01: Positive test for ServletContext.getResource() as well as ClassLoader.getResource() . Operation is controlled by query parameters: mode - Use context for servlet context test, or class for class loader test. [context] path - Resource path to the requested resource, starting with a slash. [/WEB-INF/web.xml]
Resources02: Negative test for ServletContext.getResource() as well as ClassLoader.getResource() . Operation is controlled by query parameters: mode - Use context for servlet context test, or class for class loader test. [context] path - Resource path to the requested resource, starting with a slash. [/WEB-INF/web.xml]
ErrorPage05: Part 5 of the ErrorPage Tests. Throws a RuntimeException of a type specified by the type query parameter, which must be one of the following: ArithmeticException - Forwarded to "/ErrorPage06". ArrayIndexOutOfBoundsException - Forwarded to "/ErrorPage06.jsp". NumberFormatException - Forwarded to "/ErrorPage06.html".
Include03: Test to insure that an included servlet can set request attributes that are visible to the calling servlet after the include() returns. The spec is silent on this topic, but it seems consistent with the overall intent to behave in this manner. The test includes either a servlet ("/Include03a") or a JSP page ("/Include03b.jsp") depending on the value specified for the "path" parameter. The default is the servlet.
Include02: Positive test for handling exceptions thrown by an included servlet. Request parameter exception is used to indicate the type of exception that should be thrown, which must be one of IOException , ServletException , or ServletException . According to the spec, any exceptions of these types should be propogated back to the caller unchanged.
Context02: Part 2 of Context Tests. The context attribute from Context00 should still be here after a restart (because Context00 is a load-on-startup servlet, so the init() method should have been triggered during the restart). However, the context attribute from Context01 should not be here, because context attributes should be cleaned up during a restart.
UnsharedSessionBean: Simple JavaBean to use for session attribute tests. It is Serializable so that instances can be saved and restored across server restarts. This bean is functionally equivalent to org.apache.tester.SessionBean , but will be deployed under /WEB-INF/classes instead of inside /WEB-INF/lib/tester.jar .
Forward03: Test to ensure that a forwarded-to servlet can receive request attributes set by the calling servlet, as well as set their own request attributes. The test forwards to either a servlet ("/Forward03a") or a JSP page ("/Forward03b.jsp") depending on the value specified for the "path" parameter. The default is the servlet.
Forward03a: Test to ensure that a forwarded-to servlet can receive request attributes set by the calling servlet, as well as set their own request attributes. The test forwards to either a servlet ("/Forward03a") or a JSP page ("/Forward03b.jsp") depending on the value specified for the "path" parameter. The default is the servlet.
Aggregate01: Test aggregation of query string and POST parameters. According to Servlet 2.4 PFD, Section 4.1, all such parameters should be aggregated, and if there are duplicate parameter names from both sources, the parameter value(s) from the query string should appear first in the values returned by request.getParameterValues().
SharedSessionBean: Simple JavaBean to use for session attribute tests. It is Serializable so that instances can be saved and restored across server restarts. This is functionally equivalent to SessionBean , but stored in a different package so that it gets deployed into a JAR file under $CATALINA_HOME/lib .
UnpSharedSessionBean: Simple JavaBean to use for session attribute tests. It is Serializable so that instances can be saved and restored across server restarts. This is functionally equivalent to SessionBean , but stored in a different package so that it gets deployed unpacked under $CATALINA_HOME/classes .
FilterRequest01: Positive test for being able to filter input. The input will be echoed back in the response, after having been converted to upper case by the associated filter. Use request parameter type to determine whether to call getReader() ("reader") or getInputStream() ("stream").
Session04: Part 4 of Session Tests. Ensures that there is an existing session, and that the requested session information matches it. Also, ensure that we can invalidate this session and create a new one (with a different session identifier) while processing this request.
Include03a: Test to insure that an included servlet can set request attributes that are visible to the calling servlet after the include() returns. The spec is silent on this topic, but it seems consistent with the overall intent to behave in this manner.
Resources06: Positive test for getResourcePaths() , which will specify the directory path indicated by the path request parameter. For known paths, at least the known set of included resources must be found in order to pass.
Jndi02: Positive test for looking up environment entries from the naming context provided by the servlet container. The looked-up values are initialized via <env-entry> elements in the web application deployment descriptor.
Decoding01: Test for proper URL decoding of the getServletPath() and getPathInfo() methods of HttpServletRequest. The desired values are specified by the servlet and path request parameters, respectively.
Authentication03: Ensure that we get the correct results from isUserInRole() for an actual role, a role aliased with a <security-role-ref> element, and for a role that is not assigned to the specified user.

Home | Contact Us | Privacy Policy | Terms of Service