You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by js...@apache.org on 2004/11/20 00:28:13 UTC
svn commit: r105896 - in incubator/beehive/trunk: . controls/test controls/test/infra/milton controls/test/tools/milton controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/common controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit
Author: jsong
Date: Fri Nov 19 15:28:11 2004
New Revision: 105896
Added:
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/ReportTestCase.java (contents, props changed)
Modified:
incubator/beehive/trunk/beehive.properties
incubator/beehive/trunk/controls/test/build.xml
incubator/beehive/trunk/controls/test/infra/milton/milton.jar
incubator/beehive/trunk/controls/test/tools/milton/build.xml
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/common/Report.java
incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/HtmlReportTestCase.java
Log:
Submit Zach's changes on milton to support testing JWS.
Modified: incubator/beehive/trunk/beehive.properties
==============================================================================
--- incubator/beehive/trunk/beehive.properties (original)
+++ incubator/beehive/trunk/beehive.properties Fri Nov 19 15:28:11 2004
@@ -11,6 +11,7 @@
beehive.user.dir=${beehive.dir}/user
beehive.test.dir=${beehive.dir}/test
beehive.external.dir=${beehive.dir}/external
+beehive.wsm.external.dir=${beehive.dir}/wsm/external
beehive.installed.dir=${beehive.dir}/installed
controls.jar=${beehive.dir}/controls/build/jars/controls.jar
@@ -23,6 +24,14 @@
tools.jar=${os.JAVA_HOME}/lib/tools.jar
log4j.dir=${beehive.installed.dir}/jakarta-log4j-1.2.8
+
+### axis cliens need the following jars available
+axis.jar=${beehive.wsm.external.dir}/axis.jar
+jaxrpc.jar=${beehive.wsm.external.dir}/jaxrpc.jar
+saaj.jar=${beehive.wsm.external.dir}/saaj.jar
+wsdl4j.jar=${beehive.wsm.external.dir}/wsdl4j.jar
+commons-logging.jar=${beehive.wsm.external.dir}/commons-logging.jar
+commons-discovery.jar=${beehive.wsm.external.dir}/commons-discovery.jar
#
# While still in the Workshop source tree, these reference
Modified: incubator/beehive/trunk/controls/test/build.xml
==============================================================================
--- incubator/beehive/trunk/controls/test/build.xml (original)
+++ incubator/beehive/trunk/controls/test/build.xml Fri Nov 19 15:28:11 2004
@@ -94,6 +94,14 @@
<pathelement location="${httpunit.jar}"/>
<pathelement location="${httpunit-xerces.jar}"/>
<pathelement location="${nekohtml.jar}"/>
+
+ <!-- the following are needed for axis clients -->
+ <pathelement location="${axis.jar}"/>
+ <pathelement location="${jaxrpc.jar}"/>
+ <pathelement location="${saaj.jar}"/>
+ <pathelement location="${wsdl4j.jar}"/>
+ <pathelement location="${commons-logging.jar}"/>
+ <pathelement location="${commons-discovery.jar}"/>
</path>
Modified: incubator/beehive/trunk/controls/test/infra/milton/milton.jar
==============================================================================
Binary files. No diff available.
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 Fri Nov 19 15:28:11 2004
@@ -6,11 +6,14 @@
<property name="src.dir" value="${basedir}/src"/>
<property name="build.dir" value="${basedir}/build"/>
+ <property file="${os.BEEHIVE_HOME}/beehive.properties"/>
<property file="../../common/path.properties"/>
<path id="milton.build.classpath">
<pathelement location="${junit.jar}"/>
<pathelement location="${httpunit.jar}"/>
+ <pathelement location="${axis.jar}"/>
+ <pathelement location="${jaxrpc.jar}"/>
</path>
<target name="usage">
Modified: incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/common/Report.java
==============================================================================
--- incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/common/Report.java (original)
+++ incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/common/Report.java Fri Nov 19 15:28:11 2004
@@ -122,4 +122,26 @@
{
this.exceptionStack = es;
}
+
+ public String toString()
+ {
+ String returnVal;
+ String l_msg = getMessage();
+ String l_exp = getExceptionStack();
+
+ // Status
+ returnVal = "[STATUS]\n\t" + getStatus() + "\n\n";
+
+ // Messages
+ if ("".equals(l_msg))
+ l_msg = "...No Messages found in this Report...";
+ returnVal += "[MESSAGES]\n\t" + l_msg + "\n\n";
+
+ // Exception Stack
+ if ("".equals(l_exp))
+ l_exp = "...No Exception Stack found in this Report...";
+ returnVal += "[EXCEPTIONSTACK]\n\t" + l_exp + "\n\n";
+
+ return returnVal;
+ }
}
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 Fri Nov 19 15:28:11 2004
@@ -1,7 +1,5 @@
package org.apache.beehive.test.tools.milton.junit;
-import junit.framework.TestCase;
-
import com.meterware.httpunit.WebLink;
import com.meterware.httpunit.WebResponse;
import com.meterware.httpunit.WebRequest;
@@ -9,57 +7,17 @@
import com.meterware.httpunit.TableCell;
import com.meterware.httpunit.WebConversation;
+import org.apache.beehive.test.tools.milton.junit.ReportTestCase;
import org.apache.beehive.test.tools.milton.junit.AbortTestException;
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;
-public abstract class HtmlReportTestCase extends TestCase
+public abstract class HtmlReportTestCase extends ReportTestCase
{
- private static final String HTTP_PREFIX = "http://";
- private static final String HTTPS_PREFIX = "https://";
-
- private String urlPrefix = null;
-
public HtmlReportTestCase(String name)
{
super(name);
-
- String hostName = TestContext.getProperty("TEST_HOSTNAME");
- String hostNamePort = TestContext.getProperty("TEST_HOSTNAME_PORT");
-
- if (null == hostName || hostName.equals("")) {
- hostName = TestContext.getProperty("HOSTNAME");
- if (null == hostName || hostName.equals(""))
- hostName = "localhost";
- }
-
- if (null != hostNamePort)
- hostName += ":" + hostNamePort;
-
- this.urlPrefix = HTTP_PREFIX + hostName;
- }
-
- public String getUrlPrefix()
- {
- return this.urlPrefix;
- }
-
- public void setUrlPrefix(String p_urlPrefix)
- {
- if (null == p_urlPrefix)
- throw new IllegalArgumentException("Cannot set null URI PRefix");
-
- if (! p_urlPrefix.startsWith(HTTP_PREFIX) ||
- ! p_urlPrefix.startsWith(HTTPS_PREFIX)) {
- throw new IllegalArgumentException("URL Prefix must have a valid " +
- "protocol: " + HTTP_PREFIX +
- " or " + HTTPS_PREFIX + ": " +
- p_urlPrefix);
- }
-
- this.urlPrefix = p_urlPrefix;
}
public void assertReport(String p_url)
Added: incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/ReportTestCase.java
==============================================================================
--- (empty file)
+++ incubator/beehive/trunk/controls/test/tools/milton/src/org/apache/beehive/test/tools/milton/junit/ReportTestCase.java Fri Nov 19 15:28:11 2004
@@ -0,0 +1,53 @@
+package org.apache.beehive.test.tools.milton.junit;
+
+import junit.framework.TestCase;
+
+import org.apache.beehive.test.tools.milton.client.TestContext;
+
+public abstract class ReportTestCase extends TestCase
+{
+ protected static final String HTTP_PREFIX = "http://";
+ protected static final String HTTPS_PREFIX = "https://";
+
+ private String urlPrefix = null;
+
+ public ReportTestCase(String name)
+ {
+ super(name);
+
+ String hostName = TestContext.getProperty("TEST_HOSTNAME");
+ String hostNamePort = TestContext.getProperty("TEST_HOSTNAME_PORT");
+
+ if (null == hostName || hostName.equals("")) {
+ hostName = TestContext.getProperty("HOSTNAME");
+ if (null == hostName || hostName.equals(""))
+ hostName = "localhost";
+ }
+
+ if (null != hostNamePort)
+ hostName += ":" + hostNamePort;
+
+ this.urlPrefix = HTTP_PREFIX + hostName;
+ }
+
+ public String getUrlPrefix()
+ {
+ return this.urlPrefix;
+ }
+
+ public void setUrlPrefix(String p_urlPrefix)
+ {
+ if (null == p_urlPrefix)
+ throw new IllegalArgumentException("Cannot set null URI PRefix");
+
+ if (! p_urlPrefix.startsWith(HTTP_PREFIX) ||
+ ! p_urlPrefix.startsWith(HTTPS_PREFIX)) {
+ throw new IllegalArgumentException("URL Prefix must have a valid " +
+ "protocol: " + HTTP_PREFIX +
+ " or " + HTTPS_PREFIX + ": " +
+ p_urlPrefix);
+ }
+
+ this.urlPrefix = p_urlPrefix;
+ }
+}