Author: jsong
Date: Tue Aug 17 14:41:51 2004
New Revision: 36542
Added:
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/FailTestError.java
Removed:
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/FailTestException.java
Modified:
incubator/beehive/trunk/controls/test/common/path.properties
incubator/beehive/trunk/controls/test/tools/milton/build.xml
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/HtmlReportTestCase.java
Log:
* Changing Milton Failure from RuntimeException to Error so it is reported
correctly in JUnit
* Adding JUnit.jar to path.properties for milton build and removing ^Ms
Modified: incubator/beehive/trunk/controls/test/common/path.properties
==============================================================================
--- incubator/beehive/trunk/controls/test/common/path.properties
(original)
+++ incubator/beehive/trunk/controls/test/common/path.properties Tue Aug
17 14:41:51 2004
@@ -1,34 +1,35 @@
-#need to do <property environment="os"/> before loading this property file
-
-
-#directories
-beehive.home=${os.BEEHIVE_HOME}
-controls.dir=${beehive.home}/controls
-controls.test.dir=${controls.dir}/test
-controls.test.infra.dir=${controls.test.dir}/infra
-
-external.dir=${beehive.home}/external
-
-
-#locations of built tools
-tch.home=${controls.test.infra.dir}/tch
-tch.jar=${tch.home}/tchx.jar
-tch.schema.jar=${tch.home}/schema.jar
-tch.xbean.jar=${tch.home}/xbean-1.0.2.jar
-
-milton.jar=${controls.test.infra.dir}/milton/milton.jar
-
-crimson.jar=${external.dir}/crimson/crimson-1.1.jar
-jakarta.jar=${external.dir}/jakarta/jakarta-regexp-1.2.jar
-jaxp.jar=${external.dir}/jaxp/jaxp.jar
-xerces.jar=${external.dir}/xerces/xerces-1.4.4.jar
-xbean.jar=${external.dir}/xmlbeans/apache-xbeans.jar
-httpunit.jar=${external.dir}/httpunit/httpunit.jar
-
-#properties for mantis
-mantis.home=${controls.test.infra.dir}/mantis
-mantis.jar=${mantis.home}/mantis.jar
-tchschema.jar=${mantis.home}/tchschema.jar
-mantis.tools.jar=${os.JAVA_HOME}/lib/tools.jar
-mantis.xbean.jar=${mantis.home}/xbean-1.0.2.jar
+#need to do <property environment="os"/> before loading this property file
+
+
+#directories
+beehive.home=${os.BEEHIVE_HOME}
+controls.dir=${beehive.home}/controls
+controls.test.dir=${controls.dir}/test
+controls.test.infra.dir=${controls.test.dir}/infra
+
+external.dir=${beehive.home}/external
+
+
+#locations of built tools
+tch.home=${controls.test.infra.dir}/tch
+tch.jar=${tch.home}/tchx.jar
+tch.schema.jar=${tch.home}/schema.jar
+tch.xbean.jar=${tch.home}/xbean-1.0.2.jar
+
+milton.jar=${controls.test.infra.dir}/milton/milton.jar
+
+crimson.jar=${external.dir}/crimson/crimson-1.1.jar
+jakarta.jar=${external.dir}/jakarta/jakarta-regexp-1.2.jar
+jaxp.jar=${external.dir}/jaxp/jaxp.jar
+xerces.jar=${external.dir}/xerces/xerces-1.4.4.jar
+xbean.jar=${external.dir}/xmlbeans/apache-xbeans.jar
+httpunit.jar=${external.dir}/httpunit/httpunit.jar
+junit.jar=${external.dir}/junit/junit.jar
+
+#properties for mantis
+mantis.home=${controls.test.infra.dir}/mantis
+mantis.jar=${mantis.home}/mantis.jar
+tchschema.jar=${mantis.home}/tchschema.jar
+mantis.tools.jar=${os.JAVA_HOME}/lib/tools.jar
+mantis.xbean.jar=${mantis.home}/xbean-1.0.2.jar
mantis.config=${mantis.home}/mantis.properties
Modified: incubator/beehive/trunk/controls/test/tools/milton/build.xml
==============================================================================
--- incubator/beehive/trunk/controls/test/tools/milton/build.xml
(original)
+++ incubator/beehive/trunk/controls/test/tools/milton/build.xml Tue Aug
17 14:41:51 2004
@@ -1,14 +1,12 @@
<project name="beehive-tools-milton" default="deploy" basedir=".">
- <property environment="env"/>
+ <property environment="os"/>
<property name="src.dir" value="${basedir}/src"/>
<property name="build.dir" value="${basedir}/build"/>
- <property name="milton.jar" value="milton.jar"/>
- <property name="junit.jar" location="../../../../external/junit/junit.jar"/>
- <property name="httpunit.jar"
location="../../../../external/httpunit/httpunit.jar"/>
+ <property file="../../common/path.properties"/>
<path id="milton.build.classpath">
<pathelement location="${junit.jar}"/>
@@ -17,13 +15,13 @@
<target name="usage">
<echo>
-deploy builds milton.jar
+deploy builds milton.jar and copies to testinfra directory
clean deletes milton build artifacts
redeploy rebuilds milton.jar
</echo>
</target>
- <target name="redeploy" depends="clean,deploy"/>
+ <target name="redeploy" depends="clean_all,deploy"/>
<!-- ========================= -->
<!-- builds milton and packages it into a jar -->
@@ -45,6 +43,9 @@
<!-- ========================= -->
<target name="clean">
<delete dir="${build.dir}"/>
+ </target>
+
+ <target name="clean_all" depends="clean">
<delete file="${milton.jar}"/>
</target>
Added:
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/FailTestError.java
==============================================================================
--- (empty file)
+++
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/FailTestError.java
Tue Aug 17 14:41:51 2004
@@ -0,0 +1,12 @@
+package org.apache.beehive.test.tools.milton.junit;
+
+public class FailTestError extends junit.framework.AssertionFailedError
+{
+ public FailTestError() {
+ super();
+ }
+
+ public FailTestError(String msg) {
+ super(msg);
+ }
+}
Modified:
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/HtmlReportTestCase.java
==============================================================================
---
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/HtmlReportTestCase.java
(original)
+++
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/HtmlReportTestCase.java
Tue Aug 17 14:41:51 2004
@@ -10,7 +10,7 @@
import com.meterware.httpunit.WebConversation;
import org.apache.beehive.test.tools.milton.junit.AbortTestException;
-import org.apache.beehive.test.tools.milton.junit.FailTestException;
+import org.apache.beehive.test.tools.milton.junit.FailTestError;
import org.apache.beehive.test.tools.milton.client.TestContext;
import org.apache.beehive.test.tools.milton.common.Report;
@@ -174,8 +174,8 @@
throw new AbortTestException("Abort Status Detected: \n" +
p_wr.getText());
else if (status.equals(Report.FAIL))
- throw new FailTestException("Failure Status Detected: \n" +
- p_wr.getText());
+ throw new FailTestError("Failure Status Detected: \n" +
+ p_wr.getText());
else
throw new AbortTestException("Invalid Status Was Found: \n" +
p_wr.getText());