continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1367475 - in /continuum/trunk: ./ continuum-webapp-test/ continuum-webapp-test/src/test/resources/ continuum-webapp-test/src/test/testng/config/ continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ continuum-webapp-test/src...
Date Tue, 31 Jul 2012 09:54:29 GMT
Author: brett
Date: Tue Jul 31 09:54:27 2012
New Revision: 1367475

URL: http://svn.apache.org/viewvc?rev=1367475&view=rev
Log:
clean up selenium test execution so that the variants all work, and it is also possible to run a single test from the IDE without the setup group

Added:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java   (with props)
Removed:
    continuum/trunk/continuum-webapp-test/src/test/resources/it.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java
    continuum/trunk/continuum-webapp-test/src/test/tomcat5x/
Modified:
    continuum/trunk/continuum-webapp-test/   (props changed)
    continuum/trunk/continuum-webapp-test/Readme.txt
    continuum/trunk/continuum-webapp-test/pom.xml
    continuum/trunk/continuum-webapp-test/src/test/testng/config/testng-multienvironment.xml
    continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/CSRFSecurityTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReportTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildDefinitionTemplateTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildQueueTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractConfigurationTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractLocalRepositoryTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractPurgeTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractScheduleTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java
    continuum/trunk/pom.xml

Propchange: continuum/trunk/continuum-webapp-test/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Tue Jul 31 09:54:27 2012
@@ -1,5 +1,4 @@
 *.iml
-test-output
 *.ipr
 *.iws
 *.log
@@ -8,6 +7,4 @@ target
 .settings
 .classpath
 .project
-installs
-cargo-installs
 build

Modified: continuum/trunk/continuum-webapp-test/Readme.txt
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/Readme.txt?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/Readme.txt (original)
+++ continuum/trunk/continuum-webapp-test/Readme.txt Tue Jul 31 09:54:27 2012
@@ -7,17 +7,17 @@ Test with Firefox and Selenium IDE
  * in Selenium IDE, click the 'Play entire test suite' icon
 
 Run Selenium tests in src/test/testNG with Maven, TestNG and Cargo
- * Start Continuum
- * modify src/test/resources/testng.properties as needed
  * mvn clean install
 
 Run Selenium tests against an existing Continuum instance
-  * mvn clean install -DbaseUrl=http://localhost:9595/continuum
+  * mvn clean install -DbaseUrl=http://localhost:9090/continuum
 
   (This skips the Cargo plugin configuration that starts a container with the Continuum webapp deployed)
 
 Run Selenium tests in an alternate browser
-  * mvn clean install -Dbrowser=iexplore  (or -Dbrowser=safari or -Dbrowser=other -DbrowserPath=/path/to/browser)
+  * mvn clean install -Ptomcat7x -Dbrowser=iexplore  (or -Dbrowser=safari or -Dbrowser=other -DbrowserPath=/path/to/browser)
+
+(Note that you must specify the container in this case, as the browser profile disables the default container profile)
 
 Change the port the embedded selenium runs on
   * mvn clean install -DseleniumPort=4444
@@ -25,44 +25,11 @@ Change the port the embedded selenium ru
 Run Selenium tests in an running Selenium server or hub
   * mvn clean install -DseleniumHost=localhost -DseleniumPort=4444
 
-Run Selenium tests in src/test/it with Maven, JUnit and Cargo
- * modify src/test/resources/it.properties as needed
- * mvn clean install -f junit-pom.xml
-
-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 -f junit-pom.xml
-
  Note that this does not install anything, it simply runs through the lifecycle including the integration test phases.
  More properly it would be 'mvn clean post-integration-test', but install is much shorter to type. :)
 
- After you have run through the lifecycle once to set up the container and webapps, you can re-start it using:
- mvn cargo:start
-
-======= OLD INSTRUCTIONS FOR src/test/it BELOW =======
-
-Test Continuum with Tomcat 5.x and firefox
-    'mvn clean install' or 'mvn clean install -Ptomcat5x,firefox'
-
-Test Continuum with Tomcat 5.x and Internet Explorer
-    'mvn clean install -Ptomcat5x,iexplore'
-
-Test Continuum with Tomcat 5.x and a specific browser
-    'mvn clean install -Ptomcat5x,otherbrowser -DbrowserPath=PATH_TO_YOUR_BROWSER'
-
-Test Continuum with Tomcat 5.x and firefox wherein your firefox executable is not in the default installation directory
-    'mvn clean install' or 'mvn clean install -Ptomcat5x,firefox -Dbrowser="*firefox <full path of firefox executable>'
-
-Test Continuum with Tomcat 5.x and Internet Explorer wherein your Internet Explorer executable is not in the default installation directory
-    'mvn clean install' or 'mvn clean install -Ptomcat5x,firefox -Dbrowser="*iexplore <full path of Internet Explorer executable>'
-
-WARNING: If you specify your own custom browser, it's up to you to configure it correctly. At a minimum, you'll need to configure your browser to use the Selenium Server as a proxy, and disable all browser-specific prompting.
-http://release.openqa.org/selenium-remote-control/nightly/doc/java/com/thoughtworks/selenium/DefaultSelenium.html#DefaultSelenium(java.lang.String,%20int,%20java.lang.String,%20java.lang.String)
-
 If you'd like to run the tests from your IDE, you can start the container from Maven using:
 
-    mvn selenium:start-server cargo:start
+    mvn generate-resources selenium:start-server cargo:run
 
