jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arndt Pohlmann" <pohlm...@adesso.de>
Subject Running tests with StrutsTestCase, actionPerform() does not work
Date Fri, 22 Aug 2003 07:50:09 GMT
Hi!

I've set up a testing environment for an existing Webapplication which uses
Struts 1.1, with Cactus 13-1.5beta1 and StrutsTestCase 200-1.1_2.2
I add the test classes during ant build via "CactifyWar"-task, and then use
runservertests and junit-tasks for running the tests.

But my problem is, that my test methods work, but do not execute the
"execute()"-methods of my Action classes. It does something (JBoss tells me
something about PropertyMessageResources initializing, and TilesPlugin
factory and so on, but no logging msgs from my execute method...

I've already posted in StutsTestCase-forum, but it is less frequented than
this mailing list, and I really have to get this going (this is a project
for my last exam...)

Here's my cactify war task:

<target name="cactify war" depends="buildwar" description="Adds cactus
resources to WAR" >
        <delete file="${build.dir}/aproda3.war" />
        <copy todir="${build.dir}" file="${dist.dir}/aproda3.war" />
        <delete file="${dist.dir}/aproda3.war" />
        <cactifywar srcfile="${build.dir}/aproda3.war" destfile="
${dist.dir}/aproda3.war">
            <lib file="${lib.dir}/strutstest.jar" />
        </cactifywar>
    </target>

Here's my testing-task (conatiner.start and container.stop are empty, since
the war gets deployed elsewhere):

 <target name="Run Tests" description="Runs the Cactus Tests">
        <delete dir="${reports.dir}" />
        <mkdir dir="${reports.dir}" />
        <runservertests
            testurl
="http://localhost:8080/ServletRedirector?Cactus_Service=RUN_TEST"
            starttarget="container.start"
            stoptarget="container.stop"
            testtarget="test"/>
    </target>

<target name="test">
        <junit fork="yes">
            <formatter type="plain" usefile="false" />
            <classpath refid="test.classpath" />
            <batchtest>
                <fileset dir="${classes.dir}">
                    <include name="**/Test*.class"/>
                    <exclude name="**/TestAll.class"/>
                </fileset>
            </batchtest>
        </junit>
    </target>


Any suggestions are more than welcome!

Thanks,

Arndt




Mime
View raw message