You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@continuum.apache.org by ws...@apache.org on 2009/04/30 01:01:01 UTC
svn commit: r769984 - in /continuum/trunk/continuum-webapp-test: Readme.txt
pom.xml src/test/resources/it.properties
Author: wsmoak
Date: Wed Apr 29 23:01:01 2009
New Revision: 769984
URL: http://svn.apache.org/viewvc?rev=769984&view=rev
Log:
[CONTINUUM-2073] Allow command line selection of which browser to use. Move container creation into a profile to make it easier to test against a running instance.
Modified:
continuum/trunk/continuum-webapp-test/Readme.txt
continuum/trunk/continuum-webapp-test/pom.xml
continuum/trunk/continuum-webapp-test/src/test/resources/it.properties
Modified: continuum/trunk/continuum-webapp-test/Readme.txt
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/Readme.txt?rev=769984&r1=769983&r2=769984&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/Readme.txt (original)
+++ continuum/trunk/continuum-webapp-test/Readme.txt Wed Apr 29 23:01:01 2009
@@ -6,19 +6,24 @@
* in Selenium IDE, modify the Base URL if necessary (for example, http://localhost:8080/continuum)
* in Selenium IDE, click the 'Play entire test suite' icon
-Run Selenium tests in src/test/it with Maven and Cargo using support for multiple data sources
+Run Selenium tests in src/test/it with Maven, JUnit and Cargo
* modify src/test/resources/it.properties as needed
* mvn clean install
-Run Selenium tests in src/test/java with Maven and Cargo with alternate configuration
+Run Selenium tests in src/test/java with Maven and JUnit
* modify src/test/resources/it.properties as needed
* edit pom.xml and remove <testSourceDirectory>
* for snapshot version of selenium(1.0-beta-SNAPSHOT), modify settings.xml/pom.xml to point to this repository http://nexus.openqa.org/content/repositories/snapshots
* mvn clean install
-
+
+Run Selenium tests against an existing Continuum instance
+ * modify src/test/resources/it.properties as needed
+ * mvn clean install -Dexisting-container
+
+ (This skips the Cargo plugin configuration that starts a container with the Continuum webapp deployed)
+
Run Selenium tests in src/test/testNG with Maven and testNG
* Start Continuum
- * Config admin user for continuum application
* modify src/test/resources/testng.properties as needed
* mvn clean install -f testng-pom.xml
Modified: continuum/trunk/continuum-webapp-test/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/pom.xml?rev=769984&r1=769983&r2=769984&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/pom.xml (original)
+++ continuum/trunk/continuum-webapp-test/pom.xml Wed Apr 29 23:01:01 2009
@@ -82,95 +82,6 @@
</executions>
</plugin>
<plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>1.0</version>
- <executions>
- <execution>
- <id>start-container</id>
- <phase>pre-integration-test</phase>
- <goals>
- <goal>start</goal>
- </goals>
- <configuration>
- <wait>false</wait>
- </configuration>
- </execution>
- <execution>
- <id>stop-container</id>
- <phase>post-integration-test</phase>
- <goals>
- <goal>stop</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <container>
- <containerId>${container.name}</containerId>
- <zipUrlInstaller>
- <url>${container.url}</url>
- <installDir>${project.build.directory}/installs/${container.name}</installDir>
- </zipUrlInstaller>
- <log>${project.build.directory}/logs/${container.name}.log</log>
- <output>${project.build.directory}/logs/${container.name}.out</output>
- <timeout>600000</timeout>
- <systemProperties>
- <appserver.base>${project.build.directory}</appserver.base>
- <derby.system.home>${project.build.directory}</derby.system.home>
- </systemProperties>
- <dependencies>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derby</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.mail</groupId>
- <artifactId>mail</artifactId>
- </dependency>
- <dependency>
- <groupId>javax.activation</groupId>
- <artifactId>activation</artifactId>
- </dependency>
- </dependencies>
- </container>
- <configuration>
- <home>${project.build.directory}/${container.name}</home>
- <type>standalone</type>
- <properties>
- <cargo.servlet.port>9595</cargo.servlet.port>
- <cargo.datasource.datasource.users>
- cargo.datasource.driver=org.apache.derby.jdbc.EmbeddedDriver|
- cargo.datasource.url=jdbc:derby:${project.build.directory}/databases/${container.name}/users;create=true|
- cargo.datasource.jndi=jdbc/users|
- cargo.datasource.username=sa
- </cargo.datasource.datasource.users>
- <cargo.datasource.datasource.builds>
- cargo.datasource.driver=org.apache.derby.jdbc.EmbeddedDriver|
- cargo.datasource.url=jdbc:derby:${project.build.directory}/databases/${container.name}/builds;create=true|
- cargo.datasource.jndi=jdbc/continuum|
- cargo.datasource.username=sa
- </cargo.datasource.datasource.builds>
- <cargo.resource.resource.mail>
- cargo.resource.name=mail/Session|
- cargo.resource.type=javax.mail.Session|
- cargo.resource.factory=org.apache.naming.factory.MailSessionFactory|
- cargo.resource.parameters=mail.smtp.host=localhost
- </cargo.resource.resource.mail>
- </properties>
- <deployables>
- <deployable>
- <groupId>${project.goupId}</groupId>
- <artifactId>continuum-webapp</artifactId>
- <type>war</type>
- <properties>
- <context>continuum</context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- </configuration>
- </plugin>
- <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<executions>
@@ -180,6 +91,14 @@
<goals>
<goal>test</goal>
</goals>
+ <configuration>
+ <systemProperties>
+ <property>
+ <name>browser</name>
+ <value>${browser}</value>
+ </property>
+ </systemProperties>
+ </configuration>
</execution>
</executions>
</plugin>
@@ -189,13 +108,14 @@
<dependency>
<groupId>org.openqa.selenium.client-drivers</groupId>
<artifactId>selenium-java-client-driver</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.openqa.selenium.client-drivers</groupId>
- <artifactId>selenium-java-client-driver</artifactId>
<version>1.0-beta-SNAPSHOT</version>
<scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
@@ -228,9 +148,112 @@
<profiles>
<profile>
+ <id>create-container</id>
+ <activation>
+ <property>
+ <name>!container</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>1.0</version>
+ <executions>
+ <execution>
+ <id>start-container</id>
+ <phase>pre-integration-test</phase>
+ <goals>
+ <goal>start</goal>
+ </goals>
+ <configuration>
+ <wait>false</wait>
+ </configuration>
+ </execution>
+ <execution>
+ <id>stop-container</id>
+ <phase>post-integration-test</phase>
+ <goals>
+ <goal>stop</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <container>
+ <containerId>${container.name}</containerId>
+ <zipUrlInstaller>
+ <url>${container.url}</url>
+ <installDir>${project.build.directory}/installs/${container.name}</installDir>
+ </zipUrlInstaller>
+ <log>${project.build.directory}/logs/${container.name}.log</log>
+ <output>${project.build.directory}/logs/${container.name}.out</output>
+ <timeout>600000</timeout>
+ <systemProperties>
+ <appserver.base>${project.build.directory}</appserver.base>
+ <derby.system.home>${project.build.directory}</derby.system.home>
+ </systemProperties>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ </dependency>
+ </dependencies>
+ </container>
+ <configuration>
+ <home>${project.build.directory}/${container.name}</home>
+ <type>standalone</type>
+ <properties>
+ <cargo.servlet.port>9595</cargo.servlet.port>
+ <cargo.datasource.datasource.users>
+ cargo.datasource.driver=org.apache.derby.jdbc.EmbeddedDriver|
+ cargo.datasource.url=jdbc:derby:${project.build.directory}/databases/${container.name}/users;create=true|
+ cargo.datasource.jndi=jdbc/users|
+ cargo.datasource.username=sa
+ </cargo.datasource.datasource.users>
+ <cargo.datasource.datasource.builds>
+ cargo.datasource.driver=org.apache.derby.jdbc.EmbeddedDriver|
+ cargo.datasource.url=jdbc:derby:${project.build.directory}/databases/${container.name}/builds;create=true|
+ cargo.datasource.jndi=jdbc/continuum|
+ cargo.datasource.username=sa
+ </cargo.datasource.datasource.builds>
+ <cargo.resource.resource.mail>
+ cargo.resource.name=mail/Session|
+ cargo.resource.type=javax.mail.Session|
+ cargo.resource.factory=org.apache.naming.factory.MailSessionFactory|
+ cargo.resource.parameters=mail.smtp.host=localhost
+ </cargo.resource.resource.mail>
+ </properties>
+ <deployables>
+ <deployable>
+ <groupId>${project.goupId}</groupId>
+ <artifactId>continuum-webapp</artifactId>
+ <type>war</type>
+ <properties>
+ <context>continuum</context>
+ </properties>
+ </deployable>
+ </deployables>
+ </configuration>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>tomcat5x</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <property>
+ <name>!container</name>
+ </property>
</activation>
<properties>
<container.name>tomcat5x</container.name>
@@ -239,9 +262,21 @@
</properties>
</profile>
<profile>
+ <id>existing-container</id>
+ <activation>
+ <property>
+ <name>container</name>
+ <value>existing</value>
+ </property>
+ </activation>
+ <!-- edit src/test/resources/it.properties as needed -->
+ </profile>
+ <profile>
<id>firefox</id>
<activation>
- <activeByDefault>true</activeByDefault>
+ <property>
+ <name>!browser</name>
+ </property>
</activation>
<properties>
<browser>*firefox</browser>
@@ -249,12 +284,36 @@
</profile>
<profile>
<id>iexplore</id>
+ <activation>
+ <property>
+ <name>browser</name>
+ <value>iexplore</value>
+ </property>
+ </activation>
<properties>
<browser>*iexplore</browser>
</properties>
</profile>
<profile>
+ <id>safari</id>
+ <activation>
+ <property>
+ <name>browser</name>
+ <value>safari</value>
+ </property>
+ </activation>
+ <properties>
+ <browser>*safari</browser>
+ </properties>
+ </profile>
+ <profile>
<id>otherbrowser</id>
+ <activation>
+ <property>
+ <name>browser</name>
+ <value>other</value>
+ </property>
+ </activation>
<properties>
<browser>*custom ${browserPath}</browser>
</properties>
Modified: continuum/trunk/continuum-webapp-test/src/test/resources/it.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/it.properties?rev=769984&r1=769983&r2=769984&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/it.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/it.properties Wed Apr 29 23:01:01 2009
@@ -10,4 +10,4 @@
SELENIUM_HOST=localhost
SELENIUM_PORT=4444
-SELENIUM_BROWSER=*firefox
+