[jboss-svn-commits] JBL Code SVN: r37710 - in labs/jbosstm/trunk/XTS: WS-C/tests and 14 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Nov 8 09:52:18 EST 2011


Author: zhfeng
Date: 2011-11-08 09:52:18 -0500 (Tue, 08 Nov 2011)
New Revision: 37710

Added:
   labs/jbosstm/trunk/XTS/WS-C/tests/pom.xml
   labs/jbosstm/trunk/XTS/WS-T/tests/pom.xml
   labs/jbosstm/trunk/XTS/WSAS/tests/pom.xml
   labs/jbosstm/trunk/XTS/WSCF/tests/pom.xml
   labs/jbosstm/trunk/XTS/WSTX/tests/pom.xml
   labs/jbosstm/trunk/XTS/localjunit/tests/
   labs/jbosstm/trunk/XTS/localjunit/tests/pom.xml
   labs/jbosstm/trunk/XTS/localjunit/tests/src/
   labs/jbosstm/trunk/XTS/localjunit/tests/src/test/
   labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/
   labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/
   labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/
   labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/qa/
   labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/qa/junit/
   labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/qa/junit/HttpUtils.java
   labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/qa/junit/TestAll.java
   labs/jbosstm/trunk/XTS/localjunit/tests/src/test/resources/
   labs/jbosstm/trunk/XTS/localjunit/tests/src/test/resources/arquillian.xml
Modified:
   labs/jbosstm/trunk/XTS/localjunit/pom.xml
   labs/jbosstm/trunk/XTS/pom.xml
Log:
JBTM-954 update to use arquillian to run junit tests