-The server will run until you press Ctrl-C, and you can run the tests from the IDE.
+The server will run until you press Ctrl-C, and you can run the tests from the IDE.
\ No newline at end of file

Modified: continuum/trunk/continuum-webapp-test/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/pom.xml?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/pom.xml (original)
+++ continuum/trunk/continuum-webapp-test/pom.xml Tue Jul 31 09:54:27 2012
@@ -17,7 +17,8 @@ KIND, either express or implied.  See th
 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">
+<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.continuum</groupId>
@@ -43,11 +44,6 @@ under the License.
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-          <verbose>true</verbose>
-        </configuration>
         <executions>
           <execution>
             <goals>
@@ -58,6 +54,7 @@ under the License.
       </plugin>
       <plugin>
         <artifactId>maven-resources-plugin</artifactId>
+        <version>2.5</version>
         <executions>
           <execution>
             <goals>
@@ -67,8 +64,175 @@ under the License.
         </executions>
       </plugin>
       <plugin>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <version>1.3</version>
+        <executions>
+          <execution>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>run</goal>
+            </goals>
+            <configuration>
+              <tasks>
+                <copy todir="${project.build.directory}">
+                  <fileset dir="src/appserver-base"/>
+                </copy>
+                <delete dir="${project.build.directory}/example-svn"/>
+                <copy todir="${project.build.directory}/example-svn">
+                  <fileset dir="src/test/example-svn"/>
+                </copy>
+                <!-- This doesn't work, SVN doesn't like the file:/ URL it gives
+                <makeurl file="${project.build.directory}/example-svn" property="svn.base.url"/>
+                -->
+                <path id="svn.repo.dir">
+                  <pathelement location="${project.build.directory}/example-svn"/>
+                </path>
+                <pathconvert refid="svn.repo.dir" targetos="unix" property="svn.base.url"/>
+                <echo file="${project.build.directory}/filter.properties">
+                  svn.base.url=file://localhost/${svn.base.url}
+                </echo>
+              </tasks>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>properties-maven-plugin</artifactId>
+        <version>1.0-alpha-2</version>
+        <executions>
+          <execution>
+            <phase>generate-resources</phase>
+            <goals>
+              <goal>read-project-properties</goal>
+            </goals>
+            <configuration>
+              <files>
+                <file>${project.build.directory}/filter.properties</file>
+              </files>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.mojo</groupId>
+        <artifactId>selenium-maven-plugin</artifactId>
+        <version>2.3</version>
+        <executions>
+          <execution>
+            <id>start-selenium</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>start-server</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>stop-selenium</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>stop-server</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
+        <groupId>org.codehaus.cargo</groupId>
+        <artifactId>cargo-maven2-plugin</artifactId>
+        <version>1.2.3</version>
+        <configuration>
+          <container>
+            <containerId>${container.name}</containerId>
+            <log>${project.build.directory}/logs/${container.name}.log</log>
+            <output>${project.build.directory}/logs/${container.name}.out</output>
+            <systemProperties>
+              <appserver.base>${project.build.directory}</appserver.base>
+              <derby.system.home>${project.build.directory}</derby.system.home>
+              <svn.base.url>${svn.base.url}</svn.base.url>
+            </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>
+            <properties>
+              <cargo.servlet.port>9595</cargo.servlet.port>
+              <cargo.jvmargs>-Xmx512m -XX:MaxPermSize=128m</cargo.jvmargs>
+              <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>
+          </configuration>
+          <deployables>
+            <deployable>
+              <artifactId>continuum-webapp</artifactId>
+              <type>war</type>
+              <properties>
+                <context>continuum</context>
+              </properties>
+            </deployable>
+            <deployable>
+              <artifactId>continuum-buildagent-webapp</artifactId>
+              <type>war</type>
+              <properties>
+                <context>continuum-buildagent</context>
+              </properties>
+            </deployable>
+            <!-- Test resources -->
+            <deployable>
+              <location>${basedir}/src/test/example-projects</location>
+              <type>war</type>
+              <properties>
+                <context>example-projects</context>
+              </properties>
+            </deployable>
+          </deployables>
+        </configuration>
+        <executions>
+          <execution>
+            <id>start-container</id>
+            <phase>pre-integration-test</phase>
+            <goals>
+              <goal>start</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>stop-container</id>
+            <phase>post-integration-test</phase>
+            <goals>
+              <goal>stop</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+      <plugin>
         <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-surefire-plugin</artifactId>
+        <artifactId>maven-failsafe-plugin</artifactId>
         <configuration>
           <!-- Better to be able to see the results output from the listener as we go -->
           <redirectTestOutputToFile>false</redirectTestOutputToFile>
@@ -81,7 +245,7 @@ under the License.
             <id>integration-tests</id>
             <phase>integration-test</phase>
             <goals>
-              <goal>test</goal>
+              <goal>integration-test</goal>
             </goals>
             <configuration>
               <systemProperties>
@@ -104,37 +268,48 @@ under the License.
               </systemProperties>
             </configuration>
           </execution>
+          <execution>
+            <id>verify-integration-tests</id>
+            <goals>
+              <goal>verify</goal>
+            </goals>
+          </execution>
         </executions>
       </plugin>
     </plugins>
