001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one
003: * or more contributor license agreements. See the NOTICE file
004: * distributed with this work for additional information
005: * regarding copyright ownership. The ASF licenses this file
006: * to you under the Apache License, Version 2.0 (the
007: * "License"); you may not use this file except in compliance
008: * with the License. You may obtain a copy of the License at
009: *
010: * http://www.apache.org/licenses/LICENSE-2.0
011: *
012: * Unless required by applicable law or agreed to in writing,
013: * software distributed under the License is distributed on an
014: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015: * KIND, either express or implied. See the License for the
016: * specific language governing permissions and limitations
017: * under the License.
018: */
019: package org.apache.axis2.jaxws.framework;
020:
021: import junit.extensions.TestSetup;
022: import junit.framework.Test;
023: import junit.framework.TestCase;
024: import junit.framework.TestSuite;
025:
026: import org.apache.axis2.jaxws.anytype.tests.AnyTypeTests;
027: import org.apache.axis2.jaxws.attachments.MTOMSerializationTests;
028: import org.apache.axis2.jaxws.client.ClientConfigTests;
029: import org.apache.axis2.jaxws.client.DispatchSoapActionTests;
030: import org.apache.axis2.jaxws.client.PropertyValueTests;
031: import org.apache.axis2.jaxws.client.ProxySoapActionTests;
032: import org.apache.axis2.jaxws.core.MessageContextTests;
033: import org.apache.axis2.jaxws.databinding.BindingToProtocolTests;
034: import org.apache.axis2.jaxws.description.AnnotationDescriptionTests;
035: import org.apache.axis2.jaxws.description.GetDescFromBindingProviderTests;
036: import org.apache.axis2.jaxws.description.PortSelectionTests;
037: import org.apache.axis2.jaxws.description.ServiceTests;
038: import org.apache.axis2.jaxws.description.WSDLDescriptionTests;
039: import org.apache.axis2.jaxws.description.WSDLTests;
040: import org.apache.axis2.jaxws.dispatch.DispatchTestSuite;
041: import org.apache.axis2.jaxws.dispatch.SOAP12Dispatch;
042: import org.apache.axis2.jaxws.endpoint.BasicEndpointTests;
043: import org.apache.axis2.jaxws.exception.ExceptionFactoryTests;
044: import org.apache.axis2.jaxws.handler.HandlerChainProcessorTests;
045: import org.apache.axis2.jaxws.handler.context.CompositeMessageContextTests;
046: import org.apache.axis2.jaxws.handler.context.LogicalMessageContextTests;
047: import org.apache.axis2.jaxws.i18n.JaxwsMessageBundleTests;
048: import org.apache.axis2.jaxws.injection.ResourceInjectionTests;
049: import org.apache.axis2.jaxws.lifecycle.EndpointLifecycleTests;
050: import org.apache.axis2.jaxws.message.BlockTests;
051: import org.apache.axis2.jaxws.message.FaultTests;
052: import org.apache.axis2.jaxws.message.MessageTests;
053: import org.apache.axis2.jaxws.message.SAAJConverterTests;
054: import org.apache.axis2.jaxws.message.SOAP12Tests;
055: import org.apache.axis2.jaxws.misc.JAXBContextTest;
056: import org.apache.axis2.jaxws.misc.NS2PkgTest;
057: import org.apache.axis2.jaxws.nonanonymous.complextype.NonAnonymousComplexTypeTests;
058: import org.apache.axis2.jaxws.polymorphic.shape.tests.PolymorphicTests;
059: import org.apache.axis2.jaxws.provider.JAXBProviderTests;
060: import org.apache.axis2.jaxws.provider.SOAPFaultProviderTests;
061: import org.apache.axis2.jaxws.provider.SoapMessageProviderTests;
062: import org.apache.axis2.jaxws.provider.SoapMessageMUProviderTests;
063: import org.apache.axis2.jaxws.provider.SourceMessageProviderTests;
064: import org.apache.axis2.jaxws.provider.SourceProviderTests;
065: import org.apache.axis2.jaxws.provider.StringMessageProviderTests;
066: import org.apache.axis2.jaxws.provider.StringProviderTests;
067: import org.apache.axis2.jaxws.proxy.GorillaDLWProxyTests;
068: import org.apache.axis2.jaxws.proxy.ProxyNonWrappedTests;
069: import org.apache.axis2.jaxws.proxy.ProxyTests;
070: import org.apache.axis2.jaxws.proxy.RPCLitSWAProxyTests;
071: import org.apache.axis2.jaxws.proxy.RPCProxyTests;
072: import org.apache.axis2.jaxws.proxy.SOAP12ProxyTests;
073: import org.apache.axis2.jaxws.rpclit.enumtype.tests.RPCLitEnumTests;
074: import org.apache.axis2.jaxws.rpclit.stringarray.tests.RPCLitStringArrayTests;
075: import org.apache.axis2.jaxws.sample.AddNumbersHandlerTests;
076: import org.apache.axis2.jaxws.sample.AddNumbersTests;
077: import org.apache.axis2.jaxws.sample.AddressBookTests;
078: import org.apache.axis2.jaxws.sample.BareTests;
079: import org.apache.axis2.jaxws.sample.DLWMinTests;
080: import org.apache.axis2.jaxws.sample.DocLitBareMinTests;
081: import org.apache.axis2.jaxws.sample.FaultsServiceTests;
082: import org.apache.axis2.jaxws.sample.FaultyWebServiceTests;
083: import org.apache.axis2.jaxws.sample.MtomSampleByteArrayTests;
084: import org.apache.axis2.jaxws.sample.MtomSampleTests;
085: import org.apache.axis2.jaxws.sample.NonWrapTests;
086: import org.apache.axis2.jaxws.sample.StringListTests;
087: import org.apache.axis2.jaxws.sample.WSGenTests;
088: import org.apache.axis2.jaxws.sample.WrapTests;
089: import org.apache.axis2.jaxws.security.BasicAuthSecurityTests;
090: import org.apache.axis2.jaxws.spi.BindingProviderTests;
091: import org.apache.axis2.jaxws.wsdl.schemareader.SchemaReaderTests;
092: import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.datasource.DispatchXMessageDataSource;
093: import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.jaxb.DispatchXPayloadJAXB;
094: import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.source.DispatchXMessageSource;
095: import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.source.DispatchXPayloadSource;
096: import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.string.DispatchXMessageString;
097: import org.apache.axis2.jaxws.xmlhttp.clientTests.dispatch.string.DispatchXPayloadString;
098: import org.apache.axis2.jaxws.TestLogger;
099: import org.apache.log4j.BasicConfigurator;
100:
101: public class JAXWSTest extends TestCase {
102:
103: static {
104: // Note you will probably need to increase the java heap size, for example
105: // -Xmx512m. This can be done by setting maven.junit.jvmargs in project.properties.
106: // To change the settings, edit the log4j.property file
107: // in the test-resources directory.
108: BasicConfigurator.configure();
109: }
110:
111: /**
112: * suite
113: * @return
114: */
115: public static Test suite() {
116: TestSuite suite = new TestSuite();
117:
118: // Add each of the test suites
119: suite = DispatchTestSuite.addTestSuites(suite);
120: suite.addTestSuite(SOAP12Dispatch.class);
121: suite.addTestSuite(DispatchSoapActionTests.class);
122: suite.addTestSuite(ProxySoapActionTests.class);
123: suite.addTestSuite(PropertyValueTests.class);
124: suite.addTestSuite(ClientConfigTests.class);
125:
126: suite.addTestSuite(BlockTests.class);
127: suite.addTestSuite(MessageTests.class);
128: suite.addTestSuite(MessageContextTests.class);
129: suite.addTestSuite(FaultTests.class);
130: suite.addTestSuite(SAAJConverterTests.class);
131: suite.addTestSuite(SOAP12Tests.class);
132: suite.addTestSuite(MTOMSerializationTests.class);
133: suite.addTestSuite(BindingToProtocolTests.class);
134:
135: // ------ Metadata Tests ------
136: suite.addTestSuite(WSDLTests.class);
137: suite.addTestSuite(WSDLDescriptionTests.class);
138: suite.addTestSuite(AnnotationDescriptionTests.class);
139: suite.addTestSuite(GetDescFromBindingProviderTests.class);
140: suite.addTestSuite(ServiceTests.class);
141: suite.addTestSuite(PortSelectionTests.class);
142:
143: // ------ Handler Tests ------
144: suite.addTestSuite(LogicalMessageContextTests.class);
145: suite.addTestSuite(CompositeMessageContextTests.class);
146: suite.addTestSuite(HandlerChainProcessorTests.class);
147:
148: // ------ Message Tests ------
149: suite.addTestSuite(JaxwsMessageBundleTests.class);
150:
151: suite.addTestSuite(StringProviderTests.class);
152: suite.addTestSuite(SOAPFaultProviderTests.class);
153: suite.addTestSuite(StringMessageProviderTests.class);
154: suite.addTestSuite(SourceProviderTests.class);
155: suite.addTestSuite(SourceMessageProviderTests.class);
156: // TODO FIXME: Test fails
157: //suite.addTestSuite(SoapMessageProviderTests.class);
158: suite.addTestSuite(SoapMessageMUProviderTests.class);
159: suite.addTestSuite(JAXBProviderTests.class);
160: suite.addTestSuite(ProxyTests.class);
161: //TODO: FIXME - Was working, now doesn't
162: //suite.addTestSuite(ProxyNonWrappedTests.class);
163: suite.addTestSuite(RPCProxyTests.class);
164: suite.addTestSuite(RPCLitSWAProxyTests.class);
165: suite.addTestSuite(GorillaDLWProxyTests.class);
166: suite.addTestSuite(SOAP12ProxyTests.class);
167: suite.addTestSuite(ExceptionFactoryTests.class);
168: suite.addTestSuite(BasicAuthSecurityTests.class);
169:
170: suite.addTestSuite(AddressBookTests.class);
171: suite.addTestSuite(MtomSampleTests.class);
172:
173: // This test fails only on Solaris
174: //suite.addTestSuite(MtomSampleByteArrayTests.class);
175: suite.addTestSuite(BareTests.class);
176: // Intermittent failure, logged bug AXIS2-2605
177: //suite.addTestSuite(DocLitBareMinTests.class);
178: //TODO: FIXME - Was working, now doesn't
179: //suite.addTestSuite(NonWrapTests.class);
180: suite.addTestSuite(WSGenTests.class);
181: suite.addTestSuite(WrapTests.class);
182: suite.addTestSuite(DLWMinTests.class);
183: suite.addTestSuite(NonAnonymousComplexTypeTests.class);
184: suite.addTestSuite(AddNumbersTests.class);
185: suite.addTestSuite(AddNumbersHandlerTests.class);
186:
187: // TODO: This test intermittently fails on Linux and with trace enabled.
188: //suite.addTestSuite(ParallelAsyncTests.class);
189: // TODO: FIXME - Was working, now doesn't
190: //suite.addTestSuite(FaultyWebServiceTests.class);
191: suite.addTestSuite(FaultsServiceTests.class);
192:
193: suite.addTestSuite(EndpointLifecycleTests.class);
194: suite.addTestSuite(ResourceInjectionTests.class);
195: suite.addTestSuite(AnyTypeTests.class);
196: suite.addTestSuite(PolymorphicTests.class);
197: suite.addTestSuite(NS2PkgTest.class);
198: suite.addTestSuite(JAXBContextTest.class);
199:
200: suite.addTestSuite(DispatchXPayloadString.class);
201: suite.addTestSuite(DispatchXMessageString.class);
202: suite.addTestSuite(DispatchXPayloadSource.class);
203: suite.addTestSuite(DispatchXMessageSource.class);
204: suite.addTestSuite(DispatchXPayloadJAXB.class);
205: suite.addTestSuite(DispatchXMessageDataSource.class);
206: suite.addTestSuite(SchemaReaderTests.class);
207: suite.addTestSuite(RPCLitEnumTests.class);
208: suite.addTestSuite(BindingProviderTests.class);
209: // Commented due to test failure...
210: // suite.addTestSuite(StringListTests.class);
211: suite.addTestSuite(RPCLitStringArrayTests.class);
212: // ------ Endpoint Tests ------
213: suite.addTestSuite(BasicEndpointTests.class);
214:
215: // Start (and stop) the server only once for all the tests
216: TestSetup testSetup = new TestSetup(suite) {
217: public void setUp() {
218: TestLogger.logger.debug("Starting the server.");
219: StartServer startServer = new StartServer("server1");
220: startServer.testStartServer();
221: }
222:
223: public void tearDown() {
224: TestLogger.logger.debug("Stopping the server");
225: StopServer stopServer = new StopServer("server1");
226: stopServer.testStopServer();
227: }
228: };
229: return testSetup;
230: }
231: }
|