The following two posts contain two patches which clean up the Cactus tests is the taglibs subproject, fixing all test failures. The patches are trivial; the failures were a result of minor bit-rot in the tests.

Running the Cactus tests is easy enough, but there's one issue I haven't resolved yet: the Maven build isn't generating the struts-config.xml for the test WAR. I've attached a static copy to use until that's fixed.

To run the tests:

- save the attached struts-config.xml to taglibs/src/webapp/WEB-INF
- define the location(s) of your servlet container(s) in
  build.properties (see build.properties.sample for examples)
- run 'maven cactus:test'

The tests take 20 to 30 minutes to run on my Powerbook.

To get a pretty-printed HTML test report, you can additionally run 'maven -Dcactus.execute.during.report=false cactus:report xdoc', which will generate target/docs/cactus-report.html.

See following posts for the patches themselves.

L.

PS, if you'd prefer me to put these in Bugzilla I can; I figured they were trivial enough someone might care to commit them right off ;-)
<?xml version="1.0" encoding="ISO-8859-1" ?>

<!DOCTYPE struts-config PUBLIC
          "-//Apache Software Foundation//DTD Struts Configuration 1.3//EN"
          "http://struts.apache.org/dtds/struts-config_1_3.dtd";>

<!--
     This is a blank Struts configuration file with an example
     welcome action/page and other commented sample elements.

     Tiles and the Struts Validator are configured using the factory defaults
     and are ready-to-use.

     NOTE: If you have a generator tool to create the corresponding Java classes
     for you, you could include the details in the "form-bean" declarations.
     Otherwise, you would only define the "form-bean" element itself, with the
     corresponding "name" and "type" attributes, as shown here.
-->


<struts-config>


<!-- ================================================ Form Bean Definitions -->
    <form-beans>

        <form-bean name="testDynaFormBean"
                   type="org.apache.struts.validator.DynaValidatorForm">
          <form-property name="field1" type="java.lang.String"/>
          <form-property name="field2" type="java.lang.String"/>
        </form-bean>


        <!-- Registration form bean -->
        <form-bean name="testFormBean"
                   type="org.apache.struts.taglib.SimpleBeanForTesting"/>


    </form-beans>

<!-- =========================================== Global Forward Definitions -->
    <global-forwards>
        <forward name="simpleForward"
                    path="/path/to/non/existing/jsp.jsp"/>

        <forward name="testIncludeTagForward"
                    path="/org/apache/struts/taglib/bean/resources/IncludeTagTest.jsp"/>
    </global-forwards>

<!-- =========================================== Action Mapping Definitions -->
    <action-mappings>
        <action    path="/testIncludeTagTransaction"
                   type="org.apache.struts.taglib.bean.resources.IncludeTagTransactionTestAction">
          <forward name="success"
                     path="/org/apache/struts/taglib/bean/resources/IncludeTagTest.jsp"/>
        </action>

        <action    path="/simpleAction"
                   type="does.not.exist.SimpleAction">
          <forward name="success"
                     path="/does/not/exist/jsp.jsp"/>
        </action>

        <action    path="/testFormTag"
                   type="org.apache.struts.taglib.html.resources.FormTagTestAction"
                   name="testFormBean"
                  scope="request">
          <forward name="success"
                      path="/org/apache/struts/taglib/html/TestFormTag1.jsp"/>
        </action>
    </action-mappings>

<!-- ======================================== Message Resources Definitions -->
    <message-resources
      parameter="org.apache.struts.taglib.bean.resources.ApplicationResources"/>

    <message-resources
      parameter="org.apache.struts.taglib.bean.resources.AlternateApplicationResources"
      key="alternate"/>

  <!-- =================================================== Validator plugin -->

<!--
  <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property
        property="pathnames"
        value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
  </plug-in>
-->

</struts-config>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to