+    <pluginManagement>
+      <plugins>
+        <plugin>
+          <groupId>org.codehaus.mojo</groupId>
+          <artifactId>selenium-maven-plugin</artifactId>
+          <version>2.3</version>
+          <configuration>
+            <port>${seleniumPort}</port>
+            <background>true</background>
+            <logOutput>true</logOutput>
+          </configuration>
+        </plugin>
+      </plugins>
+    </pluginManagement>
   </build>
-	
+
   <dependencies>
     <dependency>
       <groupId>org.testng</groupId>
       <artifactId>testng</artifactId>
-      <version>5.8</version>
+      <version>6.2.1</version>
       <scope>test</scope>
-      <classifier>jdk15</classifier>
     </dependency>
 
-    <dependency>
-      <groupId>commons-io</groupId>
-      <artifactId>commons-io</artifactId>
-      <version>1.4</version>
-    </dependency>  
-    
     <!-- deployables -->
     <dependency>
       <groupId>org.apache.continuum</groupId>
       <artifactId>continuum-webapp</artifactId>
-      <version>${project.version}</version>
       <type>war</type>
     </dependency>
     <dependency>
       <groupId>org.apache.continuum</groupId>
       <artifactId>continuum-buildagent-webapp</artifactId>
-      <version>${project.version}</version>
       <type>war</type>
     </dependency>
 
@@ -142,24 +317,24 @@ under the License.
     <dependency>
       <groupId>org.apache.derby</groupId>
       <artifactId>derby</artifactId>
-      <version>10.1.3.1</version>
     </dependency>
     <dependency>
       <groupId>javax.mail</groupId>
       <artifactId>mail</artifactId>
-      <version>1.4</version>
     </dependency>
     <dependency>
       <groupId>javax.activation</groupId>
       <artifactId>activation</artifactId>
-      <version>1.1</version>
     </dependency>
 
     <!-- dependencies below are for code in src/test/it -->
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
       <artifactId>plexus-utils</artifactId>
-      <version>1.4</version>
+    </dependency>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
     </dependency>
     <dependency>
       <groupId>org.seleniumhq.selenium.server</groupId>
@@ -184,246 +359,53 @@ under the License.
         </exclusion>
       </exclusions>
     </dependency>
-
   </dependencies>
 
   <profiles>
     <profile>
-      <id>create-container</id>
+      <id>disable-cargo</id>
       <activation>
         <property>
-          <name>!container</name>
+          <name>baseUrl</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>${cargo.installs.directory}/${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>
-                  <svn.base.url>${svn.base.url}</svn.base.url>
-                </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>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>org.codehaus.cargo</groupId>
+              <artifactId>cargo-maven2-plugin</artifactId>
               <configuration>
-                <home>${project.build.directory}/${container.name}</home>
-                <type>standalone</type>
-                <properties>
-                  <cargo.servlet.port>9595</cargo.servlet.port>
-                  <cargo.jvmargs>-Xmx512m -XX:MaxPermSize=128m</cargo.jvmargs>
-                  <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.groupId}</groupId>
-                    <artifactId>continuum-webapp</artifactId>
-                    <type>war</type>
-                    <properties>
-                      <context>continuum</context>
-                    </properties>
-                  </deployable>
-                  <deployable>
-                    <groupId>${project.groupId}</groupId>
-                    <artifactId>continuum-buildagent-webapp</artifactId>
-                    <type>war</type>
-                    <properties>
-                      <context>continuum-buildagent</context>
-                    </properties>
-                  </deployable>
-                  <!-- Test resources -->
-                  <deployable>
-                    <location>${basedir}/src/test/example-projects</location>
-                    <type>war</type>
-                    <properties>
-                      <context>example-projects</context>
-                    </properties>
-                  </deployable>
-                </deployables>
+                <skip>true</skip>
               </configuration>
-            </configuration>
-          </plugin>
-          <plugin>
-            <artifactId>maven-antrun-plugin</artifactId>
-            <version>1.3</version>
-            <executions>
-              <execution>
-                <phase>generate-resources</phase>
-                <goals>
-                  <goal>run</goal>
-                </goals>
-                <configuration>
-                  <tasks>
-                    <copy todir="${project.build.directory}">
-                      <fileset dir="src/appserver-base" />
-                    </copy>
-                    <delete dir="${project.build.directory}/example-svn" />
-                    <copy todir="${project.build.directory}/example-svn">
-                      <fileset dir="src/test/example-svn" />
-                    </copy>
-                    <!-- This doesn't work, SVN doesn't like the file:/ URL it gives
-                    <makeurl file="${project.build.directory}/example-svn" property="svn.base.url"/>
-                    -->
-                    <path id="svn.repo.dir">
-                      <pathelement location="${project.build.directory}/example-svn" />
-                    </path>
-                    <pathconvert refid="svn.repo.dir" targetos="unix" property="svn.base.url"/>
-                    <echo file="${project.build.directory}/filter.properties">
-                      svn.base.url=file://localhost/${svn.base.url}
-                    </echo>
-                  </tasks>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>properties-maven-plugin</artifactId>
-            <version>1.0-alpha-2</version>
-            <executions>
-              <execution>
-                <phase>generate-resources</phase>
-                <goals>
-                  <goal>read-project-properties</goal>
-                </goals>
-                <configuration>
-                  <files>
-                    <file>${project.build.directory}/filter.properties</file>
-                  </files>
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
+            </plugin>
+          </plugins>
+        </pluginManagement>
       </build>
     </profile>
     <profile>
-      <id>start-selenium</id>
+      <id>disable-selenium-server</id>
       <activation>
         <property>
