You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by jg...@apache.org on 2019/01/03 16:51:35 UTC

[tomee] branch master updated (0b6945c -> 4dca0f8)

This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git.


    from 0b6945c  Merge pull request #348 from doychin/use-base-version
     new 34315c9  WIP start setting up some tests for the MVC-CXF application
     new 573272e  Basic Selenium happy-path test
     new 1546bbb  WIP - flipping to cucumber test
     new 4dca0f8  Switching to cucumber

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 examples/mvc-cxf/pom.xml                           |  48 +++++++++-
 .../src/test/java/org/superbiz/mvc/MvcTest.java    | 102 +++++++++++++++++++++
 .../src/test/resources/arquillian.xml              |   0
 .../test/resources/org/superbiz/mvc/mvc.feature    |   7 ++
 4 files changed, 156 insertions(+), 1 deletion(-)
 create mode 100644 examples/mvc-cxf/src/test/java/org/superbiz/mvc/MvcTest.java
 copy examples/{mvc-resteasy => mvc-cxf}/src/test/resources/arquillian.xml (100%)
 create mode 100644 examples/mvc-cxf/src/test/resources/org/superbiz/mvc/mvc.feature


[tomee] 04/04: Switching to cucumber

Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit 4dca0f8a936d65b27d761ab5ba48f54c790a14fb
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Thu Jan 3 16:30:52 2019 +0000

    Switching to cucumber
---
 .../src/test/java/org/superbiz/mvc/MvcTest.java    | 102 +++++++++++++++++++++
 1 file changed, 102 insertions(+)

diff --git a/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MvcTest.java b/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MvcTest.java
new file mode 100644
index 0000000..568e763
--- /dev/null
+++ b/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MvcTest.java
@@ -0,0 +1,102 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.mvc;
+
+import cucumber.api.CucumberOptions;
+import cucumber.api.java.en.Given;
+import cucumber.api.java.en.Then;
+import cucumber.api.java.en.When;
+import cucumber.runtime.arquillian.ArquillianCucumber;
+import cucumber.runtime.arquillian.api.Features;
+import org.apache.ziplock.maven.Mvn;
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.drone.api.annotation.Drone;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.Archive;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.junit.runner.RunWith;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.Select;
+
+import java.net.URL;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+@RunWith(ArquillianCucumber.class)
+@Features("org/superbiz/mvc/mvc.feature")
+@CucumberOptions(strict = true)
+@RunAsClient
+public class MvcTest {
+
+    @ArquillianResource
+    private URL base;
+
+    @Drone
+    private WebDriver webDriver;
+
+    @Deployment
+    public static WebArchive createDeployment() {
+
+        final Archive<?> war = Mvn.war();
+        System.out.println(war.toString(true));
+        return (WebArchive) war;
+    }
+
+    @Given("^I navigate to the new user screen$")
+    public void navigateToNewUserScreen() {
+        webDriver.get(this.base.toExternalForm() + "app/home");
+        webDriver.findElement(By.linkText("Peoples")).click();
+        webDriver.findElement(By.linkText("Add Registres")).click();
+    }
+
+    @When("^I submit a new user with name: (.*?) age: (\\d+) country: (.*?) state: (.*?) server: (.*?) description: (.*?)$")
+    public void submitNewUser(final String name, final Integer age, final String country, final String state, final String server, final String description) {
+        webDriver.findElement(By.id("name")).click();
+        webDriver.findElement(By.id("name")).clear();
+        webDriver.findElement(By.id("name")).sendKeys(name);
+        webDriver.findElement(By.id("age")).clear();
+        webDriver.findElement(By.id("age")).sendKeys(age.toString());
+        webDriver.findElement(By.id("state")).clear();
+        webDriver.findElement(By.id("state")).sendKeys(state);
+        webDriver.findElement(By.xpath("//input[@name='server'][@value='" + server + "']")).click();
+        webDriver.findElement(By.id("country")).click();
+        new Select(webDriver.findElement(By.id("country"))).selectByVisibleText(country);
+        webDriver.findElement(By.id("description")).click();
+        webDriver.findElement(By.id("description")).clear();
+        webDriver.findElement(By.id("description")).sendKeys(description);
+        webDriver.findElement(By.xpath("(.//*[normalize-space(text()) and normalize-space(.)='Description:'])[1]/following::button[1]")).click();
+    }
+
+    @Then("^The user should be added: (.*?) age: (\\d+) country: (.*?) state: (.*?) server: (.*?) description: (.*?)$")
+    public void userShouldBeAdded(final String name, final Integer age, final String country, final String state, final String server, final String description) {
+        final WebElement element = webDriver.findElement(By.id("success-alert"));
+        assertNotNull(element);
+        assertTrue(element.getText().contains("Joe Bloggs was successfully registered"));
+
+        assertEquals(name, webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[1]")).getText());
+        assertEquals(age.toString(), webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[2]")).getText());
+        assertEquals(country, webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[3]")).getText());
+        assertEquals(state, webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[4]")).getText());
+        assertEquals(server, webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[5]")).getText());
+        assertEquals(description, webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[6]")).getText());
+    }
+}
\ No newline at end of file


[tomee] 02/04: Basic Selenium happy-path test

Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit 573272e4412484d30cee88b1306df9926e7e3fd9
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Thu Jan 3 14:58:13 2019 +0000

    Basic Selenium happy-path test
---
 examples/mvc-cxf/pom.xml                           |  7 ++-
 .../src/test/java/org/superbiz/mvc/MVCTest.java    | 67 +++++++++++++---------
 2 files changed, 47 insertions(+), 27 deletions(-)

diff --git a/examples/mvc-cxf/pom.xml b/examples/mvc-cxf/pom.xml
index 6f1afb7..2653c67 100644
--- a/examples/mvc-cxf/pom.xml
+++ b/examples/mvc-cxf/pom.xml
@@ -162,7 +162,12 @@
         </exclusion>
       </exclusions>
     </dependency>
-
+    <dependency>
+      <groupId>org.apache.tomee</groupId>
+      <artifactId>ziplock</artifactId>
+      <version>8.0.0-SNAPSHOT</version>
+      <scope>test</scope>
+    </dependency>
   </dependencies>
 
   <!--
diff --git a/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MVCTest.java b/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MVCTest.java
index cd54922..ac51143 100644
--- a/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MVCTest.java
+++ b/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MVCTest.java
@@ -16,26 +16,26 @@
  */
 package org.superbiz.mvc;
 
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.net.URL;
-
+import org.apache.ziplock.maven.Mvn;
 import org.jboss.arquillian.container.test.api.Deployment;
 import org.jboss.arquillian.container.test.api.RunAsClient;
 import org.jboss.arquillian.drone.api.annotation.Drone;
 import org.jboss.arquillian.junit.Arquillian;
 import org.jboss.arquillian.test.api.ArquillianResource;
-import org.jboss.shrinkwrap.api.ShrinkWrap;
-import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.Archive;
 import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.jboss.shrinkwrap.resolver.api.maven.Maven;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.openqa.selenium.By;
 import org.openqa.selenium.WebDriver;
 import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.Select;
+
+import java.net.URL;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 
 @RunWith(Arquillian.class)
 public class MVCTest {
@@ -48,27 +48,42 @@ public class MVCTest {
 
     @Deployment
     public static WebArchive createDeployment() {
-        File[] files = Maven.resolver()
-                            .loadPomFromFile("pom.xml")
-                            .importRuntimeDependencies()
-                            .resolve()
-                            .withTransitivity()
-                            .asFile();
 
-        return ShrinkWrap.create(WebArchive.class, "test.war")
-                         .addPackages(true, "org.superbiz.mvc")
-                         .addAsLibraries(files)
-                         .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
-                         .addAsWebInfResource(new File("src/main/webapp/WEB-INF/web.xml"), "/web.xml")
-                         .addAsWebInfResource(new File("src/main/webapp/WEB-INF/views/hello.jsp"), "/views/hello.jsp");
+        final Archive<?> war = Mvn.war();
+        System.out.println(war.toString(true));
+        return (WebArchive) war;
     }
 
     @Test
     @RunAsClient
-    public void test() {
-        webDriver.get(this.base.toExternalForm() + "app/hello?name=TomEE");
-        WebElement h1 = webDriver.findElement(By.tagName("h1"));
-        assertNotNull(h1);
-        assertTrue(h1.getText().contains("Welcome TomEE !"));
+    public void testAssertUserCanBeAdded() throws Exception {
+        webDriver.get(this.base.toExternalForm() + "app/home");
+        webDriver.findElement(By.linkText("Peoples")).click();
+        webDriver.findElement(By.linkText("Add Registres")).click();
+        webDriver.findElement(By.id("name")).click();
+        webDriver.findElement(By.id("name")).clear();
+        webDriver.findElement(By.id("name")).sendKeys("Joe Bloggs");
+        webDriver.findElement(By.id("age")).clear();
+        webDriver.findElement(By.id("age")).sendKeys("42");
+        webDriver.findElement(By.id("state")).clear();
+        webDriver.findElement(By.id("state")).sendKeys("California");
+        webDriver.findElement(By.name("server")).click();
+        webDriver.findElement(By.id("country")).click();
+        new Select(webDriver.findElement(By.id("country"))).selectByVisibleText("United States");
+        webDriver.findElement(By.id("description")).click();
+        webDriver.findElement(By.id("description")).clear();
+        webDriver.findElement(By.id("description")).sendKeys("This is a test");
+        webDriver.findElement(By.xpath("(.//*[normalize-space(text()) and normalize-space(.)='Description:'])[1]/following::button[1]")).click();
+
+        final WebElement element = webDriver.findElement(By.id("success-alert"));
+        assertNotNull(element);
+        assertTrue(element.getText().contains("Joe Bloggs was successfully registered"));
+
+        assertEquals("Joe Bloggs", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[1]")).getText());
+        assertEquals("42", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[2]")).getText());
+        assertEquals("United States", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[3]")).getText());
+        assertEquals("California", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[4]")).getText());
+        assertEquals("TomEE", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[5]")).getText());
+        assertEquals("This is a test", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[6]")).getText());
     }
 }
\ No newline at end of file


[tomee] 03/04: WIP - flipping to cucumber test

Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit 1546bbbd4740b121d8e4659859e985e46d93d25d
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Thu Jan 3 16:30:18 2019 +0000

    WIP - flipping to cucumber test
---
 .../src/test/java/org/superbiz/mvc/MVCTest.java    | 89 ----------------------
 .../test/resources/org/superbiz/mvc/mvc.feature    |  7 ++
 2 files changed, 7 insertions(+), 89 deletions(-)

diff --git a/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MVCTest.java b/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MVCTest.java
deleted file mode 100644
index ac51143..0000000
--- a/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MVCTest.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- * <p/>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p/>
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.superbiz.mvc;
-
-import org.apache.ziplock.maven.Mvn;
-import org.jboss.arquillian.container.test.api.Deployment;
-import org.jboss.arquillian.container.test.api.RunAsClient;
-import org.jboss.arquillian.drone.api.annotation.Drone;
-import org.jboss.arquillian.junit.Arquillian;
-import org.jboss.arquillian.test.api.ArquillianResource;
-import org.jboss.shrinkwrap.api.Archive;
-import org.jboss.shrinkwrap.api.spec.WebArchive;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.ui.Select;
-
-import java.net.URL;
-
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-@RunWith(Arquillian.class)
-public class MVCTest {
-
-    @ArquillianResource
-    private URL base;
-
-    @Drone
-    private WebDriver webDriver;
-
-    @Deployment
-    public static WebArchive createDeployment() {
-
-        final Archive<?> war = Mvn.war();
-        System.out.println(war.toString(true));
-        return (WebArchive) war;
-    }
-
-    @Test
-    @RunAsClient
-    public void testAssertUserCanBeAdded() throws Exception {
-        webDriver.get(this.base.toExternalForm() + "app/home");
-        webDriver.findElement(By.linkText("Peoples")).click();
-        webDriver.findElement(By.linkText("Add Registres")).click();
-        webDriver.findElement(By.id("name")).click();
-        webDriver.findElement(By.id("name")).clear();
-        webDriver.findElement(By.id("name")).sendKeys("Joe Bloggs");
-        webDriver.findElement(By.id("age")).clear();
-        webDriver.findElement(By.id("age")).sendKeys("42");
-        webDriver.findElement(By.id("state")).clear();
-        webDriver.findElement(By.id("state")).sendKeys("California");
-        webDriver.findElement(By.name("server")).click();
-        webDriver.findElement(By.id("country")).click();
-        new Select(webDriver.findElement(By.id("country"))).selectByVisibleText("United States");
-        webDriver.findElement(By.id("description")).click();
-        webDriver.findElement(By.id("description")).clear();
-        webDriver.findElement(By.id("description")).sendKeys("This is a test");
-        webDriver.findElement(By.xpath("(.//*[normalize-space(text()) and normalize-space(.)='Description:'])[1]/following::button[1]")).click();
-
-        final WebElement element = webDriver.findElement(By.id("success-alert"));
-        assertNotNull(element);
-        assertTrue(element.getText().contains("Joe Bloggs was successfully registered"));
-
-        assertEquals("Joe Bloggs", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[1]")).getText());
-        assertEquals("42", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[2]")).getText());
-        assertEquals("United States", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[3]")).getText());
-        assertEquals("California", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[4]")).getText());
-        assertEquals("TomEE", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[5]")).getText());
-        assertEquals("This is a test", webDriver.findElement(By.xpath("//*[@id=\"tableData\"]/tbody/tr[1]/td[6]")).getText());
-    }
-}
\ No newline at end of file
diff --git a/examples/mvc-cxf/src/test/resources/org/superbiz/mvc/mvc.feature b/examples/mvc-cxf/src/test/resources/org/superbiz/mvc/mvc.feature
new file mode 100644
index 0000000..37e9b08
--- /dev/null
+++ b/examples/mvc-cxf/src/test/resources/org/superbiz/mvc/mvc.feature
@@ -0,0 +1,7 @@
+Feature: Add User
+
+  Scenario: Add User Happy Path
+
+    Given I navigate to the new user screen
+    When I submit a new user with name: Joe Bloggs age: 42 country: United States state: California server: TomEE description: This is a test
+    Then The user should be added: Joe Bloggs age: 42 country: United States state: California server: TomEE description: This is a test


[tomee] 01/04: WIP start setting up some tests for the MVC-CXF application

Posted by jg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jgallimore pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomee.git

commit 34315c9d450d1a47422dbb0b37f664be3762fe5f
Author: Jonathan Gallimore <jo...@jrg.me.uk>
AuthorDate: Thu Jan 3 09:37:38 2019 +0000

    WIP start setting up some tests for the MVC-CXF application
---
 examples/mvc-cxf/pom.xml                           | 43 ++++++++++++-
 .../src/test/java/org/superbiz/mvc/MVCTest.java    | 74 ++++++++++++++++++++++
 examples/mvc-cxf/src/test/resources/arquillian.xml | 31 +++++++++
 3 files changed, 147 insertions(+), 1 deletion(-)

diff --git a/examples/mvc-cxf/pom.xml b/examples/mvc-cxf/pom.xml
index c0f5bb2..6f1afb7 100644
--- a/examples/mvc-cxf/pom.xml
+++ b/examples/mvc-cxf/pom.xml
@@ -35,7 +35,9 @@
     <tomee.version>8.0.0-SNAPSHOT</tomee.version>
     <version.deltaspike>1.9.0</version.deltaspike>
     <version.ozark>1.0.0-m04</version.ozark>
-  </properties>
+    <version.arquillian>1.1.13.Final</version.arquillian>
+    <version.graphene.webdriver>2.3.1</version.graphene.webdriver>
+   </properties>
 
   <build>
     <finalName>mvc-cxf</finalName>
@@ -122,6 +124,45 @@
       <artifactId>eclipselink</artifactId>
       <version>2.6.3</version>     
     </dependency>
+
+     <!--  tests  -->
+     <dependency>
+      <groupId>org.jboss.arquillian.junit</groupId>
+      <artifactId>arquillian-junit-container</artifactId>
+      <version>${version.arquillian}</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.tomee</groupId>
+      <artifactId>arquillian-tomee-remote</artifactId>
+      <version>${tomee.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.jboss.arquillian.graphene</groupId>
+      <artifactId>graphene-webdriver</artifactId>
+      <version>${version.graphene.webdriver}</version>
+      <type>pom</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>4.11</version>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>com.github.cukespace</groupId>
+      <artifactId>cukespace-core</artifactId>
+      <version>1.6.7</version>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId>org.jboss.shrinkwrap</groupId>
+          <artifactId>shrinkwrap-api</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
   </dependencies>
 
   <!--
diff --git a/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MVCTest.java b/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MVCTest.java
new file mode 100644
index 0000000..cd54922
--- /dev/null
+++ b/examples/mvc-cxf/src/test/java/org/superbiz/mvc/MVCTest.java
@@ -0,0 +1,74 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ * <p/>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p/>
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.superbiz.mvc;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.net.URL;
+
+import org.jboss.arquillian.container.test.api.Deployment;
+import org.jboss.arquillian.container.test.api.RunAsClient;
+import org.jboss.arquillian.drone.api.annotation.Drone;
+import org.jboss.arquillian.junit.Arquillian;
+import org.jboss.arquillian.test.api.ArquillianResource;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.EmptyAsset;
+import org.jboss.shrinkwrap.api.spec.WebArchive;
+import org.jboss.shrinkwrap.resolver.api.maven.Maven;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+
+@RunWith(Arquillian.class)
+public class MVCTest {
+
+    @ArquillianResource
+    private URL base;
+
+    @Drone
+    private WebDriver webDriver;
+
+    @Deployment
+    public static WebArchive createDeployment() {
+        File[] files = Maven.resolver()
+                            .loadPomFromFile("pom.xml")
+                            .importRuntimeDependencies()
+                            .resolve()
+                            .withTransitivity()
+                            .asFile();
+
+        return ShrinkWrap.create(WebArchive.class, "test.war")
+                         .addPackages(true, "org.superbiz.mvc")
+                         .addAsLibraries(files)
+                         .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml")
+                         .addAsWebInfResource(new File("src/main/webapp/WEB-INF/web.xml"), "/web.xml")
+                         .addAsWebInfResource(new File("src/main/webapp/WEB-INF/views/hello.jsp"), "/views/hello.jsp");
+    }
+
+    @Test
+    @RunAsClient
+    public void test() {
+        webDriver.get(this.base.toExternalForm() + "app/hello?name=TomEE");
+        WebElement h1 = webDriver.findElement(By.tagName("h1"));
+        assertNotNull(h1);
+        assertTrue(h1.getText().contains("Welcome TomEE !"));
+    }
+}
\ No newline at end of file
diff --git a/examples/mvc-cxf/src/test/resources/arquillian.xml b/examples/mvc-cxf/src/test/resources/arquillian.xml
new file mode 100644
index 0000000..f792b09
--- /dev/null
+++ b/examples/mvc-cxf/src/test/resources/arquillian.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<!--
+
+    Licensed to the Apache Software Foundation (ASF) under one or more
+    contributor license agreements.  See the NOTICE file distributed with
+    this work for additional information regarding copyright ownership.
+    The ASF licenses this file to You under the Apache License, Version 2.0
+    (the "License"); you may not use this file except in compliance with
+    the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<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">
+        <container qualifier="tomee" default="true">
+            <configuration>
+               <property name="httpPort">-1</property>
+               <property name="stopPort">-1</property>
+               <property name="ajpPort">-1</property>
+               <property name="dir">target/tomee</property>
+               <property name="appWorkingDir">target/arquillian-dump-dir</property>
+            </configuration>
+        </container>
+</arquillian>