Added: labs/jbosstm/trunk/XTS/WS-C/tests/pom.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-C/tests/pom.xml	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-C/tests/pom.xml	2011-11-08 14:52:18 UTC (rev 37710)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated by the @authors tag. All rights reserved. See the copyright.txt in the distribution 
+	for a full listing of individual contributors. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser 
+	General Public License, v. 2.1. This program is distributed in the hope that it will be useful, but WITHOUT A WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+	PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License, v.2.1 along with this distribution; if not, write to the Free 
+	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<groupId>org.jboss.narayana.xts</groupId>
+		<artifactId>xts-all</artifactId>
+		<version>5.0.0.M2-SNAPSHOT</version>
+		<relativePath>../../pom.xml</relativePath>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>ws-c11-tests</artifactId>
+	<packaging>war</packaging>
+	<name>junit tests for wsc11</name>
+	<description>junit tests for wsc11</description>
+	<build>
+		<finalName>${project.artifactId}</finalName>
+    	<sourceDirectory>src</sourceDirectory>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.3.1</version>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+					<includes>
+						<include>com/arjuna/wsc11/**/*.java</include>
+					</includes>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.1.1</version>
+				<configuration>
+					<failOnMissingWebXml>false</failOnMissingWebXml>
+					<archive>
+						<manifestEntries>
+							<Dependencies>org.jboss.jts,org.jboss.ws.api,javax.xml.ws.api,org.jboss.xts,org.dom4j,org.junit,org.jboss.ws.jaxws-client services export,org.jboss.ws.cxf.jbossws-cxf-client services export</Dependencies>
+						</manifestEntries>
+					</archive>
+					<webXml>
+						dd/ws-c11-tests_web-app.xml
+					</webXml>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.jboss.narayana.xts</groupId>
+			<artifactId>jbossxts</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.narayana.xts</groupId>
+			<artifactId>xts-test-servlet</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+			<version>3.1</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.1</version>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Added: labs/jbosstm/trunk/XTS/WS-T/tests/pom.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WS-T/tests/pom.xml	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/WS-T/tests/pom.xml	2011-11-08 14:52:18 UTC (rev 37710)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated by the @authors tag. All rights reserved. See the copyright.txt in the distribution 
+	for a full listing of individual contributors. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser 
+	General Public License, v. 2.1. This program is distributed in the hope that it will be useful, but WITHOUT A WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+	PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License, v.2.1 along with this distribution; if not, write to the Free 
+	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<groupId>org.jboss.narayana.xts</groupId>
+		<artifactId>xts-all</artifactId>
+		<version>5.0.0.M2-SNAPSHOT</version>
+		<relativePath>../../pom.xml</relativePath>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>ws-t11-tests</artifactId>
+	<packaging>war</packaging>
+	<name>junit tests for wst11</name>
+	<description>junit tests for wst11</description>
+	<build>
+		<finalName>${project.artifactId}</finalName>
+    	<sourceDirectory>src</sourceDirectory>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.3.1</version>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+					<includes>
+						<include>com/arjuna/wst/tests/common/**/*.java</include>
+						<include>com/arjuna/wst11/tests/**/*.java</include>
+					</includes>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.1.1</version>
+				<configuration>
+					<failOnMissingWebXml>false</failOnMissingWebXml>
+					<archive>
+						<manifestEntries>
+							<Dependencies>org.jboss.jts,org.jboss.ws.api,javax.xml.ws.api,org.jboss.xts,org.dom4j,org.junit,org.jboss.ws.jaxws-client services export,org.jboss.ws.cxf.jbossws-cxf-client services export</Dependencies>
+						</manifestEntries>
+					</archive>
+					<webXml>
+						dd/ws-t11-tests_web-app.xml
+					</webXml>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.jboss.narayana.xts</groupId>
+			<artifactId>jbossxts</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.narayana.xts</groupId>
+			<artifactId>xts-test-servlet</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+			<version>3.1</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.1</version>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Added: labs/jbosstm/trunk/XTS/WSAS/tests/pom.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSAS/tests/pom.xml	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/WSAS/tests/pom.xml	2011-11-08 14:52:18 UTC (rev 37710)
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated by the @authors tag. All rights reserved. See the copyright.txt in the distribution 
+	for a full listing of individual contributors. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser 
+	General Public License, v. 2.1. This program is distributed in the hope that it will be useful, but WITHOUT A WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+	PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License, v.2.1 along with this distribution; if not, write to the Free 
+	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<groupId>org.jboss.narayana.xts</groupId>
+		<artifactId>xts-all</artifactId>
+		<version>5.0.0.M2-SNAPSHOT</version>
+		<relativePath>../../pom.xml</relativePath>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>wsas-tests</artifactId>
+	<packaging>war</packaging>
+	<name>junit tests for wsas</name>
+	<description>junit tests for wsas</description>
+	<build>
+		<finalName>${project.artifactId}</finalName>
+    	<sourceDirectory>classes</sourceDirectory>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.3.1</version>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.1.1</version>
+				<configuration>
+					<failOnMissingWebXml>false</failOnMissingWebXml>
+					<archive>
+						<manifestEntries>
+							<Dependencies>org.jboss.jts,org.jboss.ws.api,javax.xml.ws.api,org.jboss.xts,org.dom4j,org.junit,org.jboss.ws.jaxws-client services export,org.jboss.ws.cxf.jbossws-cxf-client services export</Dependencies>
+						</manifestEntries>
+					</archive>
+					<webXml>
+						dd/wsas-tests_web-app.xml
+					</webXml>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.jboss.narayana.xts</groupId>
+			<artifactId>jbossxts</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+			<version>3.1</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.1</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>dom4j</groupId>
+			<artifactId>dom4j</artifactId>
+			<version>1.6.1</version>
+		</dependency>
+	</dependencies>
+</project>