-          <name>!seleniumHost</name>
+          <name>seleniumHost</name>
         </property>
       </activation>
-      <properties>
-        <seleniumHost>localhost</seleniumHost>
-        <seleniumPort>4444</seleniumPort>
-      </properties>
       <build>
-        <plugins>
-          <plugin>
-            <groupId>org.codehaus.mojo</groupId>
-            <artifactId>selenium-maven-plugin</artifactId>
-            <version>2.3</version>
-            <executions>
-              <execution>
-                <phase>pre-integration-test</phase>
-                <goals>
-                  <goal>start-server</goal>
-                </goals>
-                <configuration>
-                  <background>true</background>
-                  <port>${seleniumPort}</port>
-                  <logOutput>true</logOutput>      
-                </configuration>
-              </execution>
-            </executions>
-          </plugin>
-        </plugins>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>org.codehaus.mojo</groupId>
+              <artifactId>selenium-maven-plugin</artifactId>
+              <configuration>
+                <skip>true</skip>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
       </build>
     </profile>
     <profile>
-      <id>tomcat5x</id>
-      <activation>
-        <property>
-          <name>!container</name>
-        </property>
-      </activation>
-      <properties>
-        <container.name>tomcat5x</container.name>
-        <container.url>
-          http://archive.apache.org/dist/tomcat/tomcat-5/v${tomcat5x.version}/bin/apache-tomcat-${tomcat5x.version}.zip
-        </container.url>
-      </properties>
-    </profile>
-    <profile>
-      <id>existing-container</id>
-      <activation>
-        <property>
-          <name>!baseUrl</name>
-        </property>
-      </activation>
-      <properties>
-        <baseUrl>http://localhost:9595/continuum/</baseUrl>
-      </properties>
-    </profile>
-    <profile>
       <id>firefox</id>
-      <activation>
-        <property>
-          <name>!browser</name>
-        </property>
-      </activation>
       <properties>
         <browser>*firefox</browser>
       </properties>
@@ -471,7 +453,6 @@ under the License.
           <plugin>
             <groupId>org.codehaus.mojo</groupId>
             <artifactId>selenium-maven-plugin</artifactId>
-            <version>2.3</version>
             <executions>
               <execution>
                 <id>xvfb</id>
@@ -485,35 +466,91 @@ under the License.
         </plugins>
       </build>
     </profile>
-  <profile>
-    <id>reporting</id>
+    <profile>
+      <id>reporting</id>
       <build>
         <plugins>
           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
-            <artifactId>maven-surefire-plugin</artifactId>
-            <configuration>
-              <testFailureIgnore>true</testFailureIgnore>
-            </configuration>
+            <artifactId>maven-surefire-report-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>report-only</id>
+                <phase>integration-test</phase>
+                <goals>
+                  <goal>report-only</goal>
+                </goals>
+              </execution>
+            </executions>
           </plugin>
-        <plugin>
-          <groupId>org.apache.maven.plugins</groupId>
-          <artifactId>maven-surefire-report-plugin</artifactId>
-          <executions>
-            <execution>
-              <id>report-only</id>
-              <goals>
-                <goal>report-only</goal>
-              </goals>
-            </execution>
-          </executions>
-        </plugin>
-      </plugins>
-    </build>
-  </profile>
+        </plugins>
+      </build>
+    </profile>
+    <profile>
+      <id>tomcat7x</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+        <!-- -DseleniumHost profile cancels this, so we need to trigger on that as well -->
+        <property>
+          <name>seleniumHost</name>
+        </property>
+      </activation>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>org.codehaus.cargo</groupId>
+              <artifactId>cargo-maven2-plugin</artifactId>
+              <configuration>
+                <container>
+                  <zipUrlInstaller>
+                    <url>
+                      http://archive.apache.org/dist/tomcat/tomcat-7/v${tomcat7x.version}/bin/apache-tomcat-${tomcat7x.version}.zip
+                    </url>
+                    <downloadDir>${user.home}/.cargo</downloadDir>
+                  </zipUrlInstaller>
+                </container>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+      <properties>
+        <container.name>tomcat7x</container.name>
+        <tomcat7x.version>7.0.29</tomcat7x.version>
+      </properties>
+    </profile>
+    <profile>
+      <id>jetty7x</id>
+      <build>
+        <pluginManagement>
+          <plugins>
+            <plugin>
+              <groupId>org.codehaus.cargo</groupId>
+              <artifactId>cargo-maven2-plugin</artifactId>
+              <configuration>
+                <container>
+                  <artifactInstaller>
+                    <groupId>org.eclipse.jetty</groupId>
+                    <artifactId>jetty-distribution</artifactId>
+                    <version>${jetty7x.version}</version>
+                  </artifactInstaller>
+                </container>
+              </configuration>
+            </plugin>
+          </plugins>
+        </pluginManagement>
+      </build>
+      <properties>
+        <container.name>jetty7x</container.name>
+        <jetty7x.version>7.6.5.v20120716</jetty7x.version>
+      </properties>
+    </profile>
   </profiles>
   <properties>
