Author: ptahchiev Date: Fri Mar 21 11:09:05 2008 New Revision: 639742 URL: http://svn.apache.org/viewvc?rev=639742&view=rev Log: Changes on the cactus documentation: some links improved, and also added the page for new cactus task.
Added: jakarta/cactus/trunk/cactus-site/src/site/resources/misc/ jakarta/cactus/trunk/cactus-site/src/site/resources/misc/cactus-report.xsl (with props) jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/task_cactus1.8.xml (with props) Removed: jakarta/cactus/trunk/cactus-site/src/site/xdoc/misc/ Modified: jakarta/cactus/trunk/cactus-site/src/site/site.xml jakarta/cactus/trunk/cactus-site/src/site/xdoc/downloads.xml jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/index.xml jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/eclipse/runner_plugin.xml jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/integration_browser.xml jakarta/cactus/trunk/cactus-site/src/site/xdoc/writing/howto_security.xml Added: jakarta/cactus/trunk/cactus-site/src/site/resources/misc/cactus-report.xsl URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/cactus-site/src/site/resources/misc/cactus-report.xsl?rev=639742&view=auto ============================================================================== --- jakarta/cactus/trunk/cactus-site/src/site/resources/misc/cactus-report.xsl (added) +++ jakarta/cactus/trunk/cactus-site/src/site/resources/misc/cactus-report.xsl Fri Mar 21 11:09:05 2008 @@ -0,0 +1,355 @@ +<?xml version="1.0"?> +<!-- + The Apache Software License, Version 1.1 + + Copyright (c) 2001-2003 The Apache Software Foundation. All rights + reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + + 3. The end-user documentation included with the redistribution, if + any, must include the following acknowlegement: + "This product includes software developed by the + Apache Software Foundation (http://www.apache.org/)." + Alternately, this acknowlegement may appear in the software itself, + if and wherever such third-party acknowlegements normally appear. + + 4. The names "The Jakarta Project", "Cactus", and "Apache Software + Foundation" must not be used to endorse or promote products derived + from this software without prior written permission. For written + permission, please contact [EMAIL PROTECTED] + + 5. Products derived from this software may not be called "Apache" + nor may "Apache" appear in their names without prior written + permission of the Apache Group. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + ==================================================================== + + This software consists of voluntary contributions made by many + individuals on behalf of the Apache Software Foundation. For more + information on the Apache Software Foundation, please see + <http://www.apache.org/>. + --> + +<!-- + + Sample stylesheet to be used with the Cactus ServletTestRunner output. + Based on the file junit-noframes.xsl from Apache Ant 1.5. + + @author Stephane Bailliez <a href="mailto:[EMAIL PROTECTED]"/> + @author Erik Hatcher <a href="mailto:[EMAIL PROTECTED]"/> + @author Christopher Lenz <a href="mailto:[EMAIL PROTECTED]"/> + +--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="html" indent="yes" encoding="US-ASCII"/> + <xsl:decimal-format decimal-separator="." grouping-separator="," /> + <xsl:template match="testsuites"> + <html> + <head> + <style type="text/css"> + body { + font:normal 68% verdana,arial,helvetica; + color:#000000; + } + table tr td, table tr th { + font-size: 68%; + } + table.details tr th{ + font-weight: bold; + text-align:left; + background:#a6caf0; + } + table.details tr td{ + background:#eeeee0; + } + + p { + line-height:1.5em; + margin-top:0.5em; margin-bottom:1.0em; + } + h1 { + margin: 0px 0px 5px; font: 165% verdana,arial,helvetica + } + h2 { + margin-top: 1em; margin-bottom: 0.5em; font: bold 125% verdana,arial,helvetica + } + h3 { + margin-bottom: 0.5em; font: bold 115% verdana,arial,helvetica + } + h4 { + margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica + } + h5 { + margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica + } + h6 { + margin-bottom: 0.5em; font: bold 100% verdana,arial,helvetica + } + .Error { + font-weight:bold; color:red; + } + .Failure { + font-weight:bold; color:purple; + } + </style> + </head> + <body> + <a name="top"></a> + <xsl:call-template name="header"/> + <xsl:call-template name="summary"/> + <hr size="1" width="95%" align="left"/> + <xsl:call-template name="classes"/> + </body> + </html> + </xsl:template> + + <xsl:template name="header"> + <h1>Unit Test Results</h1> + <table width="100%"> + <tr> + <td align="left"></td> + <td align="right"> + Designed for use with + <a href='http://jakarta.apache.org/cactus/'>Cactus</a>. + </td> + </tr> + </table> + <hr size="1"/> + </xsl:template> + + <xsl:template name="summary"> + <h2>Summary</h2> + <xsl:variable name="testCount" select="sum(testsuite/@tests)"/> + <xsl:variable name="errorCount" select="sum(testsuite/@errors)"/> + <xsl:variable name="failureCount" select="sum(testsuite/@failures)"/> + <xsl:variable name="timeCount" select="sum(testsuite/@time)"/> + <xsl:variable name="successRate" select="($testCount - $failureCount - $errorCount) div $testCount"/> + <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> + <tr valign="top"> + <th>Tests</th> + <th>Failures</th> + <th>Errors</th> + <th>Success rate</th> + <th>Time</th> + </tr> + <tr valign="top"> + <xsl:attribute name="class"> + <xsl:choose> + <xsl:when test="$failureCount > 0">Failure</xsl:when> + <xsl:when test="$errorCount > 0">Error</xsl:when> + </xsl:choose> + </xsl:attribute> + <td><xsl:value-of select="$testCount"/></td> + <td><xsl:value-of select="$failureCount"/></td> + <td><xsl:value-of select="$errorCount"/></td> + <td> + <xsl:call-template name="display-percent"> + <xsl:with-param name="value" select="$successRate"/> + </xsl:call-template> + </td> + <td> + <xsl:call-template name="display-time"> + <xsl:with-param name="value" select="$timeCount"/> + </xsl:call-template> + </td> + </tr> + </table> + <table border="0" width="95%"> + <tr> + <td style="text-align: justify;"> + Note: <i>failures</i> are anticipated and checked for with assertions + while <i>errors</i> are unanticipated. + </td> + </tr> + </table> + </xsl:template> + + <xsl:template name="classes"> + <xsl:for-each select="testsuite"> + <xsl:sort select="@name"/> + <!-- create an anchor to this class name --> + <a name="[EMAIL PROTECTED]"></a> + <h3>TestCase <xsl:value-of select="@name"/></h3> + + <table class="details" border="0" cellpadding="5" cellspacing="2" width="95%"> + <xsl:call-template name="testcase.test.header"/> + <!-- + test can even not be started at all (failure to load the class) + so report the error directly + --> + <xsl:if test="./error"> + <tr class="Error"> + <td colspan="4"><xsl:apply-templates select="./error"/></td> + </tr> + </xsl:if> + <xsl:apply-templates select="./testcase" mode="print.test"/> + </table> + <p/> + <a href="#top">Back to top</a> + </xsl:for-each> + </xsl:template> + + <xsl:template match="testsuite" mode="header"> + <tr valign="top"> + <th width="80%">Name</th> + <th>Tests</th> + <th>Errors</th> + <th>Failures</th> + <th nowrap="nowrap">Time(s)</th> + </tr> + </xsl:template> + + <!-- class header --> + <xsl:template name="testsuite.test.header"> + <tr valign="top"> + <th width="80%">Name</th> + <th>Tests</th> + <th>Errors</th> + <th>Failures</th> + <th nowrap="nowrap">Time(s)</th> + </tr> + </xsl:template> + + <!-- method header --> + <xsl:template name="testcase.test.header"> + <tr valign="top"> + <th>Name</th> + <th>Status</th> + <th width="80%">Type</th> + <th nowrap="nowrap">Time(s)</th> + </tr> + </xsl:template> + + <!-- class information --> + <xsl:template match="testsuite" mode="print.test"> + <tr valign="top"> + <!-- set a nice color depending if there is an error/failure --> + <xsl:attribute name="class"> + <xsl:choose> + <xsl:when test="@failures[.> 0]">Failure</xsl:when> + <xsl:when test="@errors[.> 0]">Error</xsl:when> + </xsl:choose> + </xsl:attribute> + <!-- print testsuite information --> + <td><a href="[EMAIL PROTECTED]"><xsl:value-of select="@name"/></a></td> + <td><xsl:value-of select="@tests"/></td> + <td><xsl:value-of select="@errors"/></td> + <td><xsl:value-of select="@failures"/></td> + <td> + <xsl:call-template name="display-time"> + <xsl:with-param name="value" select="@time"/> + </xsl:call-template> + </td> + </tr> + </xsl:template> + + <xsl:template match="testcase" mode="print.test"> + <tr valign="top"> + <xsl:attribute name="class"> + <xsl:choose> + <xsl:when test="failure | error">Error</xsl:when> + </xsl:choose> + </xsl:attribute> + <td><xsl:value-of select="@name"/></td> + <xsl:choose> + <xsl:when test="failure"> + <td>Failure</td> + <td><xsl:apply-templates select="failure"/></td> + </xsl:when> + <xsl:when test="error"> + <td>Error</td> + <td><xsl:apply-templates select="error"/></td> + </xsl:when> + <xsl:otherwise> + <td>Success</td> + <td></td> + </xsl:otherwise> + </xsl:choose> + <td> + <xsl:call-template name="display-time"> + <xsl:with-param name="value" select="@time"/> + </xsl:call-template> + </td> + </tr> + </xsl:template> + + <xsl:template match="failure"> + <xsl:call-template name="display-failures"/> + </xsl:template> + + <xsl:template match="error"> + <xsl:call-template name="display-failures"/> + </xsl:template> + + <!-- Style for the error and failure in the tescase template --> + <xsl:template name="display-failures"> + <xsl:choose> + <xsl:when test="not(@message)">N/A</xsl:when> + <xsl:otherwise> + <xsl:value-of select="@message"/> + </xsl:otherwise> + </xsl:choose> + <!-- display the stacktrace --> + <code> + <p/> + <xsl:call-template name="br-replace"> + <xsl:with-param name="word" select="."/> + </xsl:call-template> + </code> + </xsl:template> + + <!-- + template that will convert a carriage return into a br tag + @param word the text from which to convert CR to BR tag + --> + <xsl:template name="br-replace"> + <xsl:param name="word"/> + <xsl:choose> + <xsl:when test="contains($word,'
')"> + <xsl:value-of select="substring-before($word,'
')"/> + <br/> + <xsl:call-template name="br-replace"> + <xsl:with-param name="word" select="substring-after($word,'
')"/> + </xsl:call-template> + </xsl:when> + <xsl:otherwise> + <xsl:value-of select="$word"/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template name="display-time"> + <xsl:param name="value"/> + <xsl:value-of select="format-number($value,'0.000')"/> + </xsl:template> + + <xsl:template name="display-percent"> + <xsl:param name="value"/> + <xsl:value-of select="format-number($value,'0.00%')"/> + </xsl:template> + +</xsl:stylesheet> + Propchange: jakarta/cactus/trunk/cactus-site/src/site/resources/misc/cactus-report.xsl ------------------------------------------------------------------------------ svn:eol-style = native Modified: jakarta/cactus/trunk/cactus-site/src/site/site.xml URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/cactus-site/src/site/site.xml?rev=639742&r1=639741&r2=639742&view=diff ============================================================================== --- jakarta/cactus/trunk/cactus-site/src/site/site.xml (original) +++ jakarta/cactus/trunk/cactus-site/src/site/site.xml Fri Mar 21 11:09:05 2008 @@ -60,6 +60,7 @@ <item name="CactifyEar Task" href="integration/ant/task_cactifyear.html"/> <item name="CactifyWar Task" href="integration/ant/task_cactifywar.html"/> <item name="Cactus Task" href="integration/ant/task_cactus.html"/> + <item name="Cactus Task 1.8" href="integration/ant/task_cactus1.8.html"/> <item name="Resin Task" href="integration/ant/task_resin.html"/> <item name="RunServerTests Task" href="integration/ant/task_runservertests.html"/> <item name="WebXmlMerge Task" href="integration/ant/task_webxmlmerge.html"/> Modified: jakarta/cactus/trunk/cactus-site/src/site/xdoc/downloads.xml URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/cactus-site/src/site/xdoc/downloads.xml?rev=639742&r1=639741&r2=639742&view=diff ============================================================================== --- jakarta/cactus/trunk/cactus-site/src/site/xdoc/downloads.xml (original) +++ jakarta/cactus/trunk/cactus-site/src/site/xdoc/downloads.xml Fri Mar 21 11:09:05 2008 @@ -78,7 +78,7 @@ maven plugin:download -DgroupId=cactus -DartifactId=cactus-maven -Dversion=<version> ]]></source> <p> - For more details see the <a href="/integration/maven/installing.html">Maven + For more details see the <a href="integration/maven/installing.html">Maven Cactus plugin installation page</a>. </p> Modified: jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/index.xml URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/index.xml?rev=639742&r1=639741&r2=639742&view=diff ============================================================================== --- jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/index.xml (original) +++ jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/index.xml Fri Mar 21 11:09:05 2008 @@ -57,7 +57,7 @@ foundation by using a dedicated continuous integration tool like <a href="http://cruisecontrol.sourceforge.net/">CruiseControl</a>, <a href="http://jakarta.apache.org/gump/">Gump</a> or - <a href="http://www.urbancode.com/projects/anthill/">AntHill</a>. + <a href="http://www.urbancode.com/html/default.html">AntHill</a>. </p> <p> Ant is written in Java and provides a wide variety of tasks that Added: jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/task_cactus1.8.xml URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/task_cactus1.8.xml?rev=639742&view=auto ============================================================================== --- jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/task_cactus1.8.xml (added) +++ jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/task_cactus1.8.xml Fri Mar 21 11:09:05 2008 @@ -0,0 +1,360 @@ +<?xml version="1.0"?> + +<!-- + * ======================================================================== + * + * Copyright 2001-2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + * ======================================================================== +--> + +<document id="task_cactus"> + + <properties> + <title>Cactus Ant Task - version 1.8</title> + </properties> + + <body> + + <section name="Version 1.8"> + <p> + The <code>cactus</code> task is being significantly changed in version 1.8 of Cactus, + and now Cactus uses <a href="http://cargo.codehaus.org/">Cargo project</a> for all + server-related manipulation. If you use Cactus version gt to 1.8 than you should follow this + documentation. + </p> + </section> + + <section name="Cactus Task"> + + <p> + The task <strong>cactus</strong> is an extension of the + <strong>junit</strong> task that is included in Ant as an optional task. + <strong>cactus</strong> extends <strong>junit</strong> to enable + in-container tests. It also relies on the <a href="http://cargo.codehaus.org/">Cargo</a> tasks + to start/stop the server and to deploy the webapplication. + Currently Cactus works with the latest release of Cargo - 0.9 + </p> + + <p> + Here are the different steps peformed automatically by the + <code>cactus</code> task: + </p> + <ol> + <li> + Invoke <code>cargo</code> task to deploy the cactified WAR/EAR into the target container, + </li> + <li> + Invoke <code>cargo</code> task and if the container is not already started, start it. Otherwise, leave + it running, + </li> + <li> + Run the Cactus tests, + </li> + <li> + Invoke the <code>cargo</code> tasks and check if the container was started by the <code>cargo</code> task the + stop it. Otherwise, leave it running. + </li> + </ol> + + <p> + For a list of supported containers, you can check the corresponding + version of <a href="http://cargo.codehaus.org/">cargo</a> + </p> + + <subsection name="Parameters"> + + <p> + As this task is an extension of the <strong>junit</strong> task, it + also supports all attributes that the <strong>junit</strong> task + supports. In addition, the following parameters are supported: + </p> + + <table> + <tr> + <th>Name</th> + <th>Description</th> + <th>Required</th> + </tr> + <tr> + <td><strong>warfile</strong></td> + <td> + The web application archive that should be tested. The archive must + already contain everything needed for running Cactus tests (it must + be <em><a href="task_cactifywar.html">cactified</a></em>). + </td> + <td>Yes, unless the <em>earfile</em> attribute is specified</td> + </tr> + <tr> + <td><strong>earfile</strong></td> + <td> + The enterprise application archive that should be tested. The + archive must contain a web module that already contains everything + needed for running Cactus tests (it must be + <em><a href="task_cactifywar.html">cactified</a></em>). + </td> + <td>Yes, unless the <em>warfile</em> attribute is specified</td> + </tr> + </table> + + </subsection> + </section> + + + <section name="Nested Elements"> + + <p> + As this task is an extension of the <strong>junit</strong> task, it + also supports all the nested elements supported by the + <strong>junit</strong> task. In addition, the following nested + elements are supported: + </p> + + <section name="cactusproperty"> + + <p> + The <strong>cactusproperty</strong> element lets you specify the + name of a property file. All the properties specified in this file + will be read and set as System properties. + </p> + + <subsection name="Parameters"> + + <note> + The <strong>cactusproperty</strong> element supports the following + parameters: + </note> + + <table> + <tr> + <th>Name</th> + <th>Description</th> + <th>Required</th> + </tr> + <tr> + <td>server</td> + <td> + Specifies whether the properties should be added in the Cactus + server side JVM ("<code>true</code>") or the Cactus client side + JVM ("<code>false</code>"). + </td> + <td>Yes</td> + </tr> + </table> + + <p> + Example (used for enabling Cactus logging): + </p> + +<source><![CDATA[ +<!-- Configure the cactus task for logging --> +<cactusproperty server="false" + propertiesFile="${target.dir}/logging_client.properties"/> +<cactusproperty server="true" + propertiesFile="${target.dir}/logging_server.properties"/> +]]></source> + + </subsection> + + </section> +</section> + + <section name="containerset"> + + <p> + The <strong>containerset</strong> element lets you specify which + containers the tests should run against. Every element nested inside + this element corresponds to a container. See below for a list of + container elements supported in this element. + </p> + + <subsection name="Parameters"> + + <note> + The <strong>containerset</strong> element supports the following + parameters: + </note> + + <table> + <tr> + <th>Name</th> + <th>Description</th> + <th>Required</th> + </tr> + <tr> + <td>timeout</td> + <td> + Specifies the timeout in milliseconds after which starting up + a container should be given up. If the timeout is reached + before the container starts responding with a successful HTTP + status code, the build will fail. + </td> + <td>No, default is <em>3 minutes</em></td> + </tr> + <tr> + <td>proxyport</td> + <td> + By specifying this attribute it is possible to insert some + application that acts as a local TCP/IP proxy between the + test runner and the actual containers. Most importantly, that + includes applications that record and display the HTTP + transactions, which can be helpful in tracking down tricky + problems. + </td> + <td>No</td> + </tr> + <tr> + <td>cargo</td> + <td> + A list of <code>cargo</code> tasks that are supposed to manipulate + the container. For a reference of the parameters that these <code>cargo</code> tasks + can get, you can reference the <a href="http://cargo.codehaus.org/">Cargo site</a>. + </td> + <td>Yes</td> + </tr> + </table> + + </subsection> + + </section> + + <section name="containerclasspath"> + <p> + The optional <strong>containerclasspath</strong> element lets you + specify additional jars that will be added to the container + classpaths that are used to start/stop the containers. This is in + addition to the container jars which are automatically added by the + <code><cactus></code> task. The <code>containerclasspath</code> + element behaves exactly the same as the Ant <code>classpath</code> + element. In most cases you will not need to use this element. + </p> + </section> + + + + + + + + <section name="Examples"> + + <p> + The following example demonstrates how to run a suite of Cactus tests + against three contains with builtin support (JBoss 3, Resin 2 and + Tomcat 4). + </p> +<source> + + <![CDATA[ +<cactus warfile="${test.dir}/test.war" + printsummary="yes" failureproperty="tests.failed"> + <classpath> + <path refid="cactus.classpath"/> + <pathelement location="${build.classes.dir}"/> + <pathelement location="${test.classes.dir}"/> + </classpath> + <containerset> + <jboss2x dir="${jboss3x.home}" config="default" + todir="${test.reports.dir}/jboss3x"/> + <resin2x dir="${resin2x.home}" port="8080" + todir="${test.reports.dir}/resin2x"/> + <tomcat4x dir="${tomcat4x.home}" port="8080" + todir="${test.reports.dir}/tomcat4x"/> + </containerset> + <formatter type="xml"/> + <batchtest> + <fileset dir="${src.test.dir}"> + <include name="**/Test*.java"/> + <exclude name="**/TestAll.java"/> + </fileset> + </batchtest> +</cactus> +]]> + +<![CDATA[ + <cactus warfile="${cactified.servlet.archive.name}" + printsummary="yes"> + <classpath> + <path refid="cactus.classpath"/> + <pathelement location="${build.dir}"/> + <pathelement location="${ivy.lib.dir}/htmlunit-1.10.jar"/> + </classpath> + <containerset> + <cargo containerId="${tomcat.container.id}" output="${logs.dir}/output.log" log="${logs.dir}/cargo.log"> + <zipUrlInstaller + installUrl="http://apache.speedbone.de/tomcat/tomcat-5/v5.5.25/bin/apache-tomcat-5.5.25.zip" + installDir="${target.dir}/${tomcat.container.id}"/> + <configuration> + <property name="cargo.servlet.port" value="${cargo.servlet.port}"/> + <property name="cargo.logging" value="${cargo.logging}"/> + <deployable type="${cactus.sample.archive.type}" file="${cactified.servlet.archive.name}"/> + </configuration> + </cargo> + </containerset> + <sysproperty key="prop1" value="value1"/> + <sysproperty key="prop2" value="value2"/> + <formatter type="${cactus.formatter.type}"/> + <batchtest todir="${reports.dir}"> + <fileset dir="${src.dir}"> <!-- cactus.src.dir ?--> + <include name="**/Test*.java"/> + </fileset> + </batchtest> + </cactus> +]]> + + + +</source> + + <p> + The next example shows the use of the <strong>generic</strong> + container element for starting/stopping a custom container. You need + to define the two targets <em>mycontainer.start</em> and + <em>mycontainer.stop</em>, so that the container is started up (on + port 8080) before the tests are run, and shut down after the tests + completed. How these targets are implemented is highly dependant on + the container. Most likely you'll need to copy some files and use + the <strong><java></strong> task to invoke a container-provided + Java class that can start/stop the container. + </p> + + <source><![CDATA[ +<cactus warfile="${test.dir}/test.war" + printsummary="yes" failureproperty="tests.failed"> + <classpath> + <path refid="cactus.runtime.classpath"/> + <pathelement location="${build.classes.dir}"/> + <pathelement location="${test.classes.dir}"/> + </classpath> + <containerset> + <generic name="My Container" port="8080"> + <startup target="mycontainer.start"/> + <shutdown target="mycontainer.stop"/> + </generic> + </containerset> + <formatter type="xml"/> + <batchtest> + <fileset dir="${src.test.dir}"> + <include name="**/Test*.java"/> + <exclude name="**/TestAll.java"/> + </fileset> + </batchtest> +</cactus> +]]></source> + + </section> + + </body> +</document> Propchange: jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/ant/task_cactus1.8.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/eclipse/runner_plugin.xml URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/eclipse/runner_plugin.xml?rev=639742&r1=639741&r2=639742&view=diff ============================================================================== --- jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/eclipse/runner_plugin.xml (original) +++ jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/eclipse/runner_plugin.xml Fri Mar 21 11:09:05 2008 @@ -147,6 +147,15 @@ Log view a la Ant plugin </li> </ul> + <ul> + <li> + From version 1.8 there is a quickfix feature you can use.<br/> + <p> + <img src="../../images/eclipse/runner/quickfix.png" + alt="Cactus quickfix feature"/> + </p> + </li> + </ul> </section> <a name="installation"/> Modified: jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/integration_browser.xml URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/integration_browser.xml?rev=639742&r1=639741&r2=639742&view=diff ============================================================================== --- jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/integration_browser.xml (original) +++ jakarta/cactus/trunk/cactus-site/src/site/xdoc/integration/integration_browser.xml Fri Mar 21 11:09:05 2008 @@ -103,10 +103,8 @@ </ul> <p> - Here is an example of what you will get: - </p> - <p> - <img src="../images/servlettestrunner_xml.jpg" alt="XML output of ServletTestRunner"/> + Here is an example of what you will get:<br/> + <img src="../images/servlettestrunner_xml.jpg" alt="XML output of ServletTestRunner"/> </p> <note> @@ -117,7 +115,7 @@ <p> Ok, that's nice ... But what if I want HTML instead of XML? Don't worry there is a solution. Grab the following - <a href="/misc/cactus-report.xsl">XSLT stylesheet</a> + <a href="../misc/cactus-report.xsl">XSLT stylesheet</a> (based on the stylesheet used by the <strong><junitreport></strong> Ant task), drop it in your webapp and name it <code>cactus-report.xsl</code> (in the root Modified: jakarta/cactus/trunk/cactus-site/src/site/xdoc/writing/howto_security.xml URL: http://svn.apache.org/viewvc/jakarta/cactus/trunk/cactus-site/src/site/xdoc/writing/howto_security.xml?rev=639742&r1=639741&r2=639742&view=diff ============================================================================== --- jakarta/cactus/trunk/cactus-site/src/site/xdoc/writing/howto_security.xml (original) +++ jakarta/cactus/trunk/cactus-site/src/site/xdoc/writing/howto_security.xml Fri Mar 21 11:09:05 2008 @@ -107,7 +107,7 @@ <note> If you're using the Cactus Ant tasks to execute your Cactus - tests, please check the <a href="site:task_cactifywar">Cactifywar + tests, please check the <a href="../task_cactifywar.html">Cactifywar task</a> page as the configuration below is only required for manual configuration and is handled automatically by the Cactifywar task. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]