Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: b31194349c6cfbf66a735dd4afd33dbab8cf2bd9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
/*****************************************************************************
 * 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
 * 
 ****************************************************************************/

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;
import org.eclipse.wst.css.core.tests.CSSCoreTestSuite;
import org.eclipse.wst.css.tests.encoding.CSSEncodingTestSuite;
import org.eclipse.wst.css.ui.tests.CSSUITestSuite;
import org.eclipse.wst.dtd.ui.tests.DTDUITestSuite;
import org.eclipse.wst.html.core.tests.HTMLCoreTestSuite;
import org.eclipse.wst.html.tests.encoding.HTMLEncodingTestSuite;
import org.eclipse.wst.html.ui.tests.HTMLUITestSuite;
import org.eclipse.wst.sse.core.tests.SSEModelTestSuite;
import org.eclipse.wst.sse.ui.tests.SSEUITestSuite;
import org.eclipse.wst.xml.core.tests.SSEModelXMLTestSuite;
import org.eclipse.wst.xml.tests.encoding.EncodingTestSuite;
import org.eclipse.wst.xml.ui.tests.XMLUITestSuite;
import org.eclipse.wst.xml.validation.tests.internal.AllXMLTests;
import org.eclipse.wst.xsd.validation.tests.internal.AllXSDTests;

public class MasterListTestSuite extends TestSuite {

	public MasterListTestSuite() {
		super("All Tests");

		System.setProperty("wtp.autotest.noninteractive", "true");

		addTest(SSEModelTestSuite.suite());
		addTest(SSEModelXMLTestSuite.suite());
		addTest(CSSCoreTestSuite.suite());
		addTest(HTMLCoreTestSuite.suite());
		addTest(JSPCoreTestSuite.suite());

		addTest(AllXMLTests.suite());

		addTest(EncodingTestSuite.suite());
		addTest(CSSEncodingTestSuite.suite());
		addTest(HTMLEncodingTestSuite.suite());
		addTest(JSPEncodingTestSuite.suite());

		addTest(CSSUITestSuite.suite());
		addTest(HTMLUITestSuite.suite());
		addTest(SSEUITestSuite.suite());
		addTest(XMLUITestSuite.suite());
		addTest(DTDUITestSuite.suite());
		addTest(JSPUITestSuite.suite());

		addTest(AllXSDTests.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.
	}
}

Back to the top