You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by lu...@apache.org on 2005/02/15 14:03:15 UTC
cvs commit: jakarta-slide/testsuite batchtest.properties.sample build.xml
luetzkendorf 2005/02/15 05:03:15
Modified: testsuite build.xml
Added: testsuite batchtest.properties.sample
Log:
Added tasks for batch-tests, i.e. for executing multiple test packages
against multiple slide configurations in a single job.
Revision Changes Path
1.32 +176 -1 jakarta-slide/testsuite/build.xml
Index: build.xml
===================================================================
RCS file: /home/cvs/jakarta-slide/testsuite/build.xml,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- build.xml 16 Nov 2004 14:34:38 -0000 1.31
+++ build.xml 15 Feb 2005 13:03:15 -0000 1.32
@@ -10,6 +10,12 @@
<property name="client.jar" value="jakarta-slide-webdavlib-${version}.jar" />
<property name="jdom.jar" value="${basedir}/../lib/jdom-1.0.jar"/>
+ <property name="configs.dir" value="testsuite/junit/testconfigs"/>
+ <property name="slide-dist.dir" value="../dist"/>
+ <property name="temp.dir" value="temp"/>
+ <property name="catalina-ant.jar" value="lib/catalina-ant.jar"/>
+ <property name="ant-contrib.jar" value="lib/ant-contrib-1.0b1.jar"/>
+
<!-- =============================================================== -->
<target name="compile">
<echo message="Compiling ..." />
@@ -70,6 +76,7 @@
</target>
<!-- =============================================================== -->
+ <!-- Targets to run special test packages -->
<target name="tp.functional" description="Runs functional tests">
<property name="tp.include" value="functional/**/*.xml"/>
@@ -129,10 +136,13 @@
<property name="tp.multiuser.exclude" value="**/multi-user/**/*.xml"/>
<property name="tp.result" location="${basedir}/result.xml"/>
+ <property name="tp.result" location="${basedir}/result.xml"/>
+ <property name="tp.printProperties" value="false"/>
<echo message="tp.include=${tp.include}"/>
<echo message="tp.exclude=${tp.exclude}"/>
<tp config="${basedir}/testsuite/junit/tprocessor.xml"
- urlEncoding="UTF-8" tracingRequest="xar" result="${tp.result}">
+ urlEncoding="UTF-8" tracingRequest="xar" result="${tp.result}"
+ printProperties="${tp.printProperties}">
<fileset dir="${basedir}/testsuite/junit/xmltestcases">
<include name="${tp.include}"/>
<exclude name="${tp.exclude}"/>
@@ -150,6 +160,171 @@
<property file="${tp.props}"/>
</target>
+ <!-- =============================================================== -->
+ <!-- targets for batch tests -->
+ <target name="batch-test" depends="batch-init"
+ description="Executes all test given in batchtest.properties.">
+ <available file="batchtest.properties" type="file" property="batchtest.properties.exists" />
+ <fail unless="batchtest.properties.exists">batchtest.properties not found. Please copy batchtest.properties.sample and adapt it.</fail>
+ <property file="batchtest.properties"/>
+
+ <for list="${batch.test.configs}" param="c" trim="true">
+ <sequential>
+ <echo>Installing Slide with configuration: "@{c}"</echo>
+ <antcall target="deploy">
+ <param name="test.config" value="@{c}"/>
+ </antcall>
+ <for list="${@{c}}" param="t" trim="true">
+ <sequential>
+ <echo>Running testsuite with target: @{t}</echo>
+ <antcall target="batch-pkg">
+ <param name="test.target" value="@{t}"/>
+ <param name="test.config" value="@{c}"/>
+ </antcall>
+ </sequential>
+ </for>
+ <antcall target="undeploy">
+ <param name="test.config" value="@{c}"/>
+ </antcall>
+ </sequential>
+ </for>
+ <antcall target="batch-reports"/>
+ </target>
+
+ <target name="batch-init" depends="declare-tasks">
+ <tstamp/>
+ <property name="result.dir" value="results_${DSTAMP}"/>
+ <mkdir dir="${temp.dir}"/>
+ <mkdir dir="${result.dir}"/>
+ </target>
+ <target name="clean">
+ <delete dir="${temp.dir}"/>
+ </target>
+
+ <target name="batch-config">
+ <fail unless="test.config">No name of test configuration given. Please specify one using -Dtest.config=<config>.</fail>
+ <available property="config.exists" file="${basedir}/${configs.dir}/${test.config}"/>
+ <fail unless="config.exists">Test config '${test.config}' does not exist.</fail>
+
+ <xmlproperty file="${configs.dir}/${test.config}/test_properties.xml"/>
+ <xmlproperty file="${configs.dir}/_default/test_properties.xml"/>
+
+ <filterset id="config.filter" begintoken="%" endtoken="%">
+ <filter token="test.web-xml.servlet-param.default-servlet" value="${test.web-xml.servlet-param.default-servlet}"/>
+ <filter token="test.web-xml.servlet-mapping" value="${test.web-xml.servlet-mapping}"/>
+ <filter token="test.web-xml.role-refs" value="${test.web-xml.role-refs}"/>
+ <filter token="test.web-xml.security-constraint" value="${test.web-xml.security-constraint}"/>
+ <filter token="test.domain-xml.store1" value="${test.domain-xml.store1}"/>
+ <filter token="test.domain-xml.store2" value="${test.domain-xml.store2}"/>
+ <filter token="test.domain-xml.configuration.sequential-mode" value="${test.domain-xml.configuration.sequential-mode}"/>
+ </filterset>
+ </target>
+
+ <target name="slide.war" depends="batch-init, batch-config"
+ description="Creates the slide.war adapted to the test config choosen.">
+
+ <copy todir="${temp.dir}/webapp" overwrite="true">
+ <fileset dir="${configs.dir}/_default/webapp" />
+ <filterset refid="config.filter"/>
+ </copy>
+
+ <war destfile="${temp.dir}/slide.war" update="true"
+ webxml="${temp.dir}/webapp/WEB-INF/web.xml">
+ <lib dir="${slide-dist.dir}/slide/lib">
+ <include name="*"/>
+ </lib>
+ <fileset dir="${configs.dir}/${test.config}">
+ <include name="lib/**/*"/>
+ </fileset>
+ <fileset dir="${temp.dir}/webapp">
+ <exclude name="**/web.xml"/>
+ </fileset>
+ </war>
+ </target>
+
+ <target name="deploy" depends="slide.war"
+ description="War's and deploys a Slide application.">
+ <deploy url="${test.server-protocol}://${test.server-name}:${test.server-port}${test.tomcat.manager-path}"
+ username="${test.tomcat.manager-user}"
+ password="${test.tomcat.manager-passwd}"
+ path="${test.server-path}"
+ war="${temp.dir}/slide.war"/>
+ </target>
+
+ <target name="undeploy" depends="declare-tasks, batch-config">
+ <undeploy url="${test.server-protocol}://${test.server-name}:${test.server-port}${test.tomcat.manager-path}"
+ username="${test.tomcat.manager-user}"
+ password="${test.tomcat.manager-passwd}"
+ path="${test.server-path}" />
+ </target>
+
+ <target name="batch-pkg" depends="batch-init, batch-config">
+ <fail unless="test.target">No test target given (please specify test.target property).</fail>
+
+ <ant target="${test.target}" inheritAll="false">
+ <propertyset id="test.properties">
+ <propertyref prefix="test"/>
+ </propertyset>
+ <property name="tp.props" value="${configs.dir}/_default/tp.properties"/>
+ <property name="tp.result" location="${result.dir}/${test.config}_${test.target}.xml"/>
+ <property name="tp.printProperties" value="true"/>
+ </ant>
+ <style in="${result.dir}/${test.config}_${test.target}.xml"
+ out="${result.dir}/_${test.config}_${test.target}_o.html" style="testsuite/junit/xsl/report1.xsl"
+ force="true" >
+ <param name="test.config" expression="${test.config}"/>
+ <param name="test.package" expression="${test.target}"/>
+ </style>
+ <style in="${result.dir}/${test.config}_${test.target}.xml"
+ out="${result.dir}/${test.config}_${test.target}.html" style="testsuite/junit/xsl/report2.xsl"
+ force="true">
+ <param name="root.directory" expression="${basedir}"/>
+ </style>
+ </target>
+ <target name="batch-reports" depends="batch-init">
+ <concat destfile="${result.dir}/_index.html">
+ <fileset dir="${result.dir}">
+ <include name="*_o.html"/>
+ </fileset>
+ </concat>
+ <concat destfile="${result.dir}/index.html">
+ <filelist dir="."
+ files="testsuite/junit/xsl/index_pre.txt, ${result.dir}/_index.html, testsuite/junit/xsl/index_post.txt"
+ />
+ </concat>
+ </target>
+
+ <target name="declare-tasks">
+ <!-- webdav tasks -->
+ <taskdef resource="org/apache/webdav/ant/taskdefs.properties">
+ <classpath>
+ <fileset dir="../webdavclient/dist/ant" >
+ <include name="*.jar" />
+ </fileset>
+ </classpath>
+ </taskdef>
+ <!-- tomcat tasks -->
+ <echo message="initializing tomcat tasks"/>
+ <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"/>
+ <taskdef name="install" classname="org.apache.catalina.ant.InstallTask"/>
+ <taskdef name="list" classname="org.apache.catalina.ant.ListTask"/>
+ <taskdef name="reload" classname="org.apache.catalina.ant.ReloadTask"/>
+ <taskdef name="remove" classname="org.apache.catalina.ant.RemoveTask"/>
+ <taskdef name="resources" classname="org.apache.catalina.ant.ResourcesTask"/>
+ <taskdef name="roles" classname="org.apache.catalina.ant.RolesTask"/>
+ <taskdef name="start" classname="org.apache.catalina.ant.StartTask"/>
+ <taskdef name="stop" classname="org.apache.catalina.ant.StopTask"/>
+ <taskdef name="undeploy" classname="org.apache.catalina.ant.UndeployTask"/>
+ <!-- contrib tasks -->
+ <echo message="initializing ant-contrib tasks"/>
+ <taskdef resource="net/sf/antcontrib/antcontrib.properties">
+ <classpath>
+ <pathelement location="${ant-contrib.jar}"/>
+ </classpath>
+ </taskdef>
+ </target>
+
+
</project>
1.1 jakarta-slide/testsuite/batchtest.properties.sample
Index: batchtest.properties.sample
===================================================================
# list of configurations that shall be tested
batch.test.configs=mem, txfile, txfile.bind, txfile.lucene, txfile.cache-off, mem
# test configurations and the test targets to be called
txfile=tp.functional, tp.deltav, tp.dasl
txfile.bind=tp.functional, tp.deltav, tp.dasl, tp.bind
txfile.lucene=tp.functional, tp.deltav, tp.dasl
txfile.cache-off=tp.functional, tp.deltav
txfile.fine-grain=tp.functional, tp.deltav, tp.dasl
mem=tp.functional
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org
java applet doesn't work into slide
Posted by Charli <ev...@terra.es>.
hello,
i'm using slide as a repository for html with embedded applets in it.
When i run the applet, it doesn't work and the java virtual machine
message is:
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPanel.paint(GrayBoxPanel.java:103)
at sun.plugin.util.GrayBoxPainter.paintGrayBox(GrayBoxPainter.java:545)
at
sun.plugin.util.GrayBoxPainter.repaintGrayBox(GrayBoxPainter.java:499)
at
sun.plugin.util.GrayBoxPainter.showLoadingError(GrayBoxPainter.java:149)
at sun.plugin.AppletViewer.showAppletStatus(AppletViewer.java:1801)
at sun.applet.AppletPanel.run(AppletPanel.java:444)
at java.lang.Thread.run(Thread.java:595)
Exception in thread "thread applet-MemTest1.class"
java.lang.NullPointerException
at sun.plugin.util.GrayBoxPanel.paint(GrayBoxPanel.java:103)
at sun.plugin.util.GrayBoxPainter.paintGrayBox(GrayBoxPainter.java:545)
at
sun.plugin.util.GrayBoxPainter.repaintGrayBox(GrayBoxPainter.java:499)
at
sun.plugin.util.GrayBoxPainter.showLoadingError(GrayBoxPainter.java:149)
at sun.plugin.AppletViewer.showAppletException(AppletViewer.java:1873)
at sun.applet.AppletPanel.run(AppletPanel.java:527)
at java.lang.Thread.run(Thread.java:595)
load: class MemTest1.class not found.
java.lang.ClassNotFoundException: MemTest1.class
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:167)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.applet.AppletClassLoader.loadClass(AppletClassLoader.java:118)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at sun.applet.AppletClassLoader.loadCode(AppletClassLoader.java:585)
at sun.applet.AppletPanel.createApplet(AppletPanel.java:710)
at sun.plugin.AppletViewer.createApplet(AppletViewer.java:1697)
at sun.applet.AppletPanel.runLoader(AppletPanel.java:639)
at sun.applet.AppletPanel.run(AppletPanel.java:319)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.io.IOException: open HTTP connection failed.
at sun.applet.AppletClassLoader.getBytes(AppletClassLoader.java:270)
at sun.applet.AppletClassLoader.access$100(AppletClassLoader.java:43)
at sun.applet.AppletClassLoader$1.run(AppletClassLoader.java:157)
at java.security.AccessController.doPrivileged(Native Method)
at sun.applet.AppletClassLoader.findClass(AppletClassLoader.java:154)
... 9 more
In the html file the code for this applet is:
<applet code="MemTest1.class" width="750" height="510"></applet>
In apache server works well, but under tomcat with slide crash ¿why?
Thanks a lot.
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-dev-help@jakarta.apache.org