Added: labs/jbosstm/trunk/XTS/WSCF/tests/pom.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/tests/pom.xml	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/WSCF/tests/pom.xml	2011-11-08 14:52:18 UTC (rev 37710)
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated by the @authors tag. All rights reserved. See the copyright.txt in the distribution 
+	for a full listing of individual contributors. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser 
+	General Public License, v. 2.1. This program is distributed in the hope that it will be useful, but WITHOUT A WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+	PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License, v.2.1 along with this distribution; if not, write to the Free 
+	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<groupId>org.jboss.narayana.xts</groupId>
+		<artifactId>xts-all</artifactId>
+		<version>5.0.0.M2-SNAPSHOT</version>
+		<relativePath>../../pom.xml</relativePath>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>wscf11-tests</artifactId>
+	<packaging>war</packaging>
+	<name>junit tests for wscf11</name>
+	<description>junit tests for wscf11</description>
+	<build>
+		<finalName>${project.artifactId}</finalName>
+    	<sourceDirectory>classes</sourceDirectory>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.3.1</version>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+					<includes>
+						<include>com/arjuna/wscf11/**/*.java</include>
+					</includes>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.1.1</version>
+				<configuration>
+					<failOnMissingWebXml>false</failOnMissingWebXml>
+					<archive>
+						<manifestEntries>
+							<Dependencies>org.jboss.jts,org.jboss.ws.api,javax.xml.ws.api,org.jboss.xts,org.dom4j,org.junit,org.jboss.ws.jaxws-client services export,org.jboss.ws.cxf.jbossws-cxf-client services export</Dependencies>
+						</manifestEntries>
+					</archive>
+					<webXml>
+						dd/wscf11-tests_web-app.xml
+					</webXml>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.jboss.narayana.xts</groupId>
+			<artifactId>jbossxts</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.narayana.xts</groupId>
+			<artifactId>xts-test-servlet</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+			<version>3.1</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.1</version>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Added: labs/jbosstm/trunk/XTS/WSTX/tests/pom.xml
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/pom.xml	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/pom.xml	2011-11-08 14:52:18 UTC (rev 37710)
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated by the @authors tag. All rights reserved. See the copyright.txt in the distribution 
+	for a full listing of individual contributors. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser 
+	General Public License, v. 2.1. This program is distributed in the hope that it will be useful, but WITHOUT A WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+	PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License, v.2.1 along with this distribution; if not, write to the Free 
+	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<parent>
+		<groupId>org.jboss.narayana.xts</groupId>
+		<artifactId>xts-all</artifactId>
+		<version>5.0.0.M2-SNAPSHOT</version>
+		<relativePath>../../pom.xml</relativePath>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>wstx11-tests</artifactId>
+	<packaging>war</packaging>
+	<name>junit tests for wstx11</name>
+	<description>junit tests for wstx11</description>
+	<build>
+		<finalName>${project.artifactId}</finalName>
+    	<sourceDirectory>classes</sourceDirectory>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.3.1</version>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+					<includes>
+						<include>com/arjuna/wst/tests/common/**/*.java</include>
+						<include>com/arjuna/wst11/tests/**/*.java</include>
+						<include>com/arjuna/wstx11/tests/**/*.java</include>
+					</includes>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-war-plugin</artifactId>
+				<version>2.1.1</version>
+				<configuration>
+					<failOnMissingWebXml>false</failOnMissingWebXml>
+					<archive>
+						<manifestEntries>
+							<Dependencies>org.jboss.jts,org.jboss.ws.api,javax.xml.ws.api,org.jboss.xts,org.dom4j,org.junit,org.jboss.ws.jaxws-client services export,org.jboss.ws.cxf.jbossws-cxf-client services export</Dependencies>
+						</manifestEntries>
+					</archive>
+					<webXml>
+						dd/wstx11-tests_web-app.xml
+					</webXml>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.jboss.narayana.xts</groupId>
+			<artifactId>jbossxts</artifactId>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.narayana.xts</groupId>
+			<artifactId>xts-test-servlet</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+			<version>3.1</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.1</version>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+</project>

Modified: labs/jbosstm/trunk/XTS/localjunit/pom.xml
===================================================================
--- labs/jbosstm/trunk/XTS/localjunit/pom.xml	2011-11-07 15:24:33 UTC (rev 37709)
+++ labs/jbosstm/trunk/XTS/localjunit/pom.xml	2011-11-08 14:52:18 UTC (rev 37710)
@@ -5,41 +5,18 @@
 	PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License, v.2.1 along with this distribution; if not, write to the Free 
 	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -->
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-  <parent>
-    <groupId>org.jboss.narayana.xts</groupId>
-    <artifactId>xts-all</artifactId>
-    <version>5.0.0.M2-SNAPSHOT</version>
-    <relativePath>../pom.xml</relativePath>
-  </parent>
-  <modelVersion>4.0.0</modelVersion>
-  <artifactId>localjunit</artifactId>
-  <packaging>jar</packaging>
-  <name>localjunit for xts</name>
-  <description>tests for xts</description>
-  <build>
-    <sourceDirectory>src</sourceDirectory>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <skipTests>true</skipTests>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
-  <dependencies>
-    <dependency>
-      <groupId>commons-httpclient</groupId>
-      <artifactId>commons-httpclient</artifactId>
-      <version>3.1</version>
-      <scope>compile</scope>
-    </dependency>
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <version>4.8.1</version>
-      <scope>compile</scope>
-    </dependency>
-  </dependencies>
+	<parent>
+		<groupId>org.jboss.narayana.xts</groupId>
+		<artifactId>xts-all</artifactId>
+		<version>5.0.0.M2-SNAPSHOT</version>
+		<relativePath>../pom.xml</relativePath>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>localjunit</artifactId>
+	<packaging>pom</packaging>
+	<name>localjunit tests for xts</name>
+	<description>localjunit tests for xts</description>
+	<modules>
+		<module>tests</module>
+	</modules>
 </project>


Property changes on: labs/jbosstm/trunk/XTS/localjunit/tests
___________________________________________________________________
Added: svn:ignore
   + target


Added: labs/jbosstm/trunk/XTS/localjunit/tests/pom.xml
===================================================================
--- labs/jbosstm/trunk/XTS/localjunit/tests/pom.xml	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/localjunit/tests/pom.xml	2011-11-08 14:52:18 UTC (rev 37710)
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- JBoss, Home of Professional Open Source Copyright 2008, Red Hat Middleware LLC, and others contributors as indicated by the @authors tag. All rights reserved. See the copyright.txt in the distribution 
+	for a full listing of individual contributors. This copyrighted material is made available to anyone wishing to use, modify, copy, or redistribute it subject to the terms and conditions of the GNU Lesser 
+	General Public License, v. 2.1. This program is distributed in the hope that it will be useful, but WITHOUT A WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
+	PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License, v.2.1 along with this distribution; if not, write to the Free 
+	Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+	<groupId>org.jboss.narayana.xts</groupId>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>localjunit-tests</artifactId>
+	<packaging>jar</packaging>
+	<name>xts junit tests</name>
+	<description>xts junit tests</description>
+	<version>5.0.0.M2-SNAPSHOT</version>
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<version>2.3.1</version>
+				<configuration>
+					<source>1.6</source>
+					<target>1.6</target>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>org.jboss.narayana.xts</groupId>
+			<artifactId>wstx11-tests</artifactId>
+			<version>5.0.0.M2-SNAPSHOT</version>
+			<type>war</type>
+			<scope>provided</scope>
+		</dependency>
+		<dependency>
+			<groupId>commons-httpclient</groupId>
+			<artifactId>commons-httpclient</artifactId>
+			<version>3.1</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>4.8.1</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.jboss.arquillian.junit</groupId>
+			<artifactId>arquillian-junit-container</artifactId>
+			<version>1.0.0.CR5</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+	<profiles>
+		<profile>
+			<!-- The default profile skips all tests, though you can tune it 
+			to run just unit tests based on a custom pattern -->
+			<!-- Seperate profiles are provided for running all tests, including 
+			Arquillian tests that execute in the specified container -->
+		 <id>default</id>
+		 <activation>
+			 <activeByDefault>true</activeByDefault>
+		 </activation>
+		 <build>
+			 <plugins>
+				 <plugin>
+					 <artifactId>maven-surefire-plugin</artifactId>
+					 <version>2.7.2</version>
+					 <configuration>
+						 <skip>true</skip>
+					 </configuration>
+				 </plugin>
+			 </plugins>
+		 </build>
+	 </profile>
+	 <profile>
+		 <!-- Run with: mvn clean test -Parq-jbossas-managed -->
+		 <id>arq-jbossas-managed</id>
+		 <dependencies>
+			 <dependency>
+				 <groupId>org.jboss.as</groupId>
+				 <artifactId>jboss-as-arquillian-container-managed</artifactId>
+				 <version>7.0.2.Final</version>
+				 <scope>test</scope>
+			 </dependency>
+		 </dependencies>
+	 </profile>
+ </profiles>
+</project>

Added: labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/qa/junit/HttpUtils.java
===================================================================
--- labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/qa/junit/HttpUtils.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/qa/junit/HttpUtils.java	2011-11-08 14:52:18 UTC (rev 37710)
@@ -0,0 +1,162 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package com.arjuna.qa.junit;
+
+import org.apache.commons.httpclient.Header;
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.HttpMethodBase;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.methods.DeleteMethod;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.methods.HeadMethod;
+import org.apache.commons.httpclient.methods.OptionsMethod;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.PutMethod;
+import org.apache.commons.httpclient.methods.TraceMethod;
+
+import java.io.IOException;
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+/** Utilities for client http requests
+ *
+ * @author Scott.Stark at jboss.org
+ * @version $Revision: 82338 $
+ */
+public class HttpUtils
+{
+//   private static Logger log = Logger.getLogger(HttpUtils.class);
+
+   public static final int GET = 1;
+   public static final int POST = 2;
+   public static final int HEAD = 3;
+   public static final int OPTIONS = 4;
+   public static final int PUT = 5;
+   public static final int DELETE = 6;
+   public static final int TRACE = 7;
+
+   /** Perform a get on the indicated URL and assert an HTTP_OK response code
+    *
+    * @param url
+    * @return The commons HttpClient used to perform the get
+    * @throws Exception on any failure
+    */
+   public static HttpMethodBase accessURL(URL url) throws Exception
+   {
+      return accessURL(url, null, HttpURLConnection.HTTP_OK);
+   }
+   /** Perform a get on the indicated URL and assert that the response code
+    * matches the expectedHttpCode argument.
+    *
+    * @param url
+    * @param expectedHttpCode the http response code expected
+    * @return The commons HttpClient used to perform the get
+    * @throws Exception on any failure
+    */
+   public static HttpMethodBase accessURL(URL url, String realm,
+      int expectedHttpCode)
+      throws Exception
+   {
+      return accessURL(url, realm, expectedHttpCode, null);
+   }
+   public static HttpMethodBase accessURL(URL url, String realm,
+      int expectedHttpCode, int type)
+      throws Exception
+   {
+      return accessURL(url, realm, expectedHttpCode, null, type);
+   }
+   public static HttpMethodBase accessURL(URL url, String realm,
+      int expectedHttpCode, Header[] hdrs)
+      throws Exception
+   {
+      return accessURL(url, realm, expectedHttpCode, hdrs, GET);
+   }
+   public static HttpMethodBase accessURL(URL url, String realm,
+      int expectedHttpCode, Header[] hdrs, int type)
+      throws Exception
+   {
+      HttpClient httpConn = new HttpClient();
+      HttpMethodBase request = createMethod(url, type);
+
+      int hdrCount = hdrs != null ? hdrs.length : 0;
+      for(int n = 0; n < hdrCount; n ++)
+         request.addRequestHeader(hdrs[n]);
+      try
+      {
+         System.err.println("Connecting to: "+url);
+         String userInfo = url.getUserInfo();
+
+         if( userInfo != null )
+         {
+            UsernamePasswordCredentials auth = new UsernamePasswordCredentials(userInfo);
+            httpConn.getState().setCredentials(realm, url.getHost(), auth);
+         }
+         System.err.println("RequestURI: "+request.getURI());
+         int responseCode = httpConn.executeMethod(request);
+         String response = request.getStatusText();
+         System.err.println("responseCode="+responseCode+", response="+response);
+         String content = request.getResponseBodyAsString();
+         System.err.println(content);
+         // Validate that we are seeing the requested response code
+         if( responseCode != expectedHttpCode )
+         {
+            throw new IOException("Expected reply code:"+expectedHttpCode
+               +", actual="+responseCode);
+         }
+      }
+      catch(IOException e)
+      {
+         throw e;
+      }
+      return request;
+   }
+
+   public static HttpMethodBase createMethod(URL url, int type)
+   {
+      HttpMethodBase request = null;
+      switch( type )
+      {
+         case GET:
+            request = new GetMethod(url.toString());
+            break;
+         case POST:
+            request = new PostMethod(url.toString());
+            break;
+         case HEAD:
+            request = new HeadMethod(url.toString());
+            break;
+         case OPTIONS:
+            request = new OptionsMethod(url.toString());
+            break;
+         case PUT:
+            request = new PutMethod(url.toString());
+            break;
+         case DELETE:
+            request = new DeleteMethod(url.toString());
+            break;
+         case TRACE:
+            request = new TraceMethod(url.toString());
+            break;
+      }
+      return request;
+   }
+}

Added: labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/qa/junit/TestAll.java
===================================================================
--- labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/qa/junit/TestAll.java	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/localjunit/tests/src/test/java/com/arjuna/qa/junit/TestAll.java	2011-11-08 14:52:18 UTC (rev 37710)
@@ -0,0 +1,177 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package com.arjuna.qa.junit;
+
+import static org.junit.Assert.*;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.FileWriter;
+import java.io.BufferedWriter;
+
+import java.net.HttpURLConnection;
+import java.net.URL;
+
+import org.apache.commons.httpclient.HttpMethodBase;
+import org.apache.commons.httpclient.Header;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OperateOnDeployment;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
+ at RunWith(Arquillian.class)
+public class TestAll {
+	private String baseUrl = "http://localhost:8080";
+    private String reportDir = "target/surefire-reports";
+
+	private int timeout = 10 * 1000;
+    private final static int LOOP_RETRY_MAX = 60;
+
+	private final static String wsastestsWar = "../../WSAS/tests/target/wsas-tests.war";
+	private final static String wsc11testsWar = "../../WS-C/tests/target/ws-c11-tests.war";
+	private final static String wst11testsWar = "../../WS-T/tests/target/ws-t11-tests.war";
+	private final static String wscf11testsWar = "../../WSCF/tests/target/wscf11-tests.war";
+	private final static String wstx11testsWar = "../../WSTX/tests/target/wstx11-tests.war";
+
+	@Deployment(name = "wsas-tests", testable = false)
+	public static Archive<?> createWSASTestArchive() {
+		WebArchive archive = ShrinkWrap.
+		createFromZipFile(WebArchive.class, new File(wsastestsWar));
+		return archive;	
+	}
+
+	@Deployment(name = "ws-c11-tests", testable = false)
+	public static Archive<?> createWSC11TestArchive() {
+		WebArchive archive = ShrinkWrap.
+		createFromZipFile(WebArchive.class, new File(wsc11testsWar));
+		return archive;	
+	}
+
+	@Deployment(name = "ws-t11-tests", testable = false)
+	public static Archive<?> createWST11TestArchive() {
+		WebArchive archive = ShrinkWrap.
+		createFromZipFile(WebArchive.class, new File(wst11testsWar));
+		return archive;	
+	}
+
+	@Deployment(name = "wscf11-tests", testable = false)
+	public static Archive<?> createWSCF11TestArchive() {
+		WebArchive archive = ShrinkWrap.
+		createFromZipFile(WebArchive.class, new File(wscf11testsWar));
+		return archive;	
+	}
+
+	@Deployment(name = "wstx11-tests", testable = false)
+	public static Archive<?> createWSTX11TestArchive() {
+		WebArchive archive = ShrinkWrap.
+		createFromZipFile(WebArchive.class, new File(wstx11testsWar));
+		return archive;	
+	}
+
+	@Test @OperateOnDeployment("wsas-tests")
+	public void test_wsas() {
+		testCallServlet(baseUrl + "/wsas-tests/index.xml", reportDir + "/Test-wsas-tests.xml");
+	}
+
+	@Test @OperateOnDeployment("ws-c11-tests")
+	public void test_wsc11() {
+		testCallServlet(baseUrl + "/ws-c11-tests/index.xml", reportDir + "/Test-ws-c11-tests.xml");
+	}
+
+	@Test @OperateOnDeployment("ws-t11-tests")
+	public void test_wst11() {
+		testCallServlet(baseUrl + "/ws-t11-tests/index.xml", reportDir + "/Test-ws-t11-tests.xml");
+	}
+
+	@Test @OperateOnDeployment("wscf11-tests")
+	public void test_wscf11() {
+		testCallServlet(baseUrl + "/wscf11-tests/index.xml", reportDir + "/Test-wscf11-tests.xml");
+	}
+
+	@Test @OperateOnDeployment("wstx11-tests")
+	public void test_wstx11() {
+		testCallServlet(baseUrl + "/wstx11-tests/index.xml", reportDir + "/Test-wstx11-tests.xml");
+	}
+
+	private void testCallServlet(String serverUrl, String outfile) {
+		boolean result = true;
+		try
+		{
+			// run tests by calling a servlet
+			Header runParam = new Header("run", "run");
+			HttpMethodBase request = HttpUtils.accessURL(
+					new URL(serverUrl), null,
+					HttpURLConnection.HTTP_OK,
+					new Header[] {runParam},
+					HttpUtils.POST);
+
+			String response = null;
+			int index = 0;
+			do
+			{
+				System.err.println("_____________ " +( index++) + "th round");
+				// we have to give some time to the tests to finish
+				Thread.sleep(timeout);
+
+				// tries to get results
+				request = HttpUtils.accessURL(
+						new URL(serverUrl), null,
+						HttpURLConnection.HTTP_OK,
+						HttpUtils.GET);
+
+				response = request.getResponseBodyAsString();
+			}
+			while (response != null && response.indexOf("finished") == -1 && index < LOOP_RETRY_MAX);
+
+			if (response != null && response.indexOf("finished") == -1)
+			{
+				System.err.println("======================================================");
+				System.err.println("====================  TIMED OUT  =====================");
+				System.err.println("======================================================");
+				result = false;
+			} else {
+				System.err.println("======================================================");
+				System.err.println("====================   RESULT    =====================");
+				System.err.println("======================================================");
+				System.err.println(response);
+				// writes response to the outfile
+				BufferedWriter writer = new BufferedWriter(new FileWriter(outfile));
+				writer.write(response);
+				writer.close();
+			}
+		}
+		catch (Exception e) {
+			System.err.println("======================================================");
+			System.err.println("====================  EXCEPTION  =====================");
+			System.err.println("======================================================");
+			e.printStackTrace();
+			result = false;
+		}
+		assertTrue(result);
+	}
+}

Added: labs/jbosstm/trunk/XTS/localjunit/tests/src/test/resources/arquillian.xml
===================================================================
--- labs/jbosstm/trunk/XTS/localjunit/tests/src/test/resources/arquillian.xml	                        (rev 0)
+++ labs/jbosstm/trunk/XTS/localjunit/tests/src/test/resources/arquillian.xml	2011-11-08 14:52:18 UTC (rev 37710)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian xmlns="http://jboss.org/schema/arquillian" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jboss.org/schema/arquillian
+	http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+	<!-- Example configuration for a remote JBoss AS 7 instance -->
+	<container qualifier="jboss-as" default="true">
+		<protocol type="jmx-as7">
+			<property name="executionType">REMOTE</property>
+		</protocol>
+		<configuration>
+			<property name="serverConfig">standalone-xts.xml</property>
+		</configuration>
+	</container>
+</arquillian>

Modified: labs/jbosstm/trunk/XTS/pom.xml
===================================================================
--- labs/jbosstm/trunk/XTS/pom.xml	2011-11-07 15:24:33 UTC (rev 37709)
+++ labs/jbosstm/trunk/XTS/pom.xml	2011-11-08 14:52:18 UTC (rev 37710)
@@ -39,10 +39,15 @@
   <modules>
     <module>WSAS</module>
     <module>WSAS/xts-test-servlet</module>
+    <module>WSAS/tests</module>
     <module>WS-C</module>
+	<module>WS-C/tests</module>
     <module>WSCF</module>
+	<module>WSCF/tests</module>
     <module>WS-T</module>
+	<module>WS-T/tests</module>
     <module>WSTX</module>
+	<module>WSTX/tests</module>
     <module>recovery</module>
     <module>bridge</module>
     <module>sar</module>



More information about the jboss-svn-commits mailing list