Author: lzoubek(a)redhat.com
Date: 2010-04-28 08:35:16 -0400 (Wed, 28 Apr 2010)
New Revision: 21777
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.classpath
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/bin/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/BottomUpJbossWStest.java.servlet
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassA.java.ws
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.java.ws
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.wsdl
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/SampleWStest.java.servlet
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TopDownJbossWStest.java.servlet
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TwoServicesJbossWStest.java.servlet
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/log4j.xml
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/BottomUpWebService.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JbossWSTest.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/SampleWebService.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TopDownWebService.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TwoBUWSInOneProject.java
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
Log:
added WS UI bot test plugin
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.classpath
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.classpath (rev
0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.classpath 2010-04-28 12:35:16 UTC (rev
21777)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con"
path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con"
path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="resources"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project (rev
0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.project 2010-04-28 12:35:16 UTC (rev
21777)
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.jboss.tools.ws.ui.bot.test</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.springframework.ide.eclipse.core.springbuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.springframework.ide.eclipse.core.springnature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/org.eclipse.jdt.core.prefs
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/.settings/org.eclipse.jdt.core.prefs 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,8 @@
+#Mon Aug 31 15:12:26 CEST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/META-INF/MANIFEST.MF 2010-04-28 12:35:16
UTC (rev 21777)
@@ -0,0 +1,24 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: WebService SWTBot Tests
+Bundle-SymbolicName: org.jboss.tools.ws.ui.bot.test
+Bundle-Version: 1.0.0.qualifier
+Bundle-Activator: org.jboss.tools.ws.ui.bot.test.Activator
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.apache.log4j;bundle-version="1.2.13",
+ org.jboss.tools.ui.bot.ext,
+ org.eclipse.jdt.ui,
+ org.eclipse.swtbot.eclipse.core;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.finder;bundle-version="2.0.0",
+ org.eclipse.swtbot.eclipse.ui;bundle-version="2.0.0",
+ org.eclipse.swtbot.junit4_x;bundle-version="2.0.0",
+ org.eclipse.swtbot.swt.finder;bundle-version="2.0.0",
+ org.eclipse.ui.ide;bundle-version="3.5.1",
+ org.eclipse.ui.forms;bundle-version="3.4.1",
+ org.junit4;bundle-version="4.5.0"
+Bundle-ActivationPolicy: lazy
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Eclipse-RegisterBuddy: org.apache.log4j
+Bundle-ClassPath: .
+Export-Package: org.jboss.tools.ws.ui.bot.test
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties
(rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/build.properties 2010-04-28 12:35:16 UTC
(rev 21777)
@@ -0,0 +1,5 @@
+source.. = src/,\
+ resources/
+output.. = bin/
+bin.includes = META-INF/,\
+ .
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/BottomUpJbossWStest.java.servlet
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/BottomUpJbossWStest.java.servlet
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/BottomUpJbossWStest.java.servlet 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,47 @@
+package jbossws;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class testWS
+ */
+public class BottomUpJbossWStest extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * @see HttpServlet#HttpServlet()
+ */
+ public BottomUpJbossWStest() {
+ super();
+ }
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ ClassAService service1 = new ClassAService();
+ System.out.println("Create Web Service...");
+ ClassA port1 = service1.getClassAPort();
+ System.out.println("Call Web Service Operation...");
+ int resp = port1.method();
+ System.out.println("Server said: " + resp);
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+
response.getOutputStream().print("<html><head></head><body>Web
service said :'"+resp+"'</body></html>");
+
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+ // TODO Auto-generated method stub
+ }
+
+}
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassA.java.ws
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassA.java.ws
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassA.java.ws 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,14 @@
+package jbossws;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService()
+public class ClassA {
+
+ @WebMethod()
+ public int method() {
+ System.out.println("JbossWS Service : method() was called");
+ return 1234567890;
+ }
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.java.ws
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.java.ws
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.java.ws 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,14 @@
+package jbossws;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+
+@WebService()
+public class ClassB {
+
+ @WebMethod()
+ public int method() {
+ System.out.println("JbossWS Service : method() was called");
+ return 11111;
+ }
+}
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.wsdl
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.wsdl
(rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/ClassB.wsdl 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,45 @@
+<definitions name='ClassBService' targetNamespace='http://jbossws/'
xmlns='http://schemas.xmlsoap.org/wsdl/'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://jbossws/'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
+ <types>
+ <xs:schema targetNamespace='http://jbossws/' version='1.0'
xmlns:tns='http://jbossws/'
xmlns:xs='http://www.w3.org/2001/XMLSchema'>
+ <xs:element name='method' type='tns:method'/>
+ <xs:element name='methodResponse' type='tns:methodResponse'/>
+ <xs:complexType name='method'>
+ <xs:sequence/>
+ </xs:complexType>
+ <xs:complexType name='methodResponse'>
+ <xs:sequence>
+ <xs:element name='return' type='xs:int'/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:schema>
+ </types>
+ <message name='ClassB_methodResponse'>
+ <part element='tns:methodResponse'
name='methodResponse'></part>
+ </message>
+ <message name='ClassB_method'>
+ <part element='tns:method' name='method'></part>
+ </message>
+ <portType name='ClassB'>
+ <operation name='method' parameterOrder='method'>
+ <input message='tns:ClassB_method'></input>
+ <output message='tns:ClassB_methodResponse'></output>
+ </operation>
+ </portType>
+ <binding name='ClassBBinding' type='tns:ClassB'>
+ <soap:binding style='document'
transport='http://schemas.xmlsoap.org/soap/http'/>
+ <operation name='method'>
+ <soap:operation soapAction=''/>
+ <input>
+ <soap:body use='literal'/>
+ </input>
+ <output>
+ <soap:body use='literal'/>
+ </output>
+ </operation>
+ </binding>
+ <service name='ClassBService'>
+ <port binding='tns:ClassBBinding' name='ClassBPort'>
+ <soap:address location='http://localhost:8080/JbossWS/ClassB'/>
+ </port>
+ </service>
+</definitions>
\ No newline at end of file
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/SampleWStest.java.servlet
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/SampleWStest.java.servlet
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/SampleWStest.java.servlet 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,50 @@
+package jbossws;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.jboss.samples.webservices.HelloWorld;
+import org.jboss.samples.webservices.HelloWorldService;
+
+/**
+ * Servlet implementation class testWS
+ */
+public class SampleWStest extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * @see HttpServlet#HttpServlet()
+ */
+ public SampleWStest() {
+ super();
+ }
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ HelloWorldService service1 = new HelloWorldService();
+ System.out.println("Create Web Service...");
+ HelloWorld port1 = service1.getHelloWorldPort();
+ System.out.println("Call Web Service Operation...");
+ String resp = port1.sayHello("abcdefgh");
+ System.out.println("Server said: " + resp);
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+
response.getOutputStream().print("<html><head></head><body>Web
service said :'"+resp+"'</body></html>");
+
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+ // TODO Auto-generated method stub
+ }
+
+}
\ No newline at end of file
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TopDownJbossWStest.java.servlet
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TopDownJbossWStest.java.servlet
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TopDownJbossWStest.java.servlet 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,48 @@
+package jbossws;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class testWS
+ */
+public class TopDownJbossWStest extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * @see HttpServlet#HttpServlet()
+ */
+ public TopDownJbossWStest() {
+ super();
+ }
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ ClassB_Service service1 = new ClassB_Service();
+ System.out.println("Create Web Service...");
+ ClassB port1 = service1.getClassBImplPort();
+ System.out.println("Call Web Service Operation...");
+ int resp = port1.method();
+ System.out.println("Server said: " + resp);
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+
+
response.getOutputStream().print("<html><head></head><body>Web
service said :'"+resp+"'</body></html>");
+
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+ // TODO Auto-generated method stub
+ }
+
+}
\ No newline at end of file
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TwoServicesJbossWStest.java.servlet
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TwoServicesJbossWStest.java.servlet
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/resources/jbossws/TwoServicesJbossWStest.java.servlet 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,60 @@
+package jbossws;
+
+import java.io.IOException;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+/**
+ * Servlet implementation class testWS
+ */
+public class TwoServicesJbossWStest extends HttpServlet {
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * @see HttpServlet#HttpServlet()
+ */
+ public TwoServicesJbossWStest() {
+ super();
+ }
+
+ /**
+ * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ ClassAService service1 = new ClassAService();
+ System.out.println("Create Web Service...");
+ ClassA port1 = service1.getClassAPort();
+ System.out.println("Call Web Service Operation...");
+ int resp1 = port1.method();
+ System.out.println("Server said: " + resp1);
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+ System.out.println("***********************");
+ System.out.println("Create Web Service Client...");
+ ClassBService service2 = new ClassBService();
+ System.out.println("Create Web Service...");
+ ClassB port2 = service2.getClassBPort();
+ System.out.println("Call Web Service Operation...");
+ int resp2 = port2.method();
+ System.out.println("Server said: " + resp2);
+ System.out.println("***********************");
+ System.out.println("Call Over!");
+
response.getOutputStream().print("<html><head></head><body>");
+ response.getOutputStream().print("<p>Web serviceA said
:'"+resp1+"'</p>");
+ response.getOutputStream().print("<p>Web serviceA said
:'"+resp2+"'</p>");
+ response.getOutputStream().print("</body></html>");
+
+ }
+
+ /**
+ * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
+ */
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws
ServletException, IOException {
+ // TODO Auto-generated method stub
+ }
+
+}
\ No newline at end of file
Added: trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/log4j.xml
===================================================================
--- trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/log4j.xml
(rev 0)
+++ trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/log4j.xml 2010-04-28 12:35:16 UTC
(rev 21777)
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+<log4j:configuration
xmlns:log4j="http://jakarta.apache.org/log4j/"
+ debug="false">
+
+ <appender name="consoleAppender"
class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <!--
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) -
%m%n" />
+ -->
+ <param name="ConversionPattern"
+ value="(%C{1}.java:%L) - %m%n" />
+
+ </layout>
+ </appender>
+
+ <appender name="fileAppender"
class="org.apache.log4j.FileAppender">
+ <param name="File" value="/tmp/debug.log" />
+ <param name="Append" value="false" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern"
+ value="%d{dd MMM yyyy HH:mm:ss.SSS} - %25t - %-5p - %30c{1} - (%C{1}.java:%L) -
%m%n" />
+ </layout>
+ </appender>
+
+ <appender name="asyncAppender"
class="org.apache.log4j.AsyncAppender">
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </appender>
+
+ <!-- don't log matchers, this is very high amount of chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.matchers">
+ <priority value="OFF" />
+ </category>
+
+ <!--
+ don't log widget notification events, this is moderately high chatter
+ -->
+ <category name="org.eclipse.swtbot.swt.finder.widgets">
+ <priority value="OFF" />
+ </category>
+
+ <!-- don't log finders, this is moderate chatter -->
+ <category name="org.eclipse.swtbot.swt.finder.finders">
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot.swt.finder.keyboard">
+ <!-- set to a value higher than debug to turn on. -->
+ <priority value="DEBUG" />
+ </category>
+
+ <category name="org.eclipse.swtbot">
+ <priority value="ALL" />
+ </category>
+
+ <root>
+ <priority value="INFO" />
+ <appender-ref ref="consoleAppender" />
+ <appender-ref ref="fileAppender" />
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/Activator.java 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,66 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.jboss.tools.ws.ui.bot.test";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext
+ * )
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see
+ * org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext
+ * )
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/BottomUpWebService.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/BottomUpWebService.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/BottomUpWebService.java 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,51 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.jboss.tools.ui.bot.ext.config.Annotations.*;
+import org.junit.Test;
+
+
+@SWTBotTestRequires(server=@Server(),perspective="Java EE")
+public class BottomUpWebService extends JbossWSTest {
+
+ @Test
+ public void bottomUpJbossWS() {
+ int testlevel=4;
+ for (int i=0;i<testlevel;i++) {
+ for (int j=0;j<testlevel;j++) {
+ bottomUpJbossWebService(i, j);
+ }
+ }
+ }
+
+ protected void bottomUpJbossWebService(int serverType, int clientType) {
+ log.info(" * Running test ServiceType:
'"+wizardConfigTexts.get(serverType)+"', ClientType:
'"+wizardConfigTexts.get(clientType)+"'");
+ createEARProject(EAR_PROJECT_NAME);
+ createProject(BOTTOMUP_WS_PROJ_NAME);
+ bottomUpService(BOTTOMUP_WS_PROJ_NAME, CLASS_A,serverType);
+ assertServiceDeployed(BOTTOMUP_WS_WSDL_URL);
+ // generate client stubs
+ createClient(BOTTOMUP_WS_CLIENT_PROJ_NAME, BOTTOMUP_WS_CLIENT_SERVLET_NAME,
BOTTOMUP_WS_WSDL_URL, clientType);
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ if (serverType >= SERVICE_SCALE_ASSEMBLE) {
+ // service was not assembled into EAR
+ projectExplorer.runOnServer(BOTTOMUP_WS_PROJ_NAME);
+ } else {
+ projectExplorer.runOnServer(EAR_PROJECT_NAME);
+ }
+ if (clientType >= CLIENT_SCALE_ASSEMBLE) {
+ // client was not assembled into EAR
+ projectExplorer.runOnServer(BOTTOMUP_WS_CLIENT_PROJ_NAME);
+
+ } else {
+ projectExplorer.runOnServer(EAR_PROJECT_NAME);
+ }
+ // but we need to run any of wars on server (to get browser)
+ projectExplorer.runOnServer(BOTTOMUP_WS_PROJ_NAME);
+ assertServiceResponseToClient(BOTTOMUP_WS_CLIENT_SERVLET_URL,
+ "1234567890");
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ assertServiceNotDeployed(BOTTOMUP_WS_WSDL_URL);
+ servers.removeAllProjectsFromServer();
+ projectExplorer.deleteAllProjects();
+ }
+}
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JbossWSTest.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JbossWSTest.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/JbossWSTest.java 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,201 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.eclipse.swtbot.swt.finder.junit.SWTBotJunit4ClassRunner;
+import org.eclipse.swtbot.swt.finder.widgets.SWTBotCombo;
+import org.jboss.tools.ui.bot.ext.SWTTestExt;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.Class;
+import
org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.JavaEEEnterpriseApplicationProject;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebDynamicWebProject;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWebService;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWebServiceClient;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServlet;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotBrowserExt;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotHyperlinkExt;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotScaleExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.runner.RunWith;
+
+(a)RunWith(SWTBotJunit4ClassRunner.class)
+public class JbossWSTest extends SWTTestExt {
+
+ public static final String EAR_PROJECT_NAME="EAR";
+ public static final String PKG_NAME="jbossws";
+
+ public static final String SAMPLE_WS_PROJ_NAME="SampleWS";
+ public static final String SAMPLE_WS_SERVICE_NAME="HelloWorld";
+ public static final String
SAMPLE_WS_WSDL_URL="http://localhost:8080/"+SAMPLE_WS_PROJ_NAME+"/"+SAMPLE_WS_SERVICE_NAME+"?wsdl";
+ public static final String SAMPLE_WSCLIENT_PROJ_NAME = "SampleWSClient";
+ public static final String SAMPLE_WSCLIENT_SERVLET_NAME = "SampleWStest";
+ public static final String SAMPLE_WSCLIENT_SERVLET_URL =
"http://localhost:8080/"+SAMPLE_WSCLIENT_PROJ_NAME+"/"+SAMPLE_WSCLIENT_SERVLET_NAME;
+ public static final String CLASS_A="ClassA";
+ public static final String CLASS_B="ClassB";
+ public static final String CLASS_C="ClassC";
+ public static final String BOTTOMUP_WS_PROJ_NAME="BottomUpJbossWS";
+ public static final String
BOTTOMUP_WS_WSDL_URL="http://localhost:8080/"+BOTTOMUP_WS_PROJ_NAME+"/"+CLASS_A+"?wsdl";
+ public static final String BOTTOMUP_WS_CLIENT_PROJ_NAME =
"BottomUpJbossWSClient";
+ public static final String BOTTOMUP_WS_CLIENT_SERVLET_NAME =
"BottomUpJbossWStest";
+ public static final String BOTTOMUP_WS_CLIENT_SERVLET_URL =
"http://localhost:8080/"+BOTTOMUP_WS_CLIENT_PROJ_NAME+"/"+BOTTOMUP_WS_CLIENT_SERVLET_NAME;
+ public static final String
TWO_SERVICES_CLIENT_SERVLET_NAME="TwoServicesJbossWStest";
+ public static final String TWO_SERVICES_CLIENT_SERVLET_URL =
"http://localhost:8080/"+BOTTOMUP_WS_CLIENT_PROJ_NAME+"/"+TWO_SERVICES_CLIENT_SERVLET_NAME;
+ public static final String TOPDOWN_WS_PROJ_NAME="TopDownJbossWS";
+ public static final String
TOPDOWN_WS_WSDL_URL="http://localhost:8080/"+TOPDOWN_WS_PROJ_NAME+"/"+CLASS_B+"?wsdl";
+ public static final String TOPDOWN_WS_CLIENT_PROJ_NAME =
"TopDownJbossWSClient";
+ public static final String TOPDOWN_WS_CLIENT_SERVLET_NAME =
"TopDownJbossWStest";
+ public static final String TOPDOWN_WS_CLIENT_SERVLET_URL =
"http://localhost:8080/"+TOPDOWN_WS_CLIENT_PROJ_NAME+"/"+TOPDOWN_WS_CLIENT_SERVLET_NAME;
+ public static final String JBOSSWS_CRED_LOGIN="admin";
+ public static final String JBOSSWS_CRED_PASS="admin";
+ public static final int CLIENT_SCALE_DEVELOP=5;
+ public static final int CLIENT_SCALE_ASSEMBLE=4;
+ public static final int CLIENT_SCALE_DEPLOY=3;
+ public static final int CLIENT_SCALE_INSTALL=2;
+ public static final int CLIENT_SCALE_START=1;
+ public static final int CLIENT_SCALE_TEST=0;
+ public static final int SERVICE_SCALE_DEVELOP=5;
+ public static final int SERVICE_SCALE_ASSEMBLE=4;
+ public static final int SERVICE_SCALE_DEPLOY=3;
+ public static final int SERVICE_SCALE_INSTALL=2;
+ public static final int SERVICE_SCALE_START=1;
+ public static final int SERVICE_SCALE_TEST=0;
+ protected static Map<Integer,String> wizardConfigTexts = new HashMap<Integer,
String>();
+
+
+ public JbossWSTest() {
+
+ }
+
+ static {
+ wizardConfigTexts.put(0, "Test");
+ wizardConfigTexts.put(1, "Start");
+ wizardConfigTexts.put(2, "Install");
+ wizardConfigTexts.put(3, "Deploy");
+ wizardConfigTexts.put(4, "Assemble");
+ wizardConfigTexts.put(5, "Develop");
+ }
+
+ protected void createClient(String projectName, String servletName,String wsdlDef, int
type) {
+ createProject(projectName);
+ SWTBot wiz = open.newObject(WebServicesWebServiceClient.LABEL);
+ wiz.comboBoxWithLabel(
+ WebServicesWebServiceClient.TEXT_SERVICE_DEFINITION).setText(
+ wsdlDef);
+ SWTBotScaleExt slider = bot.scale();
+ slider.setSelection(type);
+ selectJbossWSRuntime();
+ bot.sleep(TIME_1S); // wait for wizard to validate wsdl url and
+ // enable Finish button
+ open.finish(wiz);
+ projectExplorer.selectProject(projectName);
+ // create servlet which will inovke service
+ createInvokingServlet(servletName);
+ }
+
+ /**
+ * checks if 'Web Service Runtime' is set to 'JbossWS' and possibly sets
it correctly
+ * @param wiz wizard page of new Web Service
+ */
+ protected void selectJbossWSRuntime() {
+ SWTBotHyperlinkExt link = bot.hyperlink(1);
+ String linkText = link.getText();
+ if (!linkText.contains("JBossWS")) {
+ link.click();
+ SWTBot dBot = bot.activeShell().bot();
+ dBot.tree().select("JBossWS");
+ open.finish(dBot,IDELabel.Button.OK);
+ }
+ }
+
+ protected void bottomUpService(String projName, String serviceClass, int serverType)
{
+ SWTBot wiz = open.newObject(Class.LABEL);
+ wiz.textWithLabel(Class.TEXT_PACKAGE).setText(PKG_NAME);
+ wiz.textWithLabel(Class.TEXT_NAME).setText(serviceClass);
+ open.finish(wiz);
+ eclipse.setClassContentFromResource(bot.editorByTitle(serviceClass
+ + ".java"), true,
+ org.jboss.tools.ws.ui.bot.test.Activator.PLUGIN_ID,
+ PKG_NAME, serviceClass + ".java.ws");
+ wiz = open.newObject(ActionItem.NewObject.WebServicesWebService.LABEL);
+ wiz.textWithLabel(WebServicesWebService.TEXT_SERVICE_IMPLEMENTATION)
+ .setText(PKG_NAME + "." + serviceClass);
+ SWTBotScaleExt slider = bot.scale();
+ slider.setSelection(serverType);
+ selectJbossWSRuntime();
+ open.finish(wiz);
+ projectExplorer.runOnServer(projName);
+ }
+
+ protected void createInvokingServlet(String servletName) {
+ SWTBot wiz = open.newObject(WebServlet.LABEL);
+ wiz.textWithLabel(WebServlet.TEXT_JAVA_PACKAGE).setText(
+ PKG_NAME);
+ wiz.textWithLabel(WebServlet.TEXT_CLASS_NAME).setText(
+ servletName);
+ open.finish(wiz);
+ eclipse.setClassContentFromResource(bot
+ .editorByTitle(servletName
+ + ".java"), true,
+ org.jboss.tools.ws.ui.bot.test.Activator.PLUGIN_ID,
+ PKG_NAME, servletName
+ + ".java.servlet");
+ }
+
+ protected void createProject(String name) {
+ SWTBot wiz = open.newObject(WebDynamicWebProject.LABEL);
+ wiz.textWithLabel(WebDynamicWebProject.TEXT_PROJECT_NAME).setText(name);
+ open.finish(wiz);
+ assertTrue(projectExplorer.existsResource(name));
+ projectExplorer.selectProject(name);
+ }
+
+ protected void createEARProject(String name) {
+ SWTBot wiz = open.newObject(JavaEEEnterpriseApplicationProject.LABEL);
+ wiz.textWithLabel(JavaEEEnterpriseApplicationProject.TEXT_PROJECT_NAME).setText(name);
+ // set EAR version
+ SWTBotCombo combo = wiz.comboBox(1);
+ combo.setSelection(combo.itemCount()-1);
+ wiz.button(IDELabel.Button.NEXT).click();
+ wiz.checkBox("Generate application.xml deployment descriptor").click();
+ open.finish(wiz);
+ assertTrue(projectExplorer.existsResource(name));
+ projectExplorer.selectProject(name);
+ }
+
+ protected void assertServiceDeployed(String wsdlURL) {
+ SWTBotBrowserExt b = bot.browser();
+ b.goURL("http://localhost:8080/jbossws/services");
+ util.waitForBrowserLoadsPage(b,JBOSSWS_CRED_LOGIN,JBOSSWS_CRED_PASS);
+ boolean wsdlOK = b.followLink(wsdlURL);
+ assertTrue(
+ "Service was not sucessfully deployed, WSDL '"+wsdlURL+"' is
not listed in JbossWS endpoint registry",
+ wsdlOK);
+ util.waitForBrowserLoadsPage(b);
+ b.back();
+ util.waitForBrowserLoadsPage(b);
+ }
+
+ protected void assertServiceNotDeployed(String wsdlURL) {
+ SWTBotBrowserExt b = bot.browser();
+ b.goURL("http://localhost:8080/jbossws/services");
+ util.waitForBrowserLoadsPage(b,JBOSSWS_CRED_LOGIN,JBOSSWS_CRED_PASS);
+ boolean wsdlOK = !b.getText().contains(wsdlURL);
+ assertTrue(
+ "Project was not sucessfully undeployed, WSDL '"+wsdlURL+"' is
listed in JbossWS endpoint registry",
+ wsdlOK);
+ }
+
+ protected void assertServiceResponseToClient(String startServlet, String response) {
+ SWTBotBrowserExt b = bot.browser();
+ b.goURL(startServlet);
+ util.waitForBrowserLoadsPage(b);
+ String servletReturned = b.getText();
+ boolean servletRetOK = servletReturned.contains(response);
+ assertTrue(
+ "Unexpected Client servlet response, error calling web service, response is :
"
+ + servletReturned, servletRetOK);
+
+ }
+}
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/SampleWebService.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/SampleWebService.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/SampleWebService.java 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,49 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem;
+import
org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.JBossToolsCreateaSampleWebService;
+import org.junit.Test;
+
+
+@SWTBotTestRequires(server=@Server(),perspective="Java EE")
+public class SampleWebService extends JbossWSTest {
+
+
+ @Test
+ public void sampleWebService() {
+ console.show().toolbarToggleButton("Show Console When Standard Out
Changes").deselect();
+ console.show().toolbarToggleButton("Show Console When Standard Error
Changes").deselect();
+ int testlevel = 3;
+ for (int i=0;i<testlevel;i++) {
+ sampleWebService(i);
+ }
+ }
+
+ private void sampleWebService(int clientType) {
+ log.info(" * Running test with ClientType:
'"+wizardConfigTexts.get(clientType)+"'");
+ createEARProject(EAR_PROJECT_NAME);
+ createProject(SAMPLE_WS_PROJ_NAME);
+ SWTBot wiz = open.newObject(JBossToolsCreateaSampleWebService.LABEL);
+ wiz.comboBox().setText(SAMPLE_WS_PROJ_NAME);
+ open.finish(wiz);
+ open.viewOpen(ActionItem.View.ServerServers.LABEL);
+ projectExplorer.runOnServer(SAMPLE_WS_PROJ_NAME);
+ // browse WSDL
+ assertServiceDeployed(SAMPLE_WS_WSDL_URL);
+ // create and run WS Sample Client
+ createClient(SAMPLE_WSCLIENT_PROJ_NAME, SAMPLE_WSCLIENT_SERVLET_NAME,
SAMPLE_WS_WSDL_URL, clientType);
+ // re run project
+ if (clientType<=CLIENT_SCALE_DEPLOY) {
+ servers.removeProjectFromServers(EAR_PROJECT_NAME);
+ }
+ projectExplorer.runOnServer(SAMPLE_WSCLIENT_PROJ_NAME);
+ assertServiceResponseToClient(SAMPLE_WSCLIENT_SERVLET_URL, "abcdefg");
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ assertServiceNotDeployed(SAMPLE_WS_WSDL_URL);
+ servers.removeAllProjectsFromServer();
+ projectExplorer.deleteAllProjects();
+ }
+}
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TopDownWebService.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TopDownWebService.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TopDownWebService.java 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,66 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.ui.bot.ext.config.Annotations.*;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWSDL;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWebService;
+import org.jboss.tools.ui.bot.ext.parts.SWTBotScaleExt;
+import org.jboss.tools.ui.bot.ext.types.IDELabel;
+import org.junit.Test;
+
+@SWTBotTestRequires(server=@Server(),perspective="Java EE")
+public class TopDownWebService extends JbossWSTest {
+
+ @Test
+ public void topDownJbossWS() {
+ int testLevel = 3;
+ for (int i=0;i<testLevel;i++) {
+ for (int j=0;j<testLevel;j++) {
+ topDownJbossWebService(i, j);
+ }
+ }
+ }
+ private void topDownJbossWebService(int serverType, int clientType) {
+ log.info(" * Running test ServiceType:
'"+wizardConfigTexts.get(serverType)+"', ClientType:
'"+wizardConfigTexts.get(clientType)+"'");
+ createEARProject(EAR_PROJECT_NAME);
+ createProject(TOPDOWN_WS_PROJ_NAME);
+ SWTBot wiz = open.newObject(WebServicesWSDL.LABEL);
+ wiz.textWithLabel(WebServicesWSDL.TEXT_FILE_NAME).setText(
+ CLASS_B + ".wsdl");
+ wiz.textWithLabel(
+ WebServicesWSDL.TEXT_ENTER_OR_SELECT_THE_PARENT_FOLDER)
+ .setText(TOPDOWN_WS_PROJ_NAME + "/src");
+ wiz.button(IDELabel.Button.NEXT).click();
+ open.finish(wiz);
+ eclipse.setClassContentFromResource(bot.editorByTitle(CLASS_B
+ + ".wsdl"), true,
+ org.jboss.tools.ws.ui.bot.test.Activator.PLUGIN_ID,
+ PKG_NAME, CLASS_B + ".wsdl");
+ wiz = open.newObject(WebServicesWebService.LABEL);
+ wiz.comboBoxWithLabel(WebServicesWebService.TEXT_WEB_SERVICE_TYPE)
+ .setSelection(1);
+ wiz.comboBoxWithLabel("Service definition:").setText(
+ "/" + TOPDOWN_WS_PROJ_NAME + "/src/"
+ + CLASS_B + ".wsdl");
+ SWTBotScaleExt slider = bot.scale();
+ slider.setSelection(serverType);
+ selectJbossWSRuntime();
+ open.finish(wiz);
+ servers.removeProjectFromServers(EAR_PROJECT_NAME);
+ projectExplorer.runOnServer(TOPDOWN_WS_PROJ_NAME);
+ assertServiceDeployed(TOPDOWN_WS_WSDL_URL);
+ // create and run client
+
+ createClient(TOPDOWN_WS_CLIENT_PROJ_NAME, TOPDOWN_WS_CLIENT_SERVLET_NAME,
TOPDOWN_WS_WSDL_URL, clientType);
+
+ servers.removeProjectFromServers(EAR_PROJECT_NAME);
+ projectExplorer.runOnServer(TOPDOWN_WS_PROJ_NAME);
+ projectExplorer.runOnServer(TOPDOWN_WS_CLIENT_PROJ_NAME);
+
+ assertServiceResponseToClient(TOPDOWN_WS_CLIENT_SERVLET_URL, "0");
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ assertServiceNotDeployed(TOPDOWN_WS_WSDL_URL);
+ servers.removeAllProjectsFromServer();
+ projectExplorer.deleteAllProjects();
+ }
+}
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TwoBUWSInOneProject.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TwoBUWSInOneProject.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/TwoBUWSInOneProject.java 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,57 @@
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.eclipse.swtbot.swt.finder.SWTBot;
+import org.jboss.tools.ui.bot.ext.config.Annotations.SWTBotTestRequires;
+import org.jboss.tools.ui.bot.ext.config.Annotations.Server;
+import org.jboss.tools.ui.bot.ext.gen.ActionItem.NewObject.WebServicesWebServiceClient;
+import org.junit.AfterClass;
+import org.junit.Test;
+
+@SWTBotTestRequires(server=@Server(),perspective="Java EE")
+public class TwoBUWSInOneProject extends JbossWSTest {
+
+ @AfterClass
+ public static void after() {
+ bot.sleep(Long.MAX_VALUE);
+ }
+ @Test
+ public void twoServices() {
+ createEARProject(EAR_PROJECT_NAME);
+ createProject(BOTTOMUP_WS_PROJ_NAME);
+ // service A
+ bottomUpService(BOTTOMUP_WS_PROJ_NAME, CLASS_A,SERVICE_SCALE_START);
+ // service B
+ bottomUpService(BOTTOMUP_WS_PROJ_NAME, CLASS_B,SERVICE_SCALE_START);
+
+ assertServiceDeployed(BOTTOMUP_WS_WSDL_URL);
+ assertServiceDeployed(BOTTOMUP_WS_WSDL_URL.replace(CLASS_A, CLASS_B));
+
+ // generate client stubs
+ createClient(BOTTOMUP_WS_CLIENT_PROJ_NAME, TWO_SERVICES_CLIENT_SERVLET_NAME,
BOTTOMUP_WS_WSDL_URL, CLIENT_SCALE_START);
+ util.waitForAll(TIME_5S);
+ // service B client
+ SWTBot wiz = open.newObject(WebServicesWebServiceClient.LABEL);
+ wiz.comboBoxWithLabel(
+ WebServicesWebServiceClient.TEXT_SERVICE_DEFINITION).setText(
+ BOTTOMUP_WS_WSDL_URL.replace(CLASS_A, CLASS_B));
+ bot.sleep(TIME_1S);// wait for wizard to validate wsdl url and enable 'Finish'
button
+ selectJbossWSRuntime();
+ open.finish(wiz);
+ util.waitForAll(TIME_5S);
+ // create servlet which will inovke service
+ createInvokingServlet(TWO_SERVICES_CLIENT_SERVLET_NAME);
+
+ // we need to undeploy auto-created EAR and deploy service and client
+ // wars again
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ projectExplorer.runOnServer(BOTTOMUP_WS_PROJ_NAME);
+ projectExplorer.runOnServer(BOTTOMUP_WS_CLIENT_PROJ_NAME);
+ assertServiceResponseToClient(TWO_SERVICES_CLIENT_SERVLET_URL,
+ "1234567890");
+ assertServiceResponseToClient(TWO_SERVICES_CLIENT_SERVLET_URL,
+ "11111");
+ servers.removeAllProjectsFromServer(configuredState.getServer().name);
+ assertServiceNotDeployed(BOTTOMUP_WS_WSDL_URL);
+
+ }
+}
Added:
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
===================================================================
---
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java
(rev 0)
+++
trunk/ws/tests/org.jboss.tools.ws.ui.bot.test/src/org/jboss/tools/ws/ui/bot/test/WSAllBotTests.java 2010-04-28
12:35:16 UTC (rev 21777)
@@ -0,0 +1,26 @@
+ /*******************************************************************************
+ * Copyright (c) 2007-2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is 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
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.ws.ui.bot.test;
+
+import org.jboss.tools.ui.bot.ext.RequirementAwareSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+@SuiteClasses({
+ //SampleWebService.class,
+ TwoBUWSInOneProject.class,
+ //BottomUpWebService.class,
+ //TopDownWebService.class
+ })
+(a)RunWith(RequirementAwareSuite.class)
+public class WSAllBotTests {
+
+}