Author: objectiser
Date: 2009-10-16 13:51:15 -0400 (Fri, 16 Oct 2009)
New Revision: 180
Added:
branches/IntegrationTests/RiftSaw-2.0-M1/integration-tests/
branches/IntegrationTests/RiftSaw-2.0-M1/integration-tests/build.xml
branches/IntegrationTests/RiftSaw-2.0-M1/integration-tests/pom.xml
Log:
Initial integration test structure - still needs alot of work. AS server location needs to
be manually setup in the distributon/src/main/release/install/deployment.properties and
the system prop riftsaw.test.dir needs to be supplied as the parent folder containing the
AS and ESB environments. It currently deploys the build, starts the server, and then runs
a single test based on the hello world example, before stopping the server and undeploying
riftsaw. Need to also download the AS and ESB distributions before it all starts.
Added: branches/IntegrationTests/RiftSaw-2.0-M1/integration-tests/build.xml
===================================================================
--- branches/IntegrationTests/RiftSaw-2.0-M1/integration-tests/build.xml
(rev 0)
+++ branches/IntegrationTests/RiftSaw-2.0-M1/integration-tests/build.xml 2009-10-16
17:51:15 UTC (rev 180)
@@ -0,0 +1,84 @@
+<project name="integration-tests" basedir=".">
+
+ <property environment="env" />
+ <property name="riftsaw.engine.version" value="2.0-M1" />
+
+ <target name="unpack-distribution">
+ <mkdir dir="${basedir}/../distribution/target/dist"/>
+ <unzip dest="${basedir}/../distribution/target/dist"
src="${basedir}/../distribution/target/riftsaw-${riftsaw.engine.version}.zip"/>
+ </target>
+
+ <target name="deploy-riftsaw" >
+ <ant
antfile="${basedir}/../distribution/target/dist/riftsaw-${riftsaw.engine.version}/install/build.xml"
+ target="deploy"
+ dir="${basedir}/../distribution/target/dist/riftsaw-${riftsaw.engine.version}/install"
/>
+ </target>
+
+ <target name="undeploy-riftsaw" >
+ <ant
antfile="${basedir}/../distribution/target/dist/riftsaw-${riftsaw.engine.version}/install/build.xml"
+ target="undeploy"
+ dir="${basedir}/../distribution/target/dist/riftsaw-${riftsaw.engine.version}/install"
/>
+ </target>
+
+ <target name="start-server" >
+
+ <java classname="org.jboss.Main"
+ fork="true" spawn="true"
+ dir="${riftsaw.jboss.home}/server/default" >
+ <arg line="-c default"/>
+ <jvmarg value="-Xms128m"/>
+ <jvmarg value="-Xmx512m"/>
+ <jvmarg value="-XX:MaxPermSize=256m"/>
+ <classpath>
+ <pathelement path="${riftsaw.jboss.home}/bin/run.jar"/>
+ <pathelement path="${JAVA_HOME}/lib/tools.jar"/>
+ </classpath>
+ </java>
+
+ <echo>Starting the server</echo>
+
+ <waitfor maxwait="2" maxwaitunit="minute">
+ <socket server="localhost" port="1099"/>
+ </waitfor>
+
+ <echo>JNP port detected, just waiting for 1 min 30 secs to ensure server
started</echo>
+
+ <sleep minutes="1" seconds="30" />
+
+ <echo>Server has started</echo>
+
+ </target>
+
+ <target name="stop-server" >
+ <echo>Stopping the server</echo>
+ <echo>Server is at ${riftsaw.jboss.home}</echo>
+
+ <java classname="org.jboss.Shutdown" fork="true"
failonerror="false" resultproperty="shutdown.rc">
+ <arg line="-s jnp://localhost:1099 --shutdown"/>
+ <classpath>
+ <pathelement
path="${riftsaw.jboss.home}/bin/shutdown.jar"/>
+ <pathelement
path="${riftsaw.jboss.home}/client/jbossall-client.jar"/>
+ <pathelement path="${JAVA_HOME}/lib/tools.jar"/>
+ </classpath>
+ </java>
+ <echo>Shutdown rc = ${shutdown.rc}</echo>
+ <condition property="shutdown.okay">
+ <equals arg1="${shutdown.rc}" arg2="0"/>
+ </condition>
+ <fail unless="shutdown.okay" message="Unable to shut down JBoss
(maybe it hasn't fully started yet?)."/>
+ <echo>Waiting for JNP to stop listening...</echo>
+ <waitfor maxwait="2" maxwaitunit="minute">
+ <not>
+ <socket server="localhost" port="1099"/>
+ </not>
+ </waitfor>
+ </target>
+
+ <target name="package-tests" >
+ <echo>Package tests...</echo>
+
+ <mkdir dir="target/tests"/>
+
+ <ant
antfile="src/test/resources/samples/Quickstart_bpel_hello_world/build.xml"></ant>
+ </target>
+</project>
Added: branches/IntegrationTests/RiftSaw-2.0-M1/integration-tests/pom.xml
===================================================================
--- branches/IntegrationTests/RiftSaw-2.0-M1/integration-tests/pom.xml
(rev 0)
+++ branches/IntegrationTests/RiftSaw-2.0-M1/integration-tests/pom.xml 2009-10-16 17:51:15
UTC (rev 180)
@@ -0,0 +1,273 @@
+<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">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.jboss.soa.bpel</groupId>
+ <artifactId>integration-tests</artifactId>
+ <packaging>pom</packaging>
+ <version>2.0-SNAPSHOT</version>
+ <name>RiftSaw::Integration-Tests</name>
+
+ <parent>
+ <groupId>org.jboss.soa</groupId>
+ <artifactId>bpel</artifactId>
+ <version>2.0-SNAPSHOT</version>
+ </parent>
+
+ <properties>
+ <jboss.jbosssx.version>2.0.2.SP3</jboss.jbosssx.version>
+ <jboss.common.version>1.2.1.GA</jboss.common.version>
+ <jboss.version>jboss-5.1.0.GA</jboss.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jbosssx</artifactId>
+ <scope>test</scope>
+ <version>${jboss.jbosssx.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.security</groupId>
+ <artifactId>jboss-security-spi</artifactId>
+ <scope>test</scope>
+ <version>${jboss.jbosssx.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss</groupId>
+ <artifactId>jbossxb</artifactId>
+ <scope>test</scope>
+ <version>1.0.0.SP2</version>
+ </dependency>
+ <dependency>
+ <groupId>jboss.common</groupId>
+ <artifactId>jboss-common</artifactId>
+ <version>${jboss.common.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.integration</groupId>
+ <artifactId>jboss-integration</artifactId>
+ <version>5.1.0.GA</version>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>concurrent</groupId>
+ <artifactId>concurrent</artifactId>
+ <version>1.3.4</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.logging</groupId>
+ <artifactId>jboss-logging-spi</artifactId>
+ <version>2.1.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.rstmp</groupId>
+ <artifactId>jboss-client</artifactId>
+ <version>5.1.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.rstmp</groupId>
+ <artifactId>jboss-serialization</artifactId>
+ <version>5.1.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.rstmp</groupId>
+ <artifactId>jboss-common-core</artifactId>
+ <version>5.1.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.rstmp</groupId>
+ <artifactId>jboss-javaee</artifactId>
+ <version>5.1.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.rstmp</groupId>
+ <artifactId>jboss-remoting</artifactId>
+ <version>5.1.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.rstmp</groupId>
+ <artifactId>jmx-invoker-adaptor-client</artifactId>
+ <version>5.1.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.rstmp</groupId>
+ <artifactId>jnp-client</artifactId>
+ <version>5.1.0.GA</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.3</version>
+ <executions>
+ <execution>
+ <id>deploy-riftsaw</id>
+ <phase>pre-integration-test</phase>
+ <configuration>
+ <tasks>
+ <property name="compile_classpath"
refid="maven.compile.classpath" />
+ <property name="runtime_classpath"
refid="maven.runtime.classpath" />
+ <property name="test_classpath"
refid="maven.test.classpath" />
+ <property name="plugin_classpath"
refid="maven.plugin.classpath" />
+ <property name="project.version"
value="${project.version}" />
+ <property name="riftsaw.jboss.home"
value="${riftsaw.test.dir}/${jboss.version}" />
+ <property name="dependency.bpel.deployer"
+
value="${maven.dependency.org.jboss.soa.bpel.runtime.deployer.jar.path}" />
+ <property name="dependency.bpel.engine"
+
value="${maven.dependency.org.jboss.soa.bpel.runtime.engine.jar.path}" />
+ <property name="dependency.bpel.jb-bpel-store"
+
value="${maven.dependency.org.jboss.soa.bpel.runtime.jb-bpel-store.jar.path}"
/>
+ <ant antfile="${basedir}/build.xml">
+ <target name="unpack-distribution" />
+ </ant>
+
+ <!-- Cleanup test environment in case of previous failure -->
+ <!--
+ <ant antfile="${basedir}/build.xml">
+ <target name="undeploy-riftsaw" />
+ </ant>
+ -->
+ <ant antfile="${basedir}/build.xml">
+ <target name="deploy-riftsaw" />
+ </ant>
+ <ant antfile="${basedir}/build.xml">
+ <target name="start-server" />
+ </ant>
+ <ant antfile="${basedir}/build.xml">
+ <target name="package-tests" />
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ <execution>
+ <id>undeploy-riftsaw</id>
+ <phase>post-integration-test</phase>
+ <configuration>
+ <tasks>
+ <property name="compile_classpath"
refid="maven.compile.classpath" />
+ <property name="runtime_classpath"
refid="maven.runtime.classpath" />
+ <property name="test_classpath"
refid="maven.test.classpath" />
+ <property name="plugin_classpath"
refid="maven.plugin.classpath" />
+ <property name="project.version"
value="${project.version}" />
+ <property name="riftsaw.jboss.home"
value="${riftsaw.test.dir}/${jboss.version}" />
+ <property name="dependency.bpel.deployer"
+
value="${maven.dependency.org.jboss.soa.bpel.runtime.deployer.jar.path}" />
+ <property name="dependency.bpel.engine"
+
value="${maven.dependency.org.jboss.soa.bpel.runtime.engine.jar.path}" />
+ <property name="dependency.bpel.jb-bpel-store"
+
value="${maven.dependency.org.jboss.soa.bpel.runtime.jb-bpel-store.jar.path}"
/>
+ <ant antfile="${basedir}/build.xml">
+ <target name="stop-server" />
+ </ant>
+ <ant antfile="${basedir}/build.xml">
+ <target name="undeploy-riftsaw" />
+ </ant>
+ <!--
+ -->
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>compiler-it</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>testCompile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>test.dir</name>
+ <value>${basedir}/target/tests</value>
+ </property>
+ <property>
+ <name>java.naming.factory.initial</name>
+ <value>org.jnp.interfaces.NamingContextFactory</value>
+ </property>
+ <property>
+ <name>java.naming.factory.url.pkgs</name>
+ <value>org.jboss.naming:org.jnp.interfaces</value>
+ </property>
+ <property>
+ <name>java.naming.provider.url</name>
+ <value>jnp://localhost:1099</value>
+ </property>
+ <property>
+ <name>java.rmi.server.ignoreStubClasses</name>
+ <value>true</value>
+ </property>
+ </systemProperties>
+ <testFailureIgnore>true</testFailureIgnore>
+ <includes>
+ <include>**/*TestCase.java</include>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration>
+ <executions>
+ <execution>
+ <id>test-riftsaw</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+ <reporting>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+
+</project>
+