-    <cargo.installs.directory>${basedir}/cargo-installs</cargo.installs.directory>
-    <tomcat5x.version>5.5.27</tomcat5x.version>
+    <seleniumHost>localhost</seleniumHost>
+    <seleniumPort>4444</seleniumPort>
+    <baseUrl>http://localhost:9595/continuum/</baseUrl>
+    <browser>*firefox</browser>
   </properties>
 </project>

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/config/testng-multienvironment.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/config/testng-multienvironment.xml?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/config/testng-multienvironment.xml (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/config/testng-multienvironment.xml Tue Jul 31 09:54:27 2012
@@ -27,7 +27,6 @@ under the License.
         <parameter name="browser" value="Safari 4 on Windows"/>
         <groups>
             <run>
-                <include name="setup" /> <!-- required to setup Selenium -->
                 <include name="login" />
             </run>
         </groups>
@@ -39,7 +38,6 @@ under the License.
         <parameter name="browser" value="Firefox 3 on Linux"/>
         <groups>
             <run>
-                <include name="setup" /> <!-- required to setup Selenium -->
                 <include name="login" />
             </run>
         </groups>

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml Tue Jul 31 09:54:27 2012
@@ -30,8 +30,6 @@ under the License.
      -->
     <groups>
       <run>
-        <include name="setup"/>
-        <!-- required to setup Selenium -->
         <include name="about"/>
       </run>
     </groups>
@@ -42,7 +40,6 @@ under the License.
   <test name="AdminTest" enabled="true">
     <groups>
       <run>
-        <include name="setup"/> <!-- required to setup Selenium -->        
         <include name="login"/>
         <include name="projectGroup"/>
         <include name="mavenTwoProject"/>

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java Tue Jul 31 09:54:27 2012
@@ -19,6 +19,7 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractAdminTest;
 import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
@@ -28,9 +29,9 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "antProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "antProject" } )
 public class AntProjectTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     @Test( dependsOnMethods = { "testAddProjectGroup" } )
     public void testAddAntProject()

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java Tue Jul 31 09:54:27 2012
@@ -20,11 +20,12 @@ package org.apache.continuum.web.test;
  */
 
 //import org.apache.continuum.web.test.parent.AbstractBuildQueueTest;
+import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 import org.apache.continuum.web.test.parent.AbstractBuildAgentsTest;
 import org.testng.Assert;
 
-@Test( groups = { "agent" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "agent" } )
 public class BuildAgentsTest
     extends AbstractBuildAgentsTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java Tue Jul 31 09:54:27 2012
@@ -26,7 +26,7 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "buildDefinitionTemplate" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "buildDefinitionTemplate" } )
 public class BuildDefinitionTemplateTest
     extends AbstractBuildDefinitionTemplateTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java Tue Jul 31 09:54:27 2012
@@ -19,6 +19,7 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractAdminTest;
 import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
@@ -26,9 +27,9 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "buildDefinition" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "buildDefinition" } )
 public class BuildDefinitionTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     public void testDefaultGroupBuildDefinition()
         throws Exception

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java Tue Jul 31 09:54:27 2012
@@ -26,7 +26,7 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "buildEnvironment" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "buildEnvironment" } )
 public class BuildEnvironmentTest
     extends AbstractBuildEnvironmentTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/CSRFSecurityTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/CSRFSecurityTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/CSRFSecurityTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/CSRFSecurityTest.java Tue Jul 31 09:54:27 2012
@@ -19,15 +19,16 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractAdminTest;
 import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
 /**
  * Test actions that are vulnerable to CSRF.
  */
-@Test( groups = { "csrf" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "csrf" } )
 public class CSRFSecurityTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     public void testCSRFDeleteProject()
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java Tue Jul 31 09:54:27 2012
@@ -27,7 +27,7 @@ import org.testng.Assert;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "configuration" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "configuration" } )
 public class ConfigurationTest
     extends AbstractConfigurationTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java Tue Jul 31 09:54:27 2012
@@ -26,7 +26,7 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "installation" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "installation" } )
 public class InstallationTest
     extends AbstractInstallationTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java Tue Jul 31 09:54:27 2012
@@ -26,7 +26,7 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "repository" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "repository" } )
 public class LocalRepositoriesTest
     extends AbstractLocalRepositoryTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java Tue Jul 31 09:54:27 2012
@@ -47,18 +47,12 @@ public class LoginTest
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
-    @Test( dependsOnMethods = { "testWithBadUsername" }, alwaysRun = true )
     public void testWithBadPassword()
     {
-        goToLoginPage();
-        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
-        getSelenium().type( "loginForm_password", "badPassword" );
-        getSelenium().click( "loginForm__login" );
-        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        login( getProperty( "ADMIN_USERNAME" ), "badPassword" );
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
-    @Test( dependsOnMethods = { "testWithBadPassword" }, alwaysRun = true )
     public void testWithEmptyUsername()
     {
         goToLoginPage();
@@ -68,7 +62,6 @@ public class LoginTest
         assertTextPresent( "User Name is required" );
     }
 
-    @Test( dependsOnMethods = { "testWithEmptyUsername" }, alwaysRun = true )
     public void testWithEmptyPassword()
     {
         goToLoginPage();
@@ -78,16 +71,14 @@ public class LoginTest
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
-    @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithEmptyPassword" }, alwaysRun = true )
     public void testWithCorrectUsernamePassword()
     {
-        goToLoginPage();
-        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
-        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
-        getSelenium().click( "loginForm__login" );
-        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        String username = getProperty( "ADMIN_USERNAME" );
+        String password = getProperty( "ADMIN_PASSWORD" );
+        login( username, password );
         assertTextPresent( "Edit Details" );
         assertTextPresent( "Logout" );
-        assertTextPresent( getProperty( "ADMIN_USERNAME" ) );
+        assertTextPresent( username );
     }
+
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java Tue Jul 31 09:54:27 2012
@@ -19,6 +19,7 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractAdminTest;
 import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
@@ -28,9 +29,9 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "mavenOneProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "mavenOneProject" } )
 public class MavenOneProjectTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     public void testAddMavenOneProjectWithNoDefaultBuildDefinitionFromTemplate()
         throws Exception

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java Tue Jul 31 09:54:27 2012
@@ -19,7 +19,7 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
-import org.apache.continuum.web.test.parent.AbstractContinuumTest;
+import org.apache.continuum.web.test.parent.AbstractAdminTest;
 import org.testng.annotations.Test;
 
 /**
@@ -28,9 +28,9 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "mavenTwoProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "mavenTwoProject" } )
 public class MavenTwoProjectTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
 
     public void testAddMavenTwoProjectWithNoDefaultBuildDefinitionInTemplate()

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java Tue Jul 31 09:54:27 2012
@@ -19,6 +19,7 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractAdminTest;
 import org.apache.continuum.web.test.parent.AbstractSeleniumTest;
 import org.testng.Assert;
 import org.testng.annotations.Test;
@@ -29,11 +30,10 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "myAccount" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "myAccount" } )
 public class MyAccountTest
-    extends AbstractSeleniumTest
+    extends AbstractAdminTest
 {
-
     public String newFullName = "Admin_FullName";
 
     public String newEmail = "new_admin@mail.com";

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java Tue Jul 31 09:54:27 2012
@@ -19,6 +19,7 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractAdminTest;
 import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.apache.continuum.web.test.parent.AbstractSeleniumTest;
 import org.testng.annotations.Test;
@@ -29,9 +30,9 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "projectGroup" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "projectGroup" } )
 public class ProjectGroupTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
 
     public void testAddProjectGroup()

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java Tue Jul 31 09:54:27 2012
@@ -26,7 +26,7 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "purge" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "purge" } )
 public class PurgeTest
     extends AbstractPurgeTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java Tue Jul 31 09:54:27 2012
@@ -30,7 +30,7 @@ import org.apache.continuum.web.test.Sch
  */
 
 
-@Test( groups = { "queue" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "queue" } )
 public class QueueTest
     extends AbstractBuildQueueTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java Tue Jul 31 09:54:27 2012
@@ -23,7 +23,7 @@ import java.io.File;
 import org.apache.continuum.web.test.parent.AbstractReleaseTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "release" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "release" } )
 public class ReleaseTest
     extends AbstractReleaseTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReportTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReportTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReportTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReportTest.java Tue Jul 31 09:54:27 2012
@@ -19,12 +19,13 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractAdminTest;
 import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "report" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "report" } )
 public class ReportTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     @Test( dependsOnMethods = { "testProjectGroupAllBuildSuccess" } )
     public void testViewBuildsReportWithSuccessfulBuild()

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java Tue Jul 31 09:54:27 2012
@@ -26,7 +26,7 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "schedule" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "schedule" } )
 public class ScheduleTest
     extends AbstractScheduleTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java Tue Jul 31 09:54:27 2012
@@ -19,6 +19,7 @@ package org.apache.continuum.web.test;
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractAdminTest;
 import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
@@ -28,9 +29,9 @@ import org.testng.annotations.Test;
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "shellProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "shellProject" } )
 public class ShellProjectTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     public void testAddShellProject()
         throws Exception

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java Tue Jul 31 09:54:27 2012
@@ -3,7 +3,7 @@ package org.apache.continuum.web.test;
 import org.apache.continuum.web.test.parent.AbstractUserRolesManagementTest;
 import org.testng.annotations.Test;
 
-@Test( groups = { "userroles" }, dependsOnMethods = { "testWithCorrectUsernamePassword" }, sequential = true )
+@Test( groups = { "userroles" }, sequential = true )
 public class UserRolesManagementTest
     extends AbstractUserRolesManagementTest
 {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java Tue Jul 31 09:54:27 2012
@@ -64,6 +64,12 @@ public class CaptureScreenShotsListener
     private static void captureScreenshotAndSource( String cName, Throwable throwable )
     {
         Selenium selenium = AbstractSeleniumTest.getSelenium();
+        if (selenium == null) {
+            // avoid swallowing exception
+            System.err.println( "Not capturing screenshot as Selenium is not initialised" );
+            return;
+        }
+
         String locator = "link=Show/hide Stack Trace";
         if ( selenium.isElementPresent( locator ) )
         {

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java?rev=1367475&view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java (added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java Tue Jul 31 09:54:27 2012
@@ -0,0 +1,36 @@
+package org.apache.continuum.web.test.parent;
+
+/*
+ * 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.
+ */
+
+import org.testng.annotations.BeforeMethod;
+
+public abstract class AbstractAdminTest
+    extends AbstractContinuumTest
+{
+    @BeforeMethod( alwaysRun = true )
+    public void loginAsAdmin()
+    {
+        String username = getProperty( "ADMIN_USERNAME" );
+        if ( !getSelenium().isElementPresent( "//span[@class='username' and text()='" + username + "']" ) )
+        {
+            login( username, getProperty( "ADMIN_PASSWORD" ) );
+        }
+    }
+}

Propchange: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java Tue Jul 31 09:54:27 2012
@@ -1,5 +1,7 @@
 package org.apache.continuum.web.test.parent;
 
+import org.testng.annotations.BeforeClass;
+
 import java.net.URLEncoder;
 
 /*
@@ -22,7 +24,7 @@ import java.net.URLEncoder;
  */
 
 public abstract class AbstractBuildAgentsTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     public void goToAddBuildAgent()
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildDefinitionTemplateTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildDefinitionTemplateTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildDefinitionTemplateTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildDefinitionTemplateTest.java Tue Jul 31 09:54:27 2012
@@ -24,7 +24,7 @@ package org.apache.continuum.web.test.pa
  * @version $Id$
  */
 public abstract class AbstractBuildDefinitionTemplateTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     public void goToBuildDefinitionTemplatePage()
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java Tue Jul 31 09:54:27 2012
@@ -24,7 +24,7 @@ package org.apache.continuum.web.test.pa
  * @version $Id$
  */
 public abstract class AbstractBuildEnvironmentTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     public void goToBuildEnvironmentPage()
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildQueueTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildQueueTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildQueueTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildQueueTest.java Tue Jul 31 09:54:27 2012
@@ -26,7 +26,7 @@ import org.testng.Assert;
  * @version $Id$
  */
 public abstract class AbstractBuildQueueTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     public void goToBuildQueuePage()
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractConfigurationTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractConfigurationTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractConfigurationTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractConfigurationTest.java Tue Jul 31 09:54:27 2012
@@ -24,7 +24,7 @@ package org.apache.continuum.web.test.pa
  * @version $Id$
  */
 public abstract class AbstractConfigurationTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     public void goToConfigurationPage()
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java Tue Jul 31 09:54:27 2012
@@ -20,10 +20,10 @@ package org.apache.continuum.web.test.pa
  */
 
 import org.apache.continuum.web.test.ConfigurationTest;
-import org.apache.continuum.web.test.listener.CaptureScreenShotsListener;
 import org.testng.Assert;
-
-import java.io.File;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.Optional;
+import org.testng.annotations.Parameters;
 
 /**
  * Based on AbstractContinuumTestCase of Emmanuel Venisse test.
@@ -109,26 +109,6 @@ public abstract class AbstractContinuumT
         assertTextPresent( "Forgot your Password? Request a password reset." );
     }
 
-    public void submitUserData(String username,String password,boolean rememberme,boolean success )
-    {
-
-        setFieldValue( "username", username );
-        setFieldValue( "password", password );
-        if ( rememberme )
-        {
-            checkField( "rememberMe" );
-        }
-        submit();
-        if ( success )
-        {
-            assertAutenticatedPage( username );
-        }
-        else
-        {
-            assertLoginPage();
-        }
-    }
-
     public void assertAutenticatedPage(String username )
     {
         assertTextPresent( "Current User" );
@@ -1168,4 +1148,70 @@ public abstract class AbstractContinuumT
         assertTextNotPresent( "Results" );
         assertTextNotPresent( "No Results Found" );
     }
+
+    @BeforeSuite( alwaysRun = true )
+    @Parameters( { "baseUrl", "browser", "seleniumHost", "seleniumPort" } )
+    public void initializeContinuum( @Optional( "http://localhost:9595/continuum" ) String baseUrl,
+                                     @Optional( "*firefox" ) String browser,
+                                     @Optional( "localhost" ) String seleniumHost,
+                                     @Optional( "4444" ) int seleniumPort )
+        throws Exception
+    {
+        super.open( baseUrl, browser, seleniumHost, seleniumPort );
+        Assert.assertNotNull( getSelenium(), "Selenium is not initialized" );
+        getSelenium().open( baseUrl );
+        String title = getSelenium().getTitle();
+        if ( title.equals( "Create Admin User" ) )
+        {
+            assertCreateAdmin();
+            String fullname = getProperty( "ADMIN_FULLNAME" );
+            String username = getProperty( "ADMIN_USERNAME" );
+            String mail = getProperty( "ADMIN_MAIL" );
+            String password = getProperty( "ADMIN_PASSWORD" );
+            submitAdminData( fullname, mail, password );
+            assertAutenticatedPage( username );
+            assertEditConfigurationPage();
+            postAdminUserCreation();
+            disableDefaultSchedule();
+            clickLinkWithText( "Logout" );
+        }
+    }
+
+    private void postAdminUserCreation()
+    {
+        if ( getTitle().endsWith( "Continuum - Configuration" ) )
+        {
+            String workingDir = getFieldValue( "configuration_workingDirectory" );
+            String buildOutputDir = getFieldValue( "configuration_buildOutputDirectory" );
+            String releaseOutputDir = getFieldValue( "configuration_releaseOutputDirectory" );
+            String locationDir = "target/data";
+            String data = "data";
+            setFieldValue( "workingDirectory", workingDir.replaceFirst( data, locationDir ) );
+            setFieldValue( "buildOutputDirectory", buildOutputDir.replaceFirst( data, locationDir ) );
+            setFieldValue( "releaseOutputDirectory", releaseOutputDir.replaceFirst( data, locationDir ) );
+            setFieldValue( "baseUrl", baseUrl );
+            submit();
+        }
+    }
+
+    private void disableDefaultSchedule()
+    {
+        clickLinkWithText( "Schedules" );
+        String xPath = "//preceding::td[text()='DEFAULT_SCHEDULE']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        if ( isChecked( "saveSchedule_active" ) )
+        {
+            uncheckField( "saveSchedule_active" );
+        }
+        clickButtonWithValue( "Save" );
+    }
+
+    protected void login( String username, String password )
+    {
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", username );
+        getSelenium().type( "loginForm_password", password );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+    }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java Tue Jul 31 09:54:27 2012
@@ -24,7 +24,7 @@ package org.apache.continuum.web.test.pa
  * @version $Id$
  */
 public abstract class AbstractInstallationTest
-    extends AbstractSeleniumTest
+    extends AbstractAdminTest
 {
     public void goToInstallationPage()
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractLocalRepositoryTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractLocalRepositoryTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractLocalRepositoryTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractLocalRepositoryTest.java Tue Jul 31 09:54:27 2012
@@ -24,7 +24,7 @@ package org.apache.continuum.web.test.pa
  * @version $Id$
  */
 public abstract class AbstractLocalRepositoryTest
-    extends AbstractSeleniumTest
+    extends AbstractAdminTest
 {
     public void goToLocalRepositoryPage()
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractPurgeTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractPurgeTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractPurgeTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractPurgeTest.java Tue Jul 31 09:54:27 2012
@@ -24,7 +24,7 @@ package org.apache.continuum.web.test.pa
  * @version $Id$
  */
 public abstract class AbstractPurgeTest
-    extends AbstractSeleniumTest
+    extends AbstractAdminTest
 {
     public void goToGeneralPurgePage()
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java Tue Jul 31 09:54:27 2012
@@ -27,7 +27,7 @@ import org.testng.Assert;
  */
 
 public abstract class AbstractReleaseTest
-    extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
     public void releasePrepareProject( String username, String password, String tagBase, String tag, String releaseVersion, String developmentVersion, String buildEnv, boolean success )
         throws Exception

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractScheduleTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractScheduleTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractScheduleTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractScheduleTest.java Tue Jul 31 09:54:27 2012
@@ -24,7 +24,7 @@ package org.apache.continuum.web.test.pa
  * @version $Id$
  */
 public abstract class AbstractScheduleTest
-    extends AbstractSeleniumTest
+    extends AbstractAdminTest
 {
     public void goToSchedulePage()
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java Tue Jul 31 09:54:27 2012
@@ -23,6 +23,7 @@ import com.thoughtworks.selenium.Default
 import com.thoughtworks.selenium.Selenium;
 import org.apache.commons.io.IOUtils;
 import org.testng.Assert;
+import org.testng.annotations.AfterSuite;
 
 import java.io.IOException;
 import java.io.InputStream;
@@ -57,9 +58,9 @@ public abstract class AbstractSeleniumTe
     private static String maxProjectWaitTimeInMs;
 
     /**
-     * Initialize properties.
+     * Initialize selenium
      */
-    public void open()
+    public void open( String baseUrl, String browser, String seleniumHost, int seleniumPort )
         throws Exception
     {
         InputStream input = this.getClass().getClassLoader().getResourceAsStream( "testng.properties" );
@@ -68,17 +69,10 @@ public abstract class AbstractSeleniumTe
 
         maxWaitTimeInMs = getProperty( "MAX_WAIT_TIME_IN_MS" );
         maxProjectWaitTimeInMs = getProperty( "MAX_PROJECT_WAIT_TIME_IN_MS" );
-    }
 
-    /**
-     * Initialize selenium
-     */
-    public void open( String baseUrl, String browser, String seleniumHost, int seleniumPort )
-        throws Exception
-    {
-        this.baseUrl = baseUrl;
+        AbstractSeleniumTest.baseUrl = baseUrl;
 
-        this.browser = browser;
+        AbstractSeleniumTest.browser = browser;
 
         if ( getSelenium() == null )
         {
@@ -128,6 +122,7 @@ public abstract class AbstractSeleniumTe
     /**
      * Close selenium session. Called from AfterSuite method of sub-class
      */
+    @AfterSuite(alwaysRun = true)
     public void close()
         throws Exception
     {

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java (original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java Tue Jul 31 09:54:27 2012
@@ -2,10 +2,8 @@ package org.apache.continuum.web.test.pa
 
 import java.io.File;
 
-import org.apache.continuum.web.test.XPathExpressionUtil;
-
 public abstract class AbstractUserRolesManagementTest
-	extends AbstractContinuumTest
+    extends AbstractAdminTest
 {
 	protected String username;
 	protected String fullname;

Modified: continuum/trunk/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/pom.xml?rev=1367475&r1=1367474&r2=1367475&view=diff
==============================================================================
--- continuum/trunk/pom.xml (original)
+++ continuum/trunk/pom.xml Tue Jul 31 09:54:27 2012
@@ -253,7 +253,13 @@ under the License.
       </plugin>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <version>2.12</version>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
+        <version>2.12</version>
         <configuration>
           <redirectTestOutputToFile>true</redirectTestOutputToFile>
           <argLine>-Xmx512m</argLine>
@@ -1603,11 +1609,6 @@ under the License.
         </exclusions>
       </dependency>
       <dependency>
-        <groupId>commons-io</groupId>
-        <artifactId>commons-io</artifactId>
-        <version>1.4</version>
-      </dependency>
-      <dependency>
         <groupId>org.jmock</groupId>
         <artifactId>jmock</artifactId>
         <version>2.4.0</version>



Mime
View raw message