Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornitind2006-04-18 04:48:28 -0400
committernitind2006-04-18 04:48:28 -0400
commite49f98a7dee5a7c13e7fd5cf1fffdb0588e450fb (patch)
treec2bff854a27fb3b35ca838f12a036591c867df78 /development
parent311d7f6c4ed0fa1deb75a0bdd6344a04de6a47c9 (diff)
downloadwebtools.sourceediting-e49f98a7dee5a7c13e7fd5cf1fffdb0588e450fb.tar.gz
webtools.sourceediting-e49f98a7dee5a7c13e7fd5cf1fffdb0588e450fb.tar.xz
webtools.sourceediting-e49f98a7dee5a7c13e7fd5cf1fffdb0588e450fb.zip
add local-only additional tests automatically
Diffstat (limited to 'development')
-rw-r--r--development/org.eclipse.wst.sse.unittests/plugin.properties6
-rw-r--r--development/org.eclipse.wst.sse.unittests/plugin.xml5
-rw-r--r--development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java50
3 files changed, 47 insertions, 14 deletions
diff --git a/development/org.eclipse.wst.sse.unittests/plugin.properties b/development/org.eclipse.wst.sse.unittests/plugin.properties
index 47e0b23af..8c4370bf3 100644
--- a/development/org.eclipse.wst.sse.unittests/plugin.properties
+++ b/development/org.eclipse.wst.sse.unittests/plugin.properties
@@ -1,5 +1,5 @@
###############################################################################
-# Copyright (c) 2001, 2004 IBM Corporation and others.
+# Copyright (c) 2001, 2006 IBM Corporation and others.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
@@ -12,6 +12,6 @@
XML_Source_Page_Editor.name=XML Source Page Editor
JavaScript_Source_Page_Editor.name=JavaScript Source Page Editor
-
Bundle-Vendor.0 = Eclipse.org
-Bundle-Name.0 = Unittests \ No newline at end of file
+Bundle-Name.0 = Unit Tests
+additionalTests=Additional TestCases and TestSuites \ No newline at end of file
diff --git a/development/org.eclipse.wst.sse.unittests/plugin.xml b/development/org.eclipse.wst.sse.unittests/plugin.xml
index c8699060a..9b9ee1994 100644
--- a/development/org.eclipse.wst.sse.unittests/plugin.xml
+++ b/development/org.eclipse.wst.sse.unittests/plugin.xml
@@ -28,4 +28,7 @@
contentTypeId="org.eclipse.wst.javascript.core.javascriptsource" />
</editor>
</extension>
-</plugin> \ No newline at end of file
+
+ <extension-point id="additionalTests" name="%additionalTests"/>
+
+</plugin>
diff --git a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java
index a2ea5b3fa..dfd430149 100644
--- a/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java
+++ b/development/org.eclipse.wst.sse.unittests/src/org/eclipse/wst/sse/unittests/MasterListTestSuite.java
@@ -12,8 +12,12 @@
package org.eclipse.wst.sse.unittests;
+import junit.framework.Test;
import junit.framework.TestSuite;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.jst.jsp.core.tests.JSPCoreTestSuite;
import org.eclipse.jst.jsp.tests.encoding.JSPEncodingTestSuite;
import org.eclipse.jst.jsp.ui.tests.JSPUITestSuite;
@@ -33,10 +37,12 @@ import org.eclipse.wst.xml.validation.tests.internal.AllXMLTests;
import org.eclipse.wst.xsd.validation.tests.internal.AllXSDTests;
/*****************************************************************************
- * Copyright (c) 2004 IBM Corporation and others. All rights reserved. This
- * program and the accompanying materials are made available under the terms
- * of the Eclipse Public License v1.0 which accompanies this distribution, and
- * is available at http://www.eclipse.org/legal/epl-v10.html
+ * Copyright (c) 2004,2006 IBM Corporation and others.
+ *
+ * All rights reserved. This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License v1.0 which
+ * accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
*
* Contributors: IBM Corporation - initial API and implementation
*
@@ -46,7 +52,7 @@ public class MasterListTestSuite extends TestSuite {
public MasterListTestSuite() {
super("All Tests");
-
+
System.setProperty("wtp.autotest.noninteractive", "true");
addTest(SSEModelTestSuite.suite());
@@ -56,7 +62,7 @@ public class MasterListTestSuite extends TestSuite {
addTest(JSPCoreTestSuite.suite());
addTest(AllXMLTests.suite());
-
+
addTest(EncodingTestSuite.suite());
addTest(CSSEncodingTestSuite.suite());
addTest(HTMLEncodingTestSuite.suite());
@@ -68,16 +74,40 @@ public class MasterListTestSuite extends TestSuite {
addTest(XMLUITestSuite.suite());
addTest(DTDUITestSuite.suite());
addTest(JSPUITestSuite.suite());
-
+
addTest(AllXSDTests.suite());
- //addTest(RegressionBucket.suite());
- //addTest(AllTestCases.suite());
+ // addTest(RegressionBucket.suite());
+ // addTest(AllTestCases.suite());
+
+ IConfigurationElement[] elements = Platform.getExtensionRegistry().getConfigurationElementsFor("org.eclipse.wst.sse.unittests.additionalSuites");
+ for (int i = 0; i < elements.length; i++) {
+ if (elements[i].getName().equals("suite")) {
+ TestSuite suite;
+ try {
+ suite = (TestSuite) elements[i].createExecutableExtension("class");
+ addTest(suite);
+ }
+ catch (CoreException e) {
+ Platform.getLog(Platform.getBundle("org.eclipse.wst.sse.unittests")).log(e.getStatus());
+ }
+ }
+ else if (elements[i].getName().equals("test")) {
+ Test test;
+ try {
+ test = (Test) elements[i].createExecutableExtension("class");
+ addTest(new TestSuite(test.getClass()));
+ }
+ catch (CoreException e) {
+ Platform.getLog(Platform.getBundle("org.eclipse.wst.sse.unittests")).log(e.getStatus());
+ }
+ }
+ }
}
public void testAll() {
// this method needs to exist, but doesn't really do anything
// other than to signal to create an instance of this class.
- // The rest it automatic from the tests added in constructor.
+ // The rest it automatic from the tests added in constructor.
}
}

Back to the top