Skip to main content

This CGIT instance is deprecated, and repositories have been moved to Gitlab or Github. See the repository descriptions for specific locations.

summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjeffliu2005-05-18 18:18:11 +0000
committerjeffliu2005-05-18 18:18:11 +0000
commit3a4e1e4b1f227e959da38a6174bf5c96defc0d6c (patch)
tree9a95edc2fc3ebc8efd65a48d48a5d944fcb17de9 /tests/org.eclipse.wst.wsdl.tests.performance
parentcd427288f7832a0f40791fb26792e9d3727bb1c5 (diff)
downloadwebtools.webservices-3a4e1e4b1f227e959da38a6174bf5c96defc0d6c.tar.gz
webtools.webservices-3a4e1e4b1f227e959da38a6174bf5c96defc0d6c.tar.xz
webtools.webservices-3a4e1e4b1f227e959da38a6174bf5c96defc0d6c.zip
[95813] Adding OAGIS WSDLs testcases to the build
Diffstat (limited to 'tests/org.eclipse.wst.wsdl.tests.performance')
-rw-r--r--tests/org.eclipse.wst.wsdl.tests.performance/.classpath7
-rw-r--r--tests/org.eclipse.wst.wsdl.tests.performance/.cvsignore3
-rw-r--r--tests/org.eclipse.wst.wsdl.tests.performance/performance/org/eclipse/wst/wsdl/tests/performance/ReadOAGISWSDLTestcase.java54
-rw-r--r--tests/org.eclipse.wst.wsdl.tests.performance/plugin.xml1
-rw-r--r--tests/org.eclipse.wst.wsdl.tests.performance/test.xml24
5 files changed, 87 insertions, 2 deletions
diff --git a/tests/org.eclipse.wst.wsdl.tests.performance/.classpath b/tests/org.eclipse.wst.wsdl.tests.performance/.classpath
new file mode 100644
index 000000000..9742e41a1
--- /dev/null
+++ b/tests/org.eclipse.wst.wsdl.tests.performance/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="performance"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/org.eclipse.wst.wsdl.tests.performance/.cvsignore b/tests/org.eclipse.wst.wsdl.tests.performance/.cvsignore
new file mode 100644
index 000000000..243b3b858
--- /dev/null
+++ b/tests/org.eclipse.wst.wsdl.tests.performance/.cvsignore
@@ -0,0 +1,3 @@
+bin
+build.xml
+
diff --git a/tests/org.eclipse.wst.wsdl.tests.performance/performance/org/eclipse/wst/wsdl/tests/performance/ReadOAGISWSDLTestcase.java b/tests/org.eclipse.wst.wsdl.tests.performance/performance/org/eclipse/wst/wsdl/tests/performance/ReadOAGISWSDLTestcase.java
new file mode 100644
index 000000000..bcc0ebf91
--- /dev/null
+++ b/tests/org.eclipse.wst.wsdl.tests.performance/performance/org/eclipse/wst/wsdl/tests/performance/ReadOAGISWSDLTestcase.java
@@ -0,0 +1,54 @@
+package org.eclipse.wst.wsdl.tests.performance;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.net.MalformedURLException;
+import java.util.ArrayList;
+import java.util.List;
+import javax.wsdl.WSDLException;
+import junit.framework.Assert;
+import org.eclipse.test.performance.Dimension;
+import org.eclipse.test.performance.PerformanceTestCase;
+import org.eclipse.wst.wsdl.internal.impl.wsdl4j.WSDLReaderImpl;
+
+public class ReadOAGISWSDLTestcase extends PerformanceTestCase
+{
+ private List defs = new ArrayList();
+
+ public void testReadWSDL() throws MalformedURLException, WSDLException
+ {
+ String oagis80Dir = System.getProperty("oagis80Dir");
+ Assert.assertNotNull(oagis80Dir);
+ if (!oagis80Dir.endsWith("/") && !oagis80Dir.endsWith("\\"))
+ oagis80Dir = oagis80Dir + "/";
+ File dir = new File(oagis80Dir + "OAGIS8.0/ws/wsdl");
+ if (dir.exists() && dir.isDirectory())
+ {
+ File[] wsdls = dir.listFiles
+ (
+ new FileFilter()
+ {
+ public boolean accept(File pathname)
+ {
+ return pathname.getName().endsWith(".wsdl");
+ }
+ }
+ );
+ tagAsSummary("Read WSDL", new Dimension[] {Dimension.ELAPSED_PROCESS, Dimension.WORKING_SET});
+ startMeasuring();
+ for (int i = 0; i < wsdls.length; i++)
+ readWSDL(wsdls[i].toURL().toString());
+ stopMeasuring();
+ commitMeasurements();
+ assertPerformance();
+ }
+ else
+ fail(dir.toString());
+ }
+
+ private void readWSDL(String location) throws WSDLException
+ {
+ WSDLReaderImpl reader = new WSDLReaderImpl();
+ defs.add(reader.readWSDL(location));
+ }
+} \ No newline at end of file
diff --git a/tests/org.eclipse.wst.wsdl.tests.performance/plugin.xml b/tests/org.eclipse.wst.wsdl.tests.performance/plugin.xml
index ec3dd74fd..7673a079e 100644
--- a/tests/org.eclipse.wst.wsdl.tests.performance/plugin.xml
+++ b/tests/org.eclipse.wst.wsdl.tests.performance/plugin.xml
@@ -21,6 +21,7 @@
<import plugin="org.eclipse.ui.ide"/>
<import plugin="org.eclipse.test.performance"/>
<import plugin="org.eclipse.wst.wsdl"/>
+ <import plugin="org.wsdl4j"/>
</requires>
</plugin>
diff --git a/tests/org.eclipse.wst.wsdl.tests.performance/test.xml b/tests/org.eclipse.wst.wsdl.tests.performance/test.xml
index ea03944eb..3a781b62e 100644
--- a/tests/org.eclipse.wst.wsdl.tests.performance/test.xml
+++ b/tests/org.eclipse.wst.wsdl.tests.performance/test.xml
@@ -7,8 +7,9 @@
<!-- sets the properties eclipse-home, and library-file -->
<property name="plugin-name" value="org.eclipse.wst.wsdl.tests.performance"/>
- <property name="library-file"
- value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
+ <property name="library-file" value="${eclipse-home}/plugins/org.eclipse.test_3.1.0/library.xml"/>
+ <property name="perf-tests-file" value="${testDir}/performance-tests.xml"/>
+ <property name="extraVMargs" value="-Doagis80Dir=${testDir} -Xmx256M"/>
<property name="workspace" value="${eclipse-home}/workspace_wsdl_performance"/>
@@ -25,6 +26,15 @@
<!-- This target defines the performance tests that need to be run. -->
<target name="performance_suite">
+ <antcall target="readOAGISWSDLTestcase"/>
+ <antcall target="readOAGISWSDLTestcase"/>
+ <antcall target="readOAGISWSDLTestcase"/>
+ <antcall target="readOAGISWSDLTestcase"/>
+ <antcall target="readOAGISWSDLTestcase"/>
+ <antcall target="readOAGISWSDLTestcase"/>
+ <antcall target="readOAGISWSDLTestcase"/>
+ <antcall target="readOAGISWSDLTestcase"/>
+
<delete dir="${workspace}" quiet="true"/>
<ant target="core-test" antfile="${library-file}" dir="${eclipse-home}">
<property name="data-dir" value="${workspace}"/>
@@ -46,6 +56,16 @@
</target>
+ <target name="readOAGISWSDLTestcase">
+ <delete dir="${workspace}" quiet="true"/>
+ <ant target="core-test" antfile="${perf-tests-file}" dir="${eclipse-home}">
+ <property name="data-dir" value="${workspace}"/>
+ <property name="plugin-name" value="${plugin-name}"/>
+ <property name="classname" value="org.eclipse.wst.wsdl.tests.performance.ReadOAGISWSDLTestcase"/>
+ <property name="extraVMargs" value="${extraVMargs}"/>
+ </ant>
+ </target>
+
<!-- This target holds code to cleanup the testing environment after -->
<!-- after all of the tests have been run. You can use this target to -->
<!-- delete temporary files that have been created. -->

Back to the top