Author: maschmid
Date: 2012-02-29 04:07:43 -0500 (Wed, 29 Feb 2012)
New Revision: 14342
Added:
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml
Removed:
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/testng.xml
Modified:
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java
Log:
ee6 messages example integration tests arquillian conversion
Modified: branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml
===================================================================
--- branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml 2012-02-28
17:22:29 UTC (rev 14341)
+++ branches/community/Seam_2_3/examples-ee6/messages/messages-tests/pom.xml 2012-02-29
09:07:43 UTC (rev 14342)
@@ -14,28 +14,6 @@
<dependencies>
<dependency>
- <groupId>org.jboss.embedded</groupId>
- <artifactId>jboss-embedded-all</artifactId>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-deployers-client-spi</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.microcontainer</groupId>
- <artifactId>jboss-deployers-core-spi</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.embedded</groupId>
- <artifactId>thirdparty-all</artifactId>
- </dependency>
- <dependency>
- <groupId>org.jboss.seam.embedded</groupId>
- <artifactId>hibernate-all</artifactId>
- </dependency>
- <dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<classifier>jdk15</classifier>
@@ -48,24 +26,16 @@
</dependency>
<dependency>
<groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
+ <artifactId>jboss-seam-jsf2</artifactId>
<type>ejb</type>
<scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <scope>test</scope>
</dependency>
<dependency>
- <groupId>javax.faces</groupId>
+ <groupId>com.sun.faces</groupId>
<artifactId>jsf-api</artifactId>
+ <scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </dependency>
- <dependency>
<groupId>org.seleniumhq.selenium.server</groupId>
<artifactId>selenium-server</artifactId>
<classifier>standalone</classifier>
@@ -79,6 +49,24 @@
<artifactId>functional-tests</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.arquillian.junit</groupId>
+ <artifactId>arquillian-junit-container</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.arquillian.protocol</groupId>
+ <artifactId>arquillian-protocol-servlet</artifactId>
+ <scope>test</scope>
+ </dependency>
+
</dependencies>
<build>
@@ -88,8 +76,7 @@
<filtering>true</filtering>
</testResource>
<testResource>
- <directory>src/test/bootstrap</directory>
- <filtering>false</filtering>
+ <directory>src/test/resources-integration</directory>
</testResource>
</testResources>
<plugins>
@@ -97,47 +84,51 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <skipTests>false</skipTests>
- <argLine>-Dsun.lang.ClassLoader.allowArraySyntax=true -Xms512m
-Xmx512m</argLine>
- <additionalClasspathElements>
-
<additionalClasspathElement>${basedir}/../messages-web/src/main/webapp</additionalClasspathElement>
-
<additionalClasspathElement>${project.build.directory}/dependency/bootstrap</additionalClasspathElement>
- </additionalClasspathElements>
- <suiteXmlFiles>
-
<suiteXmlFile>src/test/resources-integration/testng.xml</suiteXmlFile>
- </suiteXmlFiles>
+ <skip>true</skip>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <executions>
- <execution>
- <id>copy-seam-bootstrap</id>
- <phase>process-resources</phase>
- <goals>
- <goal>unpack</goal>
- </goals>
- <configuration>
- <includes>bootstrap/**</includes>
- <artifactItems>
- <artifactItem>
- <groupId>org.jboss.seam</groupId>
-
<artifactId>jboss-embedded-bootstrap</artifactId>
- <version>${project.version}</version>
- <type>jar</type>
- <overWrite>false</overWrite>
- </artifactItem>
- </artifactItems>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
<profiles>
<profile>
+ <id>integration-tests</id>
+ <activation>
+ <property>
+ <name>arquillian</name>
+ </property>
+ </activation>
+ </profile>
+
+ <profile>
+ <id>arq-jbossas-7-managed</id>
+ <activation>
+ <property>
+ <name>arquillian</name>
+ <value>jbossas-managed-7</value>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+ <profile>
+ <id>arq-jbossas-7-remote</id>
+ <activation>
+ <property>
+ <name>arquillian</name>
+ <value>jbossas-remote-7</value>
+ </property>
+ </activation>
+ </profile>
+
+ <profile>
<id>ftest-jbossas</id>
<properties>
<example.context.path>seam-messages</example.context.path>
Modified:
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java
===================================================================
---
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java 2012-02-28
17:22:29 UTC (rev 14341)
+++
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/java/org/jboss/seam/example/messages/test/MessageListTest.java 2012-02-29
09:07:43 UTC (rev 14342)
@@ -2,11 +2,37 @@
package org.jboss.seam.example.messages.test;
import javax.faces.model.DataModel;
-import org.jboss.seam.mock.SeamTest;
-import org.testng.annotations.Test;
+import java.io.File;
-public class MessageListTest extends SeamTest
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.importer.ZipImporter;
+import org.jboss.shrinkwrap.api.spec.EnterpriseArchive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.OverProtocol;
+import org.jboss.arquillian.junit.Arquillian;
+
+import org.jboss.seam.mock.JUnitSeamTest;
+
+import org.junit.runner.RunWith;
+import org.junit.Test;
+
+(a)RunWith(Arquillian.class)
+public class MessageListTest extends JUnitSeamTest
{
+ @Deployment(name="MessageListTest")
+ @OverProtocol("Servlet 3.0")
+ public static Archive<?> createDeployment()
+ {
+ EnterpriseArchive er = ShrinkWrap.create(ZipImporter.class,
"seam-messages.ear").importFrom(new
File("../messages-ear/target/seam-messages.ear"))
+ .as(EnterpriseArchive.class);
+ WebArchive web = er.getAsType(WebArchive.class, "messages-web.war");
+ web.addClasses(MessageListTest.class);
+
+ return er;
+ }
+
@Test
public void testMessageList() throws Exception
{
Added:
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml
===================================================================
---
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml
(rev 0)
+++
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/arquillian.xml 2012-02-29
09:07:43 UTC (rev 14342)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<arquillian
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xmlns="http://jboss.org/schema/arquillian"
+
xsi:schemaLocation="http://jboss.org/schema/arquillian
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
+
+ <engine>
+ <property name="deploymentExportPath">target/</property>
+ </engine>
+
+ <container qualifier="jboss" default="true">
+ <configuration>
+ <property name="javaVmArguments">-Xmx1024m
-XX:MaxPermSize=512m</property>
+ <property
name="jbossHome">target/jboss-as-${version.jbossas7}</property>
+ </configuration>
+ </container>
+
+</arquillian>
Deleted:
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/testng.xml
===================================================================
---
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/testng.xml 2012-02-28
17:22:29 UTC (rev 14341)
+++
branches/community/Seam_2_3/examples-ee6/messages/messages-tests/src/test/resources-integration/testng.xml 2012-02-29
09:07:43 UTC (rev 14342)
@@ -1,11 +0,0 @@
-<!DOCTYPE suite SYSTEM "http://beust.com/testng/testng-1.0.dtd" >
-
-<suite name="Messages" verbose="2" parallel="false">
-
- <test name="MessageList">
- <classes>
- <class
name="org.jboss.seam.example.messages.test.MessageListTest"/>
- </classes>
- </test>
-
-</suite>
\ No newline at end of file