Release changes archives

Cactus 1.3 (released on April 21 2002)

  • update Improved classloader support on the server side: Cactus first tries to load the Class to test using the Context class loader (thus, if you container has set the context class loader to point to the webapp classloader you'll be able to use Cactus as an extension and share it between projects). If the class cannot be loaded through the context class loader, Cactus then tries to load it using the Webapp classloader (in that case you'll need to have cactus.jar in your WEB-INF/lib directory). (VMA)
  • fix Modified the mechanism to get test result from the Server side. Previously Cactus was using a serialized object whereas now Cactus sends back XML data. (VMA) Thanks to Kjeld. Fixes bug 6093.
  • add Added a Tested On ... page that gives the list of Servers/Versions on which Cactus has been tested. Please contribute if you have a working configuration not listed there. (VMA)
  • add Added a "Cactus users" page so that Cactus users can describe what they are doing with Cactus and share that with others. (VMA)
  • add Added support for Resin 2.1.0. The ResinRun Cactus Ant task that is used to start/stop Resin has been modified to support both Resin 2.0 and Resin 2.1 (Resin 2.1 has changed its API to start it). (VMA)
  • add Added a Security Howto tutorial to explain how to unit test secure Servlet code. (VMA)
  • update Updated the whole web site for Cactus 1.3 and added some FAQ entries. (VMA)
  • update Improved Cactus logging. Cactus logging is now enabled by a cactus.enableLogging=true property that needs to be either defined in cactus.properties (which also needs to be part of the server WAR if you wish to turn on logging on the server side) or by using a java parameter (-Dcactus.enableLogging=true). If Log4J is not in the classpath, then logging is disabled. (VMA)
  • add Added a "News" page with all news and events regarding Cactus. It is also supposed to act as a history page. (VMA)
  • fix HttpServletContextWrapper.getRequestDispatcher() now throws null when the wrapped servlet context returns null when asked for a request dispatcher. (VMA) Thanks to Steven L. Youtsey. Fixes bug 4563.
  • fix Wrapped HttpServletRequest.getRequestURL() (Servlet API 2.3 only) to take into account the simulated URL (if any). (VMA) Thanks to Kim Madsen.
  • update Completely reworked the internal Cactus build scripts and directory structure to make it more flexible and to prepare for the upcoming J2EE Sample application (we only have a Servlet Sample so far). (VMA)
  • fix Corrected bug that prevented using testURL in runservertests with a URL that returned nothing. Also added some verbose logs. (VMA) Thanks to Aslak Hellesoy.
  • add New Web site Statistics page, using Webalizer. (VMA)
  • fix Corrected issue with getNamedDispatcher() not returning null when called with a servlet name that cannot be found, as is expected by the spec. Added test cases to verify the behaviour. (VMA) Thanks to Kim Madsen.
  • add Migration tutorial that explains how to move from Cactus 1.2 to Cactus 1.3 (VMA)
  • add Cactus now supports JDK 1.4. Actually the only change made to support it was to use the assertXXX() methods of JUnit instead of the assert() one, which is now a reserved keyword in JDK 1.4. (VMA)
  • update Updated coding conventions and added target to Ant build file for automatic checking of conventions using Checkstyle. (VMA)
  • update Reformatted all sources to be compliant with our coding conventions (checked using Checkstyle). (VMA)
  • add New JBuilder5 integration tutorial. (VMA) Thanks to Sean Zhang.
  • add Added support for BASIC authentication. Thanks to Jason Robertson and Peter Wong. See class TestServletTestCase_Authentication in the sample unit tests for an example on how to use it. (VMA)
  • add Added WebRequest.setRedirectorName(String redirectorName) to override default cactus.servletRedirectorName parameter that you define in cactus.properties. This lets you define a redirector per test case if you wish. It is useful when you want to test some servlet methods that are secured and others that are not, for example. (VMA)
  • update Modified cactus.properties configuration parameters. For example, where you previously were writing cactus.servletRedirectorURL = http://localhost:8080/test/ServletRedirector you would now have 2 parameters: cactus.contextURL = http://localhost:8080/test and cactus.servletRedirectorName = ServletRedirector. (VMA)
  • fix Cactus is now working again with JDK 1.2. (VMA) Thanks to Balki Nakshatrala.
  • add Added LICENSE file to all Cactus jars, in META-INF/ directory. (VMA)
  • fix Improved Tomcat 3.3 configuration that is bundled with the Cactus sample application and added delaySocketClose="true", which is a new attribute of Tomcat 3.3.1. The reason is that on fast CPU Tomcat 3.3.0 is releasing too quickly opened sockets and the Cactus client side gets a "socket closed by peer" exception. (VMA) Thanks to Larry Isaacs.
  • add Added automatic script support for WebLogic 6.1. (VMA)
  • fix Corrected bug in AbstractHttpServletRequestWrapper.getPathTranslated() which was not returning null when getRealPath("/") was returning null. It is allowed by the spec. to return null upon certain conditions (see section SRV.4.5 of the Servlet 2.3 spec.). (VMA)
  • add Add a tutorial for setting up Cactus in VAJava with Tomcat environment. (VMA) Thanks to Jim Young.
  • fix Compatibility with JDK 1.2 was broken by using the URL.getPath() in HttpClientHelper. It is now fixed and should work both for JDK 1.2 and 1.3. (VMA) Thanks to Piyush Asthana.
  • add Added a AbstractTestCase.getLogger() method that lets any test case class get access to a logger to perform its own logging. Logs will go into the Cactus log files. (VMA)
  • update By default, the Cactus log4j configuration file defines a root category that logs to the Cactus log file with a DEBUG Priority. There is another category for the Cactus classes with a Priority of WARN so that no debug logs will be printed by default. (VMA)
  • add Cactus is now using AspectJ under the hood to provide automatic logging of entries and exits of methods (for debugging purpose) and to automatically initialise the logging subsystem. The next step is to add automatic configuration checking using AspectJ. The consequence for end users if that they now need to include the aspectjrt.jar jar in their classpaths (both client side and server side). It is a small jar (25ko) that is packaged in the cactus distribution. (VMA)
  • add Added new java property "cactus.config" to specify location of cactus properties file (you pass it on the command line, ex: "java -Dcactus.config=conf/mycactus.properties"). If not specified, Cactus will look for a "cactus.properties" file in the classpath. (VMA)
  • add New howto that explains how to use JUnitEE as a Test Runner for executing Cactus tests from within the container (i.e. Cactus client and server sides live in the same JVM in the container). (VMA) Thanks to Kaarle Kaila.
  • fix Fixed bug in MockHttpURLConnection that was triggered by some modification in HttpUnit. It means that some Cactus 1.2 unit tests will fail if run with HttpUnit 1.2.8 (still in CVS on the 12/11/01). (VMA)
  • update Moved the Jyve FAQ to an internal FAQ - because Jyve was not always up and also so that we can have our FAQ in CVS along with the rest of the documentation. (VMA)
  • fix The getHost() method of the ServletURL class returns the ":" signifing the start of the port number of the host. This has side effects in Cactus in that passing in the host name and port into the WebRequest method as "127.0.0.1:7001" will cause Cactus to use this url "http://127.0.0.1::7001". (VMA) Thanks to Chris Hazen. Fixes bug 4563.
  • update Added support for JUnit 3.8 (which has replaced the name() method by a getName() one). Note that Cactus is still supporting earlier versions of JUnit. (VMA)
  • add Added a new method: WebRequest.setContentType(String) (if you don't specify anything it default to "application/x-www-form-urlencoded"). This will set the content type HTTP header for the request. You can get this value from your server code by calling HttpServletRequest.getContentType(). (VMA)
  • add Added new method: WebRequest.setUserData(InputStream) to allow sending arbitrary data in the request body. Note that calling this method will invalidate any parameters that were set to be sent in the request body. (VMA)
  • add Added support for testing code which uses HttpServletRequest.getReader(). Note: there seems to be a bug in Orion 1.4 for using getReader(). It runs fine on Orion 1.5 however. (VMA)
  • remove The WebRequest.setMethod() has been removed as deprecating it would have led to potential error difficult to locate (as Cactus default behaviour is now to pass parameter using GET, whereas before it was passing them using POST). (VMA)
  • update The existing WebRequest.addParameter(name, value) is now passing the parameter in the URL query string by default (same as calling WebRequest.addParameter(name, value, WebRequest.GET_METHOD). (VMA)
  • add Added a new WebRequest.addParameter(name, value, method) where method is either "GET" or "POST". This let you choose on a fine grain level, which method you'd like to use to pass a given parameter. (VMA)
  • update Changed the way Cactus passes internal parameters to the redirectors. They were previously passed as POST parameters (in the request body). They are now passed in the query string of the URL. This is to prepare the path for supporting unit testing binary data sent to servlets (like files, ...). Thanks to Kevin Jones for raising awareness of the issue and thanks to Alvin for providing a fix. (VMA)
  • remove Removed ServletTestRequest. It was deprecated in version 1.2 and is now removed in 1.3. You should use WebRequest instead. (VMA)

Cactus 1.2 (released on September 25 2001)

  • add Added code sample for unit testing tag libs. (NDL)
  • add Tutorial for unit testing EJBs. Thanks to Hudson Wong. (VMA)
  • add Tutorial for unit testing Taglibs. (NDL)
  • add Tutorial for unit testing Servlet Filters. (VMA)
  • add HttpServletRequestWrapper.getPathTranslated() now takes into account any path info set up in WebRequest.setURL(). (VMA)
  • fix Transform the WebResponse.getText() and WebResponse.getTestAsArray() so that they can be called repeatably and produce the same results. Previously the data were read from the server output stream and thus the second read was not returning anything (as it has already been read). (VMA)
  • update Cactus is now a top level Jakarta project. The package names have been changed from org.apache.commons.cactus to org.apache.cactus. (VMA)
  • fix Bug fix: getRequest(), getServletContext() and getServletConfig() methods on the pageContext implicit object (available in JspTestCase) now returns the Cactus wrapped versions of these objects, thus taking into account the simulated URL. (VMA) Thanks to Nicholas Lesiecki.
  • add Added support for unit testing Servlet Filters (Servlet API 2.3 only) by providing a new FilterTestCase test case class. Also added some filter unit testing samples in the distribution. (VMA)
  • fix The Cactus HTTP client was following redirects. This is wrong for unit tests as we should be able to assert returned headers, cookies, ... even for a redirect response. (VMA) Thanks to Tony Payne. Fixes bug 3427.
  • add New WebRequest.addCookie(String theDomain, String theName, String theValue) and WebRequest.addCookie(Cookie theCookie) methods for adding cookies to the request. (VMA)
  • add New org.apache.cactus.Cookie class that replaces the old org.apache.cactus.util.ClientCookie one which has been deprecated. The new Cookie class can be used in beginXXX() and endXXX() methods to manipulate cookies. (VMA)
  • update Improved cookie handling and support for domains and paths. It means that the domain need to match either the redirector host name or the host specified in the call to setURL(), otherwise the cookie won't get sent. If no domain is used when adding a cookie to WebRequest then "locahost" domain is used. The cookie path is optional and can be null. If not null, the cookie is only sent for requests starting with the path URL. (VMA)
  • add New dependency on the Jakarta Commons HttpClient component. It is used to manage client cookies, i.e. all Cactus code for managing cookies has been removed in favor of HttpClient. The consequence is that cookie handling now complies much better to the specifciation. (VMA)
  • fix Modified cactus.properties and web.xml mappings (by adding a trailing forward slash to redirector URL and mappings) to support test cases that returns an HTTP status code greater than 400. Otherwise HttpURLConnection returns a FileNotFoundException. (VMA) Thanks to Ron Smith.
  • add Added a Vector getLogs() method to ServletContextWrapper that returns a vector of the log messages generated by calls to ServletContext.log(). This is to easily assert the content of these calls when writing test cases. (VMA)
  • update Some major refactorings and clean up of code ... (VMA)
  • add Added automatic Ant script support for Orion 1.5.x (VMA)
  • fix The test result object that was placed in the ServletContext scope was not serializable, causing errors on IPlanet 6.x (VMA) Thanks to Navjeet Chabbewal.
  • add Added new end method signature that integrates with HttpUnit. You now have the possibility to use the full assertion power of HttpUnit in your end method. You simply need to define your end methods with the following signature: endXXX(com.meterware.httpunit.WebResponse). If you don't need that power and only want to do simple asserts you can use the endXXX(org.apache.cactus.WebResponse) signature which will let you do simple assertions (cookies, headers, content as a String, ...). (VMA)
  • update Deprecated the way to write end methods. The new correct way is endXXX(org.apache.cactus.WebResponse theResponse) (it was endXXX(HttpURLConnection theConnection) previously). All helper methods of AssertUtils have been included in WebResponse and AssertUtils is now deprecated. (VMA)
  • update Deprecated ServletTestRequest. New correct way of writing a begin method is beginXXX(WebRequest theRequest). The class methods are the same. (VMA)
  • update The Cactus runservertests custom Ant task will now not stop the server if it was running before the task was executed. This is to allow to run and rerun Cactus tests without starting/stopping the server every time you run the tests. (VMA) Thanks to Paul Dillon.
  • update Updated all Cactus documentation and reorganised it to better understand what Cactus is, how it works and how to use it. (VMA)
  • add The port used to start the servlet engines when running the sample tests (using the provided Ant scripts) is now configurable. This allows for not interfering with other servers running on the same port. (VMA)
  • add New tutorial for integration within JBuilder. Thanks to Cedric Chabanois and Kunal Vaishnav for providing this tutorial. (VMA)
  • fix Log4j was not initialized on the server side when using JSP Redirector (it was initialized only when using the Servlet Redirector) (VMA) Thanks to Jari Worsley.
  • fix HttpServletRequestWrapper.getRequestDispatcher() was not returning a wrapped request dispatcher, thus causing error when forward() or include() was used afterwards. (VMA) Thanks to Jari Worsley.
  • add New tutorial for integration within VisualAge for Java. Thanks to Todd Idler and Andrew B Forman for providing the information for this tutorial. (VMA)
  • add Added automatic Ant script support for Tomcat 3.3. (VMA)
  • add Now all HTTP parameters specified in the URL when using the ServletTestRequest.setURL() method are automatically passed as real HTTP parameters to the server side, meaning you don't have to manually call addParameters(). (VMA) Thanks to Jari Worsley.
  • fix Fixed bug: URL encoding was applied to cookies so that when passing a special in a cookie it would get encoded when trying to retrieve it. Thanks to Jari Worsley for fixing it. (VMA) Thanks to Kunal Vaishnav.

Cactus 1.1 (released on June 18 2001)

  • add Added automatic script support for Enhydra 3.1 (VMA) Thanks to Robert Leftwich.
  • update Tested with JUnit 3.7. (VMA)
  • add Added automatic script support for Resin 2.0 (VMA)
  • add Added logging facility to Cactus, using the Log4j logging framework. In order to make it easy on end users, Log4j is only required when building Cactus from the sources. It is however optional when running Cactus tests. If the log4j jar is present logs will be generated and if not, then no log will be generated. (VMA)
  • fix With some servlet engines (like Tomcat) there is a risk that the test result will not be committed to the servlet application scope *before* the client requests the test result, thus getting a no result exception or, worse, getting the result from the previous test. Also, if the returned result is bigger than the default buffer the server would block until the client side reads the data, thus resulting in a deadlock with the above-mentionned bug. (VMA) Thanks to Bob Davison. Fixes bug 1612.
  • add Added a new mehod AssertUtils.getResponseAsStringArray() that returns the servlet output stream as an array of string (each line terminated by a end of line is a string) in the same spirit as the AssertUtils.getResponseAsString() method which returnes the result as a single string. (VMA)
  • fix Corrected handling of multi-line text in AssertUtils.getResponseAsString() which was not handling correctly line terminators (they were skipped). (VMA) Thanks to Bob Davison. Fixes bug 1610.

Cactus 1.0 (released on May 2 2001)

  • fix Applied patch from Arun Katkere in order to prevent the "connexion reset by peer" error message that may appear in Tomcat when the connection is broken without reading the requested URL by the custom Ant tasks to start and stop a server. (VMA) Thanks to Arun Katkere. Fixes bug 1582.
  • add Added a contributing section that explains how to contribute to Cactus. (VMA)
  • add Added a license page on the Cactus web site that explains that Cactus is under the APL license. (VMA)
  • add Added a new target called deploy-site that automatically deploy the generated web site to it's home page on the Jakarta server. This will be very useful when integrated with GUMP nightly builds so that the web site is always up to date. (VMA)
  • update Added a "assigned to" description for items assigned to someone on the todo page + lists all the developers already assigned to tasks. (VMA)
  • update Make the ChangeLogTask work even when not connected to the Internet (i.e. use previous cvslog.xml file or generate an empty one if non already exists). (VMA)
  • add Modified the Changes page so that users can see at a glance the list of pages that have been modified recently on the Cactus web site. (VMA)
  • add Display the last updated date on the Cactus web site, in the left menu (VMA)

Cactus 1.0b2 (released on April 20 2001)

  • update Some minor refactoring of code (added AbstractTestCase, modified AbstractHttpClient, JspHttpClient, ServletHttpClient). (VMA)
  • add Add handling of multivalued HTTP headers (same header name with different values) in ServletTestRequest. (VMA) Thanks to Hoani Cross.
  • update Made the methods setUp() and tearDown() protected on the server side so that it is consistent with JUnit. (VMA)
  • update Modified the Ant runservertest task so that it also works when a servlet engine is already up and running and when a server is already stopped prior. This is to support intensive debugging mode when we don't want to start/stop the server all the time. (VMA) Thanks to Philip Aston.
  • add Added a "Cactus scope and status" page on the web site that explains the current scope and status of Cactus. (VMA)
  • add Added a "Cactus goals" page on the web site that gives rough goals and guidelines for the future of Cactus. (VMA)
  • update Improved build process so that it nows works even if junit, stylebook, .. jars are not in the CLASSPATH prior to running the build. (VMA) Thanks to Jeff Turner.

Cactus 1.0b1 (released on April 9 2001)

  • update Updated the Cactus distribution so that everything is contained into one single file (doc + jars + sample). The sources are available separately in a second file. (VMA)
  • add Added a section on the main web site page to explain the reason for the Cactus name. (VMA)
  • update Tested with JUnit 3.6. (VMA)
  • update Changed the web site skin to be the Jakarta skin and not the Apache XML skin. This is because Cactus is now part of the Jakarta Commons project. (VMA)
  • update Updated the web site installation section to better explain the required steps to install Cactus. Namely, it covers installing Ant and installing the Cactus Sample application. (VMA)
  • remove Removed the deliverable dependencies jar. Instead, provides a zipped installation of Ant containing the needed jars for tasks used by Cactus and Cactus Sample build files. (VMA)
  • update Removed the misc/ directory and JBuilder files from CVS and source distribution. (VMA)
  • update Renamed the project from J2EEUnit to Cactus. Although it was a difficult decision to make, it had to be done as J2EE is a Sun trademark. Renamed all occurrences of J2EEUnit to Cactus and changed package names (from j2eeunit.* to org.apache.commons.cactus.*. (VMA)
  • fix The sample application sources now contains all needed configuration files (the manifest and web.xml files were missing in the previous release). (VMA)
  • update Donated the project to the Apache Software Foundation. Changed license from GPL to APL. Moved packages from j2eeunit.* to org.apache.commons.j2eeunit.* and changed copyrights (VMA)