Author: veithen
Date: Mon May 30 11:54:13 2016
New Revision: 1746109

URL: http://svn.apache.org/viewvc?rev=1746109&view=rev
Log:
Add a minimal integration test for the webapp.

Added:
    axis/axis2/java/core/trunk/systests/
    axis/axis2/java/core/trunk/systests/pom.xml   (with props)
    axis/axis2/java/core/trunk/systests/webapp-tests/   (with props)
    axis/axis2/java/core/trunk/systests/webapp-tests/pom.xml   (with props)
    axis/axis2/java/core/trunk/systests/webapp-tests/src/
    axis/axis2/java/core/trunk/systests/webapp-tests/src/test/
    axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/
    axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/org/
    axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/org/apache/
    
axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/org/apache/axis2/
    
axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/org/apache/axis2/webapp/
    
axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/org/apache/axis2/webapp/WebappITCase.java
   (with props)
Modified:
    axis/axis2/java/core/trunk/modules/webapp/pom.xml
    axis/axis2/java/core/trunk/pom.xml

Modified: axis/axis2/java/core/trunk/modules/webapp/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/webapp/pom.xml?rev=1746109&r1=1746108&r2=1746109&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/webapp/pom.xml (original)
+++ axis/axis2/java/core/trunk/modules/webapp/pom.xml Mon May 30 11:54:13 2016
@@ -308,7 +308,6 @@
             <plugin>
                 <groupId>org.mortbay.jetty</groupId>
                 <artifactId>jetty-maven-plugin</artifactId>
-                <version>8.1.16.v20140903</version>
                 <configuration>
                     <webXml>conf/web.xml</webXml>
                     <contextXml>conf/jetty.xml</contextXml>

Modified: axis/axis2/java/core/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/pom.xml?rev=1746109&r1=1746108&r2=1746109&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/pom.xml (original)
+++ axis/axis2/java/core/trunk/pom.xml Mon May 30 11:54:13 2016
@@ -98,6 +98,7 @@
         <module>modules/distribution</module>
         <module>modules/samples</module>
         <module>databinding-tests</module>
+        <module>systests</module>
     </modules>
     <profiles>
         <profile>
@@ -1217,6 +1218,11 @@
                     <artifactId>jaxws-maven-plugin</artifactId>
                     <version>2.4.1</version>
                 </plugin>
+                <plugin>
+                    <groupId>org.mortbay.jetty</groupId>
+                    <artifactId>jetty-maven-plugin</artifactId>
+                    <version>8.1.16.v20140903</version>
+                </plugin>
                 
                 <!-- Use 1.5.2 versions of the aar and mar plugins in order to 
avoid
                      the chicken and egg problem. -->

Added: axis/axis2/java/core/trunk/systests/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/systests/pom.xml?rev=1746109&view=auto
==============================================================================
--- axis/axis2/java/core/trunk/systests/pom.xml (added)
+++ axis/axis2/java/core/trunk/systests/pom.xml Mon May 30 11:54:13 2016
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+<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>
+    <parent>
+        <groupId>org.apache.axis2</groupId>
+        <artifactId>axis2</artifactId>
+        <version>1.8.0-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>systests</artifactId>
+    <packaging>pom</packaging>
+    <url>http://axis.apache.org/axis2/java/core/</url>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-deploy-plugin</artifactId>
+                <configuration>
+                    <skip>true</skip>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+    
+    <modules>
+        <module>webapp-tests</module>
+    </modules>
+</project>

Propchange: axis/axis2/java/core/trunk/systests/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: axis/axis2/java/core/trunk/systests/webapp-tests/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon May 30 11:54:13 2016
@@ -0,0 +1,4 @@
+.classpath
+.project
+.settings
+target

Added: axis/axis2/java/core/trunk/systests/webapp-tests/pom.xml
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/systests/webapp-tests/pom.xml?rev=1746109&view=auto
==============================================================================
--- axis/axis2/java/core/trunk/systests/webapp-tests/pom.xml (added)
+++ axis/axis2/java/core/trunk/systests/webapp-tests/pom.xml Mon May 30 
11:54:13 2016
@@ -0,0 +1,168 @@
+<?xml version="1.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
+  ~
+  ~ 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.
+  -->
+<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>
+    <parent>
+        <groupId>org.apache.axis2</groupId>
+        <artifactId>systests</artifactId>
+        <version>1.8.0-SNAPSHOT</version>
+    </parent>
+    <artifactId>webapp-tests</artifactId>
+    <url>http://axis.apache.org/axis2/java/core/</url>
+    <dependencies>
+        <dependency>
+            <groupId>${project.groupId}</groupId>
+            <artifactId>axis2-webapp</artifactId>
+            <version>${project.version}</version>
+            <type>war</type>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>net.sourceforge.jwebunit</groupId>
+            <artifactId>jwebunit-htmlunit-plugin</artifactId>
+            <version>3.3</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-jdk14</artifactId>
+            <version>1.6.6</version>
+            <scope>test</scope>
+        </dependency>
+    </dependencies>
+    <!-- htmlunit requires newer versions of certain libraries -->
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpclient</artifactId>
+                <version>4.5</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.httpcomponents</groupId>
+                <artifactId>httpcore</artifactId>
+                <version>4.4.1</version>
+            </dependency>
+            <dependency>
+                <groupId>commons-io</groupId>
+                <artifactId>commons-io</artifactId>
+                <version>2.4</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>com.github.veithen.alta</groupId>
+                <artifactId>alta-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>generate-properties</goal>
+                        </goals>
+                        <configuration>
+                            <name>webapp</name>
+                            <value>%file%</value>
+                            <artifacts>
+                                <artifact>
+                                    <groupId>${project.groupId}</groupId>
+                                    <artifactId>axis2-webapp</artifactId>
+                                    <type>war</type>
+                                </artifact>
+                            </artifacts>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.codehaus.mojo</groupId>
+                <artifactId>build-helper-maven-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>reserve-network-port</id>
+                        <goals>
+                            <goal>reserve-network-port</goal>
+                        </goals>
+                        <phase>pre-integration-test</phase>
+                        <configuration>
+                            <portNames>
+                                <portName>jetty.stopPort</portName>
+                                <portName>jetty.httpPort</portName>
+                            </portNames>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <groupId>org.mortbay.jetty</groupId>
+                <artifactId>jetty-maven-plugin</artifactId>
+                <configuration>
+                    <stopKey>foo</stopKey>
+                    <stopPort>${jetty.stopPort}</stopPort>
+                    <connectors>
+                        <connector 
implementation="org.eclipse.jetty.server.nio.SelectChannelConnector">
+                            <port>${jetty.httpPort}</port>
+                        </connector>
+                    </connectors>
+                    <war>${webapp}</war>
+                    <webApp>
+                        <contextPath>/axis2</contextPath>
+                    </webApp>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>start-jetty</id>
+                        <phase>pre-integration-test</phase>
+                        <goals>
+                            <goal>deploy-war</goal>
+                        </goals>
+                        <configuration>
+                            <!-- TODO: necessary? -->
+                            <daemon>true</daemon>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>stop-jetty</id>
+                        <phase>post-integration-test</phase>
+                        <goals>
+                            <goal>stop</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-failsafe-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>integration-test</goal>
+                            <goal>verify</goal>
+                        </goals>
+                        <configuration>
+                            <systemPropertyVariables>
+                                
<jetty.httpPort>${jetty.httpPort}</jetty.httpPort>
+                            </systemPropertyVariables>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: axis/axis2/java/core/trunk/systests/webapp-tests/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: 
axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/org/apache/axis2/webapp/WebappITCase.java
URL: 
http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/org/apache/axis2/webapp/WebappITCase.java?rev=1746109&view=auto
==============================================================================
--- 
axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/org/apache/axis2/webapp/WebappITCase.java
 (added)
+++ 
axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/org/apache/axis2/webapp/WebappITCase.java
 Mon May 30 11:54:13 2016
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+package org.apache.axis2.webapp;
+
+import static net.sourceforge.jwebunit.junit.JWebUnit.*;
+
+import org.junit.Test;
+
+public class WebappITCase {
+    @Test
+    public void test() {
+        setBaseUrl("http://localhost:"; + System.getProperty("jetty.httpPort", 
"8080") + "/axis2/axis2-admin");
+        beginAt("/");
+        setTextField("userName", "admin");
+        setTextField("password", "axis2");
+        submit();
+        clickLinkWithText("Available Services");
+        assertMatch("Service EPR : 
http://localhost:[0-9]+/axis2/services/Version";);
+    }
+}

Propchange: 
axis/axis2/java/core/trunk/systests/webapp-tests/src/test/java/org/apache/axis2/webapp/WebappITCase.java
------------------------------------------------------------------------------
    svn:eol-style = native


Reply via email to