<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>commits@continuum.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/continuum-commits/"/>
<id>http://mail-archives.apache.org/mod_mbox/continuum-commits/</id>
<updated>2009-12-08T20:26:07Z</updated>
<entry>
<title>svn commit: r887850 - /continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java</title>
<author><name>jzurbano@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200912.mbox/%3c20091207065334.233BE23889D7@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091207065334-233BE23889D7@eris-apache-org%3e</id>
<updated>2009-12-07T06:53:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jzurbano
Date: Mon Dec  7 06:53:32 2009
New Revision: 887850

URL: http://svn.apache.org/viewvc?rev=887850&amp;view=rev
Log:
[CONTINUUM-2373] - Distributed Master needs more detailed logging
* added getProjectGroupId() to be used when project id is not retrieved from context


Modified:
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java

Modified: continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java?rev=887850&amp;r1=887849&amp;r2=887850&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java
(original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java
Mon Dec  7 06:53:32 2009
@@ -27,6 +27,8 @@
 public class ContinuumDistributedUtil
 {
     public static final String KEY_PROJECT_ID = "project-id";
+    
+    public static final String KEY_PROJECT_GROUP_ID = "project-group-id";
 
     public static final String KEY_PROJECT_NAME = "project-name";
 
@@ -37,6 +39,11 @@
         return getInteger( context, KEY_PROJECT_ID );
     }
 
+    public static int getProjectGroupId( Map&lt;String, Object&gt; context )
+    {
+        return getInteger( context, KEY_PROJECT_GROUP_ID );
+    }
+
     public static String getArtifactId( Map&lt;String, Object&gt; context )
     {
         return getString( context, KEY_ARTIFACT_ID );
@@ -59,7 +66,15 @@
         {
             result.append( getArtifactId( context ) ).append( " " );
         }
-        result.append( "(projectId=" ).append( getProjectId( context ) ).append( ")" );
+        
+        if ( context.containsKey( KEY_PROJECT_ID ) )
+        {
+            result.append( "(projectId=" ).append( getProjectId( context ) ).append( ")"
);
+        }
+        else
+        {
+            result.append( "(projectGroupId=" ).append( getProjectGroupId( context ) ).append(
")" );
+        }
         
         return result.toString();
     }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r885683 - in /continuum/trunk/continuum-docs/src/site/apt: administrator_guides/distributed-builds.apt installation/build-agent.apt</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200912.mbox/%3c20091201073807.499B4238899B@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091201073807-499B4238899B@eris-apache-org%3e</id>
<updated>2009-12-01T07:38:07Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Dec  1 07:38:06 2009
New Revision: 885683

URL: http://svn.apache.org/viewvc?rev=885683&amp;view=rev
Log:
[CONTINUUM-2380] update distributed builds documentation
merge -r 885681 from 1.3.x branch

Modified:
    continuum/trunk/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
    continuum/trunk/continuum-docs/src/site/apt/installation/build-agent.apt

Modified: continuum/trunk/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt?rev=885683&amp;r1=885682&amp;r2=885683&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
(original)
+++ continuum/trunk/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
Tue Dec  1 07:38:06 2009
@@ -34,10 +34,8 @@
 
     Distributed Builds happen at the project group level of Continuum.
     When the entire project group is built in the Master, independent projects
-    (single project or multi-module project) are distributed to any available
-    registered Slave.  A Slave is said to be available when it is currently not
-    building anything as it can only attend to a single build request from the
-    Master.
+    (single project or multi-module project) are distributed to a single
+    registered Slave.
 
     In a project group containing a mix of projects, the distribution of work
     goes through the following steps:

Modified: continuum/trunk/continuum-docs/src/site/apt/installation/build-agent.apt
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-docs/src/site/apt/installation/build-agent.apt?rev=885683&amp;r1=885682&amp;r2=885683&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-docs/src/site/apt/installation/build-agent.apt (original)
+++ continuum/trunk/continuum-docs/src/site/apt/installation/build-agent.apt Tue Dec  1 07:38:06
2009
@@ -51,9 +51,9 @@
 
     * &lt;&lt;&lt;installations&gt;&gt;&gt; - a list of the installations available on the
build agent, including Maven, Ant, JDK, etc.
 	
-  Note that all of your agents need to be identical, as there is no way to control which
agent Continuum chooses.
-  In addition, if you are using the Continuum Release functionality, the master needs to
match the agents, as releases
-  will be executed on the master.
+  Note that all of your agents need not be identical, as there is a way to control which
agent Continuum chooses by using a 
+  {{{../administrator_guides/build-agent-groups.html} Build Agent Group}}. In addition, you
need to {{{../administrator_guides/buildEnvironment.html} configure}} 
+  the Build Environment from the Master in order to specify which installation to use for
the build.
 
   Now start the Build Agent by executing the startup script available in
   &lt;&lt;&lt;$CONTINUUM_BUILDAGENT_HOME/bin/&gt;&gt;&gt;.  For example:




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r885681 - in /continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt: administrator_guides/distributed-builds.apt installation/build-agent.apt</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200912.mbox/%3c20091201073656.671D5238899B@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091201073656-671D5238899B@eris-apache-org%3e</id>
<updated>2009-12-01T07:36:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Dec  1 07:36:55 2009
New Revision: 885681

URL: http://svn.apache.org/viewvc?rev=885681&amp;view=rev
Log:
[CONTINUUM-2380] update distributed builds documentation

Modified:
    continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
    continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt/installation/build-agent.apt

Modified: continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt?rev=885681&amp;r1=885680&amp;r2=885681&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
(original)
+++ continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt/administrator_guides/distributed-builds.apt
Tue Dec  1 07:36:55 2009
@@ -34,10 +34,8 @@
 
     Distributed Builds happen at the project group level of Continuum.
     When the entire project group is built in the Master, independent projects
-    (single project or multi-module project) are distributed to any available
-    registered Slave.  A Slave is said to be available when it is currently not
-    building anything as it can only attend to a single build request from the
-    Master.
+    (single project or multi-module project) are distributed to a single
+    registered Slave.
 
     In a project group containing a mix of projects, the distribution of work
     goes through the following steps:

Modified: continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt/installation/build-agent.apt
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt/installation/build-agent.apt?rev=885681&amp;r1=885680&amp;r2=885681&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt/installation/build-agent.apt
(original)
+++ continuum/branches/continuum-1.3.x/continuum-docs/src/site/apt/installation/build-agent.apt
Tue Dec  1 07:36:55 2009
@@ -47,9 +47,9 @@
 
     * &lt;&lt;&lt;installations&gt;&gt;&gt; - a list of the installations available on the
build agent, including Maven, Ant, JDK, etc.
 	
-  Note that all of your agents need to be identical, as there is no way to control which
agent Continuum chooses.
-  In addition, if you are using the Continuum Release functionality, the master needs to
match the agents, as releases
-  will be executed on the master.
+  Note that all of your agents need not be identical, as there is a way to control which
agent Continuum chooses by using a 
+  {{{../administrator_guides/build-agent-groups.html} Build Agent Group}}. In addition, you
need to {{{../administrator_guides/buildEnvironment.html} configure}} 
+  the Build Environment from the Master in order to specify which installation to use for
the build.
 
   Now start the Build Agent by executing the startup script available in
   &lt;&lt;&lt;$CONTINUUM_BUILDAGENT_HOME/bin/&gt;&gt;&gt;.  For example:




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r884391 - in /continuum/trunk: continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/ continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ continuum-co...</title>
<author><name>jzurbano@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091126031213.B775223888D1@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091126031213-B775223888D1@eris-apache-org%3e</id>
<updated>2009-11-26T03:12:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jzurbano
Date: Thu Nov 26 03:12:11 2009
New Revision: 884391

URL: http://svn.apache.org/viewvc?rev=884391&amp;view=rev
Log:
[CONTINUUM-2373] - Distributed Master needs more detailed logging
* added project/group/release IDs in the logs both in master and slave
* added logs in some methods that do not have one
* created ContinuumDistributedUtil class for retrieving values from "Map&lt;String, Object&gt;" variables


Added:
    continuum/trunk/continuum-distributed/continuum-distributed-commons/
    continuum/trunk/continuum-distributed/continuum-distributed-commons/pom.xml   (with props)
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/
    continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java   (with props)
Modified:
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
    continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java
    continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
    continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportClient.java
    continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java
    continuum/trunk/continuum-distributed/continuum-distributed-master/pom.xml
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
    continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
    continuum/trunk/continuum-distributed/pom.xml

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java?rev=884391&amp;r1=884390&amp;r2=884391&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java Thu Nov 26 03:12:11 2009
@@ -103,7 +103,7 @@
 
         int projectId = buildProjectTask.getProjectId();
 
-        log.info( "Initializing build" );
+        log.info( "Initializing build (projectId=" + projectId + ")" );
         BuildContext context = buildContextManager.getBuildContext( projectId );
         initializeBuildContext( context );
 

Modified: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java?rev=884391&amp;r1=884390&amp;r2=884391&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java Thu Nov 26 03:12:11 2009
@@ -104,7 +104,7 @@
         {
             SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
 
-            log.info( "initializing buildContext" );
+            log.info( "initializing buildContext for projectGroupId=" + prepareBuildTask.getProjectGroupId() );
             List&lt;Map&lt;String, Object&gt;&gt; buildContext =
                 initializeBuildContext( prepareBuildTask.getProjectsBuildDefinitionsMap(),
                 		                prepareBuildTask.getBuildTrigger(), prepareBuildTask.getScmRootAddress(),

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java?rev=884391&amp;r1=884390&amp;r2=884391&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/DefaultDistributedBuildService.java Thu Nov 26 03:12:11 2009
@@ -226,17 +226,18 @@
         }
         catch ( ContinuumStoreException e )
         {
-            log.error( "Error while updating project's state", e );
-            throw new ContinuumException( "Error while updating project's state", e );
+            log.error( "Error while updating project's state (projectId=" + projectId + ")", e );
+            throw new ContinuumException( "Error while updating project's state (projectId=" + projectId + ")", e );
         }
     }
     
     public void startPrepareBuild( Map&lt;String, Object&gt; context )
         throws ContinuumException
     {
+        int projectGroupId = ContinuumBuildConstant.getProjectGroupId( context );
+    	
         try
         {
-            int projectGroupId = ContinuumBuildConstant.getProjectGroupId( context );
             String scmRootAddress = ContinuumBuildConstant.getScmRootAddress( context );
     
             ProjectScmRoot scmRoot =
@@ -247,8 +248,8 @@
         }
         catch ( ContinuumStoreException e )
         {
-            log.error( "Error while updating project scm root's state", e );
-            throw new ContinuumException( "Error while updating project scm root's state", e );
+            log.error( "Error while updating project group'" + projectGroupId + "' scm root's state", e );
+            throw new ContinuumException( "Error while updating project group'" + projectGroupId + "' scm root's state", e );
         }
     }
     
@@ -334,16 +335,17 @@
         }
         catch ( ContinuumStoreException e )
         {
-            throw new ContinuumException( "Unable to update project from working copy", e );
+            throw new ContinuumException( "Unable to update project '" + ContinuumBuildConstant.getProjectId( context ) +
+        	                              "' from working copy", e );
         }
     }
 
     public boolean shouldBuild( Map&lt;String, Object&gt; context )
     {
+        int projectId = ContinuumBuildConstant.getProjectId( context );
+        
         try
         {
-            int projectId = ContinuumBuildConstant.getProjectId( context );
-    
             int buildDefinitionId = ContinuumBuildConstant.getBuildDefinitionId( context );
     
             int trigger = ContinuumBuildConstant.getTrigger( context );
@@ -361,17 +363,17 @@
     
             if ( buildDefinition.isBuildFresh() )
             {
-                log.info( "FreshBuild configured, building" );
+                log.info( "FreshBuild configured, building (projectId=" + projectId + ")" );
                 return true;
             }
             if ( buildDefinition.isAlwaysBuild() )
             {
-                log.info( "AlwaysBuild configured, building" );
+                log.info( "AlwaysBuild configured, building (projectId=" + projectId + ")" );
                 return true;
             }
             if ( oldBuildResult == null )
             {
-                log.info( "The project was never be built with the current build definition, building" );
+                log.info( "The project '" +  projectId + "' was never built with the current build definition, building" );
                 return true;
             }
     
@@ -379,26 +381,26 @@
             if ( project.getOldState() == ContinuumProjectState.ERROR ||
                 oldBuildResult.getState() == ContinuumProjectState.ERROR )
             {
-                log.info( "Latest state was 'ERROR', building" );
+                log.info( "Latest state was 'ERROR', building (projectId=" + projectId + ")" );
                 return true;
             }
     
             if ( trigger == ContinuumProjectState.TRIGGER_FORCED )
             {
-                log.info( "The project build is forced, building" );
+                log.info( "The project '" + projectId + "' build is forced, building" );
                 return true;
             }
     
             Date date = ContinuumBuildConstant.getLatestUpdateDate( context );
             if ( date != null &amp;&amp; oldBuildResult.getLastChangedDate() &gt;= date.getTime() )
             {
-                log.info( "No changes found,not building" );
+                log.info( "No changes found, not building (projectId=" + projectId + ")" );
                 return false;
             }
             else if ( date != null &amp;&amp; changes.isEmpty() )
             {
                 // fresh checkout from build agent that's why changes is empty
-                log.info( "Changes found in the current project, building" );
+                log.info( "Changes found in the current project, building (projectId=" + projectId + ")" );
                 return true;
             }
     
@@ -418,20 +420,20 @@
                 {
                     if ( !changes.isEmpty() )
                     {
-                        log.info(
-                            "The project was not built because all changes are unknown (maybe local modifications or ignored files not defined in your SCM tool." );
+                        log.info( "The project '" + projectId +
+                            "' was not built because all changes are unknown (maybe local modifications or ignored files not defined in your SCM tool." );
                     }
                     else
                     {
-                        log.info(
-                            "The project was not built because no changes were detected in sources since the last build." );
+                        log.info( "The project '" + projectId +
+                            "' was not built because no changes were detected in sources since the last build." );
                     }
                 }
     
                 // Check dependencies changes
                 if ( modifiedDependencies != null &amp;&amp; !modifiedDependencies.isEmpty() )
                 {
-                    log.info( "Found dependencies changes, building" );
+                    log.info( "Found dependencies changes, building (projectId=" + projectId + ")" );
                     shouldBuild = true;
                 }
             }
@@ -446,22 +448,22 @@
     
             if ( shouldBuild )
             {
-                log.info( "Changes found in the current project, building" );
+                log.info( "Changes found in the current project, building (projectId=" + projectId + ")" );
             }
             else
             {
-                log.info( "No changes in the current project, not building" );
+                log.info( "No changes in the current project, not building (projectId=" + projectId + ")" );
             }
     
             return shouldBuild;
         }
         catch ( ContinuumStoreException e )
         {
-            log.error( "Failed to determine if project should build", e );
+            log.error( "Failed to determine if project '" + projectId + "' should build", e );
         }
         catch ( ContinuumException e )
         {
-            log.error( "Failed to determine if project should build", e );
+            log.error( "Failed to determine if project '" + projectId + "' should build", e );
         }
     
         return false;
@@ -482,14 +484,15 @@
         {
             if ( log.isInfoEnabled() )
             {
-                log.info( "recursive build and changes found --&gt; building" );
+                log.info( "recursive build and changes found --&gt; building (projectId=" + project.getId() + ")" );
             }
             return true;
         }
     
         if ( !project.getVersion().equals( mavenProjectVersion ) )
         {
-            log.info( "Found changes in project's version ( maybe project was recently released ), building" );
+            log.info( "Found changes in project's version ( maybe project '" + project.getId() +
+            		  "' was recently released ), building" );
             return true;
         }
     
@@ -497,7 +500,7 @@
         {
             if ( log.isInfoEnabled() )
             {
-                log.info( "Found no changes, not building" );
+                log.info( "Found no changes, not building (projectId=" + project.getId() + ")" );
             }
             return false;
         }
@@ -549,7 +552,7 @@
     
         if ( !shouldBuild )
         {
-            log.info( "Changes are only in sub-modules." );
+            log.info( "Changes are only in sub-modules (projectId=" + project.getId() + ")." );
         }
     
         if ( log.isDebugEnabled() )

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java?rev=884391&amp;r1=884390&amp;r2=884391&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java Thu Nov 26 03:12:11 2009
@@ -748,7 +748,7 @@
             return true;
         }
 
-        log.info( "Build agent: " + buildAgentUrl + "is either disabled or removed" );
+        log.info( "Build agent: " + buildAgentUrl + " is either disabled or removed" );
         return false;
     }
 }
\ No newline at end of file

Added: continuum/trunk/continuum-distributed/continuum-distributed-commons/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-commons/pom.xml?rev=884391&amp;view=auto
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-commons/pom.xml (added)
+++ continuum/trunk/continuum-distributed/continuum-distributed-commons/pom.xml Thu Nov 26 03:12:11 2009
@@ -0,0 +1,30 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!--
+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.
+--&gt;
+
+&lt;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"&gt;
+  &lt;parent&gt;
+    &lt;artifactId&gt;continuum-distributed&lt;/artifactId&gt;
+    &lt;groupId&gt;org.apache.continuum&lt;/groupId&gt;
+    &lt;version&gt;1.4.0-SNAPSHOT&lt;/version&gt;
+  &lt;/parent&gt;
+  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
+  &lt;artifactId&gt;continuum-distributed-commons&lt;/artifactId&gt;
+  &lt;name&gt;Continuum :: Distributed Build :: Commons&lt;/name&gt;
+&lt;/project&gt;

Propchange: continuum/trunk/continuum-distributed/continuum-distributed-commons/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java?rev=884391&amp;view=auto
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java (added)
+++ continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java Thu Nov 26 03:12:11 2009
@@ -0,0 +1,111 @@
+package org.apache.continuum.distributed.commons.utils;
+
+/*
+ * 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 java.util.Map;
+
+/**
+ * ContinuumDistributedUtil
+ */
+public class ContinuumDistributedUtil
+{
+    public static final String KEY_PROJECT_ID = "project-id";
+
+    public static final String KEY_PROJECT_NAME = "project-name";
+
+    public static final String KEY_ARTIFACT_ID = "artifact-id";
+
+    public static int getProjectId( Map&lt;String, Object&gt; context )
+    {
+        return getInteger( context, KEY_PROJECT_ID );
+    }
+
+    public static String getArtifactId( Map&lt;String, Object&gt; context )
+    {
+        return getString( context, KEY_ARTIFACT_ID );
+    }
+
+    public static String getProjectName( Map&lt;String, Object&gt; context )
+    {
+        return getString( context, KEY_PROJECT_NAME );
+    }
+    
+    public static String getProjectNameAndId( Map&lt;String, Object&gt; context )
+    {
+        StringBuilder result = new StringBuilder();
+        
+        if ( getProjectName( context ) != null )
+        {
+            result.append( getProjectName( context ) ).append( " " );
+        }
+        else if ( getArtifactId( context ) != null )
+        {
+            result.append( getArtifactId( context ) ).append( " " );
+        }
+        result.append( "(projectId=" ).append( getProjectId( context ) ).append( ")" );
+        
+        return result.toString();
+    }
+
+    // ----------------------------------------------------------------------
+    //
+    // ----------------------------------------------------------------------
+
+    private static String getString( Map&lt;String, Object&gt; context, String key )
+    {
+        Object obj = getObject( context, key, null );
+
+        if ( obj == null )
+        {
+            return null;
+        }
+        else
+        {
+            return (String) obj;
+        }
+    }
+
+    private static int getInteger( Map&lt;String, Object&gt; context, String key )
+    {
+        Object obj = getObject( context, key, null );
+
+        if ( obj == null )
+        {
+            return 0;
+        }
+        else
+        {
+            return (Integer) obj;
+        }
+    }
+
+    private static Object getObject( Map&lt;String, Object&gt; context, String key, Object defaultValue )
+    {
+        Object value = context.get( key );
+
+        if ( value == null )
+        {
+            return defaultValue;
+        }
+
+        return value;
+    }
+}
+

Propchange: continuum/trunk/continuum-distributed/continuum-distributed-commons/src/main/java/org/apache/continuum/distributed/commons/utils/ContinuumDistributedUtil.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportClient.java?rev=884391&amp;r1=884390&amp;r2=884391&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportClient.java (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-client/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportClient.java Thu Nov 26 03:12:11 2009
@@ -30,6 +30,8 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import org.apache.continuum.distributed.commons.utils.ContinuumDistributedUtil;
+
 /**
  * MasterBuildAgentTransportClient
  */
@@ -71,16 +73,17 @@
         throws Exception
     {
         Boolean result;
+        String projectInfo = ContinuumDistributedUtil.getProjectNameAndId( buildResult );
 
         try
         {
             result = master.returnBuildResult( buildResult );
-            log.info( "Returning the build result." );
+            log.info( "Returning the build result for project " + projectInfo + "." );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to return the build result.", e );
-            throw new Exception( "Failed to return the build result", e );
+            log.error( "Failed to return the build result for project " + projectInfo + ".", e );
+            throw new Exception( "Failed to return the build result for project " + projectInfo + ".", e );
         }
 
         return result;
@@ -109,16 +112,17 @@
         throws Exception
     {
         Boolean result;
+        String projectInfo = ContinuumDistributedUtil.getProjectNameAndId( prepareBuildResult );
 
         try
         {
             result = master.prepareBuildFinished( prepareBuildResult );
-            log.info( "Prepare build finished." );
+            log.info( "Prepare build finished for project " + projectInfo + "." );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to finish prepare build" );
-            throw new Exception( "Failed to finish prepare build", e );
+            log.error( "Failed to finish prepare build for project " + projectInfo + "." );
+            throw new Exception( "Failed to finish prepare build for project " + projectInfo + ".", e );
         }
 
         return result;
@@ -132,12 +136,12 @@
         try
         {
             result = master.startProjectBuild( projectId );
-            log.info( "Return project currently building" );
+            log.info( "Return project currently building, projectId=" + projectId );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to return project currently building", e );
-            throw new Exception( "Failed to return project currently building", e );
+            log.error( "Failed to return project currently building, projectId=" + projectId, e );
+            throw new Exception( "Failed to return project currently building, projectId=" + projectId, e );
         }
 
         return result;
@@ -147,16 +151,17 @@
         throws Exception
     {
         Boolean result;
+        String projectInfo = ContinuumDistributedUtil.getProjectNameAndId( prepareBuildResult );
 
         try
         {
             result = master.startPrepareBuild( prepareBuildResult );
-            log.info( "Started prepare build" );
+            log.info( "Start prepare build for project " + projectInfo );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to start prepare build", e );
-            throw new Exception( "Failed to start prepare build", e );
+            log.error( "Failed to start prepare build for project " + projectInfo, e );
+            throw new Exception( "Failed to start prepare build for project " + projectInfo, e );
         }
 
         return result;
@@ -169,12 +174,14 @@
         try
         {
             result = master.getEnvironments( buildDefinitionId, installationType );
-            log.info( "Retrieved environments" );
+            log.info( "Retrieved environments. buildDefinitionId=" + buildDefinitionId + ", installationType=" + installationType );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to retrieve environments", e );
-            throw new Exception( "Failed to retrieve environments", e );
+            log.error( "Failed to retrieve environments. buildDefinitionId=" + buildDefinitionId +
+                       ", installationType=" + installationType, e );
+            throw new Exception( "Failed to retrieve environments. buildDefinitionId=" +
+                                  buildDefinitionId + ", installationType=" + installationType, e );
         }
 
         return result;
@@ -184,16 +191,17 @@
         throws Exception
     {
         Boolean result;
+        String projectInfo = ContinuumDistributedUtil.getProjectNameAndId( project );
 
         try
         {
             result = master.updateProject( project );
-            log.info( "Updating project" );
+            log.info( "Updating project " + projectInfo );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to update project", e );
-            throw new Exception( "Failed to update project", e );
+            log.error( "Failed to update project " + projectInfo, e );
+            throw new Exception( "Failed to update project " + projectInfo, e );
         }
 
         return result;
@@ -203,16 +211,17 @@
         throws Exception
     {
         Boolean result;
+        String projectInfo = ContinuumDistributedUtil.getProjectNameAndId( context );
 
         try
         {
             result = master.shouldBuild( context );
-            log.info( "Checking if project should build" );
+            log.info( "Checking if project " + projectInfo + " should build" );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to determine if project should build", e );
-            throw new Exception( "Failed to determine if project should build", e );
+            log.error( "Failed to determine if project " + projectInfo + " should build", e );
+            throw new Exception( "Failed to determine if project " + projectInfo + " should build", e );
         }
 
         return result;

Modified: continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java?rev=884391&amp;r1=884390&amp;r2=884391&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-master/continuum-distributed-master-server/src/main/java/org/apache/continuum/distributed/transport/master/MasterBuildAgentTransportServer.java Thu Nov 26 03:12:11 2009
@@ -22,6 +22,7 @@
 import java.util.Map;
 
 import org.apache.continuum.builder.distributed.DistributedBuildService;
+import org.apache.continuum.distributed.commons.utils.ContinuumDistributedUtil;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -43,7 +44,7 @@
     public Boolean returnBuildResult( Map&lt;String, Object&gt; buildResult )
         throws Exception
     {
-        log.info( "Build result returned." );
+        log.info( "Build result returned for project " + ContinuumDistributedUtil.getProjectNameAndId( buildResult ) + "." );
         distributedBuildService.updateBuildResult( buildResult );
         return Boolean.TRUE;
     }
@@ -59,7 +60,7 @@
     public Boolean prepareBuildFinished( Map&lt;String, Object&gt; prepareBuildResult )
         throws Exception
     {
-        log.info( "Prepare build finished." );
+        log.info( "Prepare build finished for project " + ContinuumDistributedUtil.getProjectNameAndId( prepareBuildResult ) + "." );
         distributedBuildService.prepareBuildFinished( prepareBuildResult );
         return Boolean.TRUE;
     }
@@ -67,7 +68,7 @@
     public Boolean startProjectBuild( Integer projectId )
         throws Exception
     {
-        log.info( "Start project build." );
+        log.info( "Start project '" + projectId + "' build." );
         distributedBuildService.startProjectBuild( projectId );
         return Boolean.TRUE;
     }
@@ -75,7 +76,7 @@
     public Boolean startPrepareBuild( Map&lt;String, Object&gt; prepareBuildResult )
         throws Exception
     {
-        log.info( "Start prepare build." );
+        log.info( "Start prepare build of project " + ContinuumDistributedUtil.getProjectNameAndId( prepareBuildResult ) + "." );
         distributedBuildService.startPrepareBuild( prepareBuildResult );
         return Boolean.TRUE;
     }
@@ -83,14 +84,14 @@
     public Map&lt;String, String&gt; getEnvironments( Integer buildDefinitionId, String installationType )
         throws Exception
     {
-        log.info( "Retrieving environments" );
+        log.info( "Retrieving environments. buildDefinitionId=" + buildDefinitionId + ", installationType=" + installationType );
         return distributedBuildService.getEnvironments( buildDefinitionId, installationType );
     }
 
     public Boolean updateProject( Map&lt;String, Object&gt; project )
         throws Exception
     {
-        log.info( "Start updating project" );
+        log.info( "Start updating project " + ContinuumDistributedUtil.getProjectNameAndId( project ) );
         distributedBuildService.updateProject( project );
         return Boolean.TRUE;
     }
@@ -98,7 +99,7 @@
     public Boolean shouldBuild( Map&lt;String, Object&gt; context )
         throws Exception
     {
-        log.info( "Checking if project should build" );
+        log.info( "Checking if project " + ContinuumDistributedUtil.getProjectNameAndId( context ) + " should build" );
         return distributedBuildService.shouldBuild( context );
     }
 }

Modified: continuum/trunk/continuum-distributed/continuum-distributed-master/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-master/pom.xml?rev=884391&amp;r1=884390&amp;r2=884391&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-master/pom.xml (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-master/pom.xml Thu Nov 26 03:12:11 2009
@@ -32,4 +32,12 @@
     &lt;module&gt;continuum-distributed-master-server&lt;/module&gt;
     &lt;module&gt;continuum-distributed-master-client&lt;/module&gt;
   &lt;/modules&gt;
+  
+  &lt;dependencies&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.apache.continuum&lt;/groupId&gt;
+      &lt;artifactId&gt;continuum-distributed-commons&lt;/artifactId&gt;
+      &lt;version&gt;${project.version}&lt;/version&gt;
+    &lt;/dependency&gt;
+  &lt;/dependencies&gt;
 &lt;/project&gt;

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java?rev=884391&amp;r1=884390&amp;r2=884391&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-client/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportClient.java Thu Nov 26 03:12:11 2009
@@ -114,12 +114,12 @@
         try
         {
             buildResult = slave.getBuildResult( projectId );
-            log.info( "Build result for project " + projectId + " acquired." );
+            log.info( "Build result for project '" + projectId + "' acquired." );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to get build result for project " + projectId, e );
-            throw new Exception( "Failed to get build result for project " + projectId, e );
+            log.error( "Failed to get build result for project '" + projectId + "'", e );
+            throw new Exception( "Failed to get build result for project '" + projectId + "'", e );
         }
 
         return buildResult;
@@ -190,12 +190,12 @@
         try
         {
             result = slave.generateWorkingCopyContent( projectId, directory, baseUrl, imagesBaseUrl );
-            log.info( "Generated working copy content" );
+            log.info( "Generated working copy content for project '" + projectId + "'" );
         }
         catch ( Exception e )
         {
-            log.error( "Error generating working copy content", e );
-            throw new Exception( "Error generating working copy content", e );
+            log.error( "Error generating working copy content for project '" + projectId + "'", e );
+            throw new Exception( "Error generating working copy content for project '" + projectId + "'", e );
         }
 
         return result;
@@ -209,12 +209,12 @@
         try
         {
             result = slave.getProjectFileContent( projectId, directory, filename );
-            log.info( "Retrived project file content" );
+            log.info( "Retrieved project '" + projectId + "' file content" );
         }
         catch ( Exception e )
         {
-            log.error( "Error retrieving project file content", e );
-            throw new Exception( "Error retrieving project file content", e );
+            log.error( "Error retrieving project '" + projectId + "' file content", e );
+            throw new Exception( "Error retrieving project '" + projectId + "' file content", e );
         }
 
         return result;
@@ -228,12 +228,12 @@
         try
         {
             result = slave.getReleasePluginParameters( projectId, pomFilename );
-            log.info( "Retrieving release plugin parameters" );
+            log.info( "Retrieving release plugin parameters for project '" + projectId + "'" );
         }
         catch ( Exception e )
         {
-            log.error( "Error retrieving release plugin parameters", e );
-            throw new Exception( "Error retrieving release plugin parameters", e );
+            log.error( "Error retrieving release plugin parameters for project '" + projectId + "'", e );
+            throw new Exception( "Error retrieving release plugin parameters for project '" + projectId + "'", e );
         }
 
         return result;
@@ -247,12 +247,12 @@
         try
         {
             result = slave.processProject( projectId, pomFilename, autoVersionSubmodules );
-            log.info( "Processing project" );
+            log.info( "Processing project '" + projectId + "'" );
         }
         catch ( Exception e )
         {
-            log.error( "Error processing project", e );
-            throw new Exception( "Error processing project", e );
+            log.error( "Error processing project '" + projectId + "'", e );
+            throw new Exception( "Error processing project '" + projectId + "'", e );
         }
 
         return result;
@@ -267,7 +267,7 @@
         try
         {
             releaseId = slave.releasePrepare( project, properties, releaseVersion, developmentVersion, environments, username );
-            log.info( "Preparing release" );
+            log.info( "Preparing release '" + releaseId + "'" );
         }
         catch ( Exception e )
         {
@@ -286,12 +286,12 @@
         try
         {
             result = slave.getReleaseResult( releaseId );
-            log.info( "Retrieving release result for " + releaseId );
+            log.info( "Retrieving release result, releaseId=" + releaseId );
         }
         catch ( Exception e )
         {
-            log.error( "Error retrieving release result for " + releaseId, e );
-            throw new Exception( "Error retrieving release result for " + releaseId, e );
+            log.error( "Error retrieving release result, releaseId=" + releaseId, e );
+            throw new Exception( "Error retrieving release result, releaseId=" + releaseId, e );
         }
 
         return result;
@@ -305,12 +305,12 @@
         try
         {
             result = slave.getListener( releaseId );
-            log.info( "Retrieving listener for " + releaseId );
+            log.info( "Retrieving listener for releaseId=" + releaseId );
         }
         catch ( Exception e )
         {
-            log.error( "Error retrieving listener for " + releaseId, e );
-            throw new Exception( "Error retrieving listener for " + releaseId, e );
+            log.error( "Error retrieving listener for releaseId=" + releaseId, e );
+            throw new Exception( "Error retrieving listener for releaseId=" + releaseId, e );
         }
 
         return result;
@@ -325,12 +325,12 @@
         {
             slave.removeListener( releaseId );
             result = Boolean.FALSE;
-            log.info( "Removing listener for " + releaseId );
+            log.info( "Removing listener for releaseId=" + releaseId );
         }
         catch ( Exception e )
         {
-            log.error( "Error removing listener for " + releaseId, e );
-            throw new Exception( "Error removing listener for " + releaseId, e );
+            log.error( "Error removing listener for releaseId=" + releaseId, e );
+            throw new Exception( "Error removing listener for releaseId=" + releaseId, e );
         }
 
         return result;
@@ -344,12 +344,12 @@
         try
         {
             result = slave.getPreparedReleaseName( releaseId );
-            log.info( "Retrieving prepared release name for " + releaseId );
+            log.info( "Retrieving prepared release name, releaseId=" + releaseId );
         }
         catch ( Exception e )
         {
-            log.error( "Error while retrieving prepared release name for " + releaseId );
-            throw new Exception( "Error while retrieving prepared release name for " + releaseId );
+            log.error( "Error while retrieving prepared release name, releaseId=" + releaseId );
+            throw new Exception( "Error while retrieving prepared release name, releaseId=" + releaseId );
         }
 
         return result;
@@ -365,12 +365,12 @@
         {
             slave.releasePerform( releaseId, goals, arguments, useReleaseProfile, repository, username );
             result = Boolean.FALSE;
-            log.info( "Performing release" );
+            log.info( "Performing release of releaseId=" + releaseId );
         }
         catch ( Exception e )
         {
-            log.error( "Error performing release", e );
-            throw new Exception( "Error performing release", e );
+            log.error( "Error performing release of releaseId=" + releaseId, e );
+            throw new Exception( "Error performing release of releaseId=" + releaseId, e );
         }
 
         return result;
@@ -387,12 +387,12 @@
         {
             result = slave.releasePerformFromScm( goals, arguments, useReleaseProfile, repository, scmUrl, scmUsername,
                                                   scmPassword, scmTag, scmTagBase, environments, username );
-            log.info( "Performing release" );
+            log.info( "Performing release of scmUrl=" + scmUrl );
         }
         catch ( Exception e )
         {
-            log.error( "Error performing release from scm", e );
-            throw new Exception( "Error performing release from scm", e );
+            log.error( "Error performing release from scm '" + scmUrl + "'", e );
+            throw new Exception( "Error performing release from scm '" + scmUrl + "'", e );
         }
 
         return result;
@@ -406,12 +406,12 @@
         try
         {
             result = slave.releaseCleanup( releaseId );
-            log.info( "Cleanup release of " + releaseId );
+            log.info( "Cleanup release, releaseId=" + releaseId );
         }
         catch ( Exception e )
         {
-            log.error( "Error cleaning up release of " + releaseId, e );
-            throw new Exception( "Error cleaning up release of " + releaseId, e );
+            log.error( "Error cleaning up release, releaseId=" + releaseId, e );
+            throw new Exception( "Error cleaning up release, releaseId=" + releaseId, e );
         }
 
         return result;
@@ -426,12 +426,12 @@
         {
             slave.releaseRollback( releaseId, projectId );
             result = Boolean.TRUE;
-            log.info( "Rollback release " + releaseId );
+            log.info( "Rollback release. releaseId=" + releaseId + ", projectId=" + projectId );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to rollback release " + releaseId );
-            throw new Exception( "Failed to rollback release " + releaseId );
+            log.error( "Failed to rollback release. releaseId=" + releaseId + ", projectId=" + projectId );
+            throw new Exception( "Failed to rollback release. releaseId=" + releaseId + ", projectId=" + projectId );
         }
 
         return result;
@@ -521,12 +521,12 @@
         try
         {
             result = slave.isProjectGroupInQueue( projectGroupId );
-            log.info( "Checking if project group is in queue" );
+            log.info( "Checking if project group '" + projectGroupId + "' is in queue" );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to check if project group is in queue", e );
-            throw new Exception( "Failed to check if project group is in queue", e );
+            log.error( "Failed to check if project group '" + projectGroupId + "' is in queue", e );
+            throw new Exception( "Failed to check if project group '" + projectGroupId + "' is in queue", e );
         }
 
         return result;
@@ -578,15 +578,15 @@
         try
         {
             result = slave.removeFromPrepareBuildQueue( projectGroupId, scmRootId );
-            log.info( "Removing projectGroupId=" + projectGroupId + " scmRootId=" + scmRootId +
-                      " from prepare build queue of agent" );
+            log.debug( "Remove projects from prepare build queue. projectGroupId=" + projectGroupId +
+            		   ", scmRootId=" + scmRootId );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to remove projectGroupId=" + projectGroupId + " scmRootId=" + scmRootId +
-                       " from prepare build queue of agent", e );
-            throw new Exception( "Failed to remove projectGroupId=" + projectGroupId + " scmRootId=" + scmRootId +
-                                 " from prepare build queue of agent", e );
+            log.error( "Failed to remove projects from prepare build queue. projectGroupId=" + projectGroupId +
+                       ", scmRootId=" + scmRootId );
+            throw new Exception( "Failed to remove from prepare build queue. projectGroupId=" + projectGroupId +
+                                 " scmRootId=" + scmRootId, e );
         }
 
         return result;
@@ -619,12 +619,12 @@
         try
         {
             result = slave.removeFromBuildQueue( projectId, buildDefinitionId );
-            log.info( "Removing project " + projectId + " from build queue of agent" );
+            log.info( "Removing project '" + projectId + "' from build queue of agent" );
         }
         catch ( Exception e )
         {
-            log.error( "Failed to remove project " + projectId + " from build queue of agent", e );
-            throw new Exception( "Failed to remove project " + projectId + " from build queue of agent", e );
+            log.error( "Failed to remove project '" + projectId + "' from build queue of agent", e );
+            throw new Exception( "Failed to remove project '" + projectId + "' from build queue of agent", e );
         }
 
         return result;

Modified: continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java?rev=884391&amp;r1=884390&amp;r2=884391&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java (original)
+++ continuum/trunk/continuum-distributed/continuum-distributed-slave/continuum-distributed-slave-server/src/main/java/org/apache/continuum/distributed/transport/slave/SlaveBuildAgentTransportServer.java Thu Nov 26 03:12:11 2009
@@ -90,11 +90,11 @@
         try
         {
             buildResult = continuumBuildAgentService.getBuildResult( projectId );
-            log.info( "Build result for project " + projectId + " acquired." );
+            log.info( "Build result for project '" + projectId + "' acquired." );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to get build result for project " + projectId, e );
+            log.error( "Failed to get build result for project '" + projectId + "'", e );
             throw e;
         }
 
@@ -106,7 +106,7 @@
     {
         Map&lt;String, Object&gt; project = continuumBuildAgentService.getProjectCurrentlyBuilding();
 
-        log.info( "Retrieving currently building project");
+        log.info( "Retrieving currently building project" );
 
         return project;
     }
@@ -144,12 +144,12 @@
     {
         try
         {
-            return continuumBuildAgentService.generateWorkingCopyContent( projectId, directory, baseUrl,
-                                                                          imagesBaseUrl );
+            log.info( "Generate working copy content for project '" + projectId + "'" );
+            return continuumBuildAgentService.generateWorkingCopyContent( projectId, directory, baseUrl, imagesBaseUrl );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to generate working copy content", e );
+            log.error( "Failed to generate working copy content for projectId=" + projectId, e );
             throw e;
         }
     }
@@ -159,11 +159,12 @@
     {
         try
         {
+            log.info( "Retrieve project '" + projectId + "' file content" );
             return continuumBuildAgentService.getProjectFileContent( projectId, directory, filename );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to retrieve project file content", e );
+            log.error( "Failed to retrieve project '" + projectId + "' file content", e );
             throw e;
         }
     }
@@ -173,11 +174,12 @@
     {
         try
         {
+            log.info( "Retrieving release plugin parameters for project '" + projectId + "'" );
             return continuumBuildAgentService.getReleasePluginParameters( projectId, pomFilename );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to retrieve release plugin parameters", e );
+            log.error( "Failed to retrieve release plugin parameters for project '" + projectId + "'", e );
             throw e;
         }
     }
@@ -187,11 +189,12 @@
     {
         try
         {
+            log.info( "Processing project '" + projectId + "'" );
             return continuumBuildAgentService.processProject( projectId, pomFilename, autoVersionSubmodules );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to process project", e );
+            log.error( "Failed to process project '" + projectId + "'", e );
             throw e;
         }
     }
@@ -202,6 +205,7 @@
     {
         try
         {
+            log.info( "Preparing release" );
             return continuumBuildAgentService.releasePrepare( project, properties, releaseVersion, developmentVersion,
                                                               environments, username );
         }
@@ -217,11 +221,12 @@
     {
         try
         {
+            log.info( "Retrieving listener for releaseId=" + releaseId );
             return continuumBuildAgentService.getListener( releaseId );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to retrieve listener state of " + releaseId, e );
+            log.error( "Failed to retrieve listener state of releaseId=" + releaseId, e );
             throw e;
         }
     }
@@ -231,11 +236,12 @@
     {
         try
         {
+            log.info( "Retrieving release result, releaseId=" + releaseId );
             return continuumBuildAgentService.getReleaseResult( releaseId );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to retrieve release result of " + releaseId, e );
+            log.error( "Failed to retrieve release result of releaseId=" + releaseId, e );
             throw e;
         }
     }
@@ -249,10 +255,11 @@
         {
             continuumBuildAgentService.removeListener( releaseId );
             result = Boolean.TRUE;
+            log.info( "Removing listener for releaseId=" + releaseId );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to remove listener of " + releaseId, e );
+            log.error( "Failed to remove listener of releaseId=" + releaseId, e );
             throw e;
         }
 
@@ -264,11 +271,12 @@
     {
         try
         {
+            log.info( "Retrieving prepared release name, releaseId=" + releaseId );
             return continuumBuildAgentService.getPreparedReleaseName( releaseId );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to retrieve prepared release name of " + releaseId );
+            log.error( "Failed to retrieve prepared release name of releaseId=" + releaseId );
             throw e;
         }
     }
@@ -283,10 +291,11 @@
         {
             continuumBuildAgentService.releasePerform( releaseId, goals, arguments, useReleaseProfile, repository, username );
             result = Boolean.TRUE;
+            log.info( "Perform release of releaseId=" + releaseId );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Unable to perform release", e );
+            log.error( "Unable to perform release of releaseId=" + releaseId, e );
             throw e;
         }
 
@@ -300,13 +309,14 @@
     {
         try
         {
+            log.info( "Perform release of scmUrl=" + scmUrl );
             return continuumBuildAgentService.releasePerformFromScm( goals, arguments, useReleaseProfile, repository,
                                                                      scmUrl, scmUsername, scmPassword, scmTag,
                                                                      scmTagBase, environments, username );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Unable to perform release", e );
+            log.error( "Unable to perform release of scmUrl=" + scmUrl, e );
             throw e;
         }
     }
@@ -316,11 +326,12 @@
     {
         try
         {
+            log.info( "Cleanup release, releaseId=" + releaseId );
             return continuumBuildAgentService.releaseCleanup( releaseId );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Unable to cleanup release of " + releaseId, e );
+            log.error( "Unable to cleanup release, releaseId=" + releaseId, e );
             throw e;
         }
     }
@@ -334,10 +345,11 @@
         {
             continuumBuildAgentService.releaseRollback( releaseId, projectId );
             result = Boolean.TRUE;
+            log.info( "Rollback release. releaseId=" + releaseId + ", projectId=" + projectId );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to rollback release " + releaseId, e );
+            log.error( "Failed to rollback release. releaseId=" + releaseId + ", projectId=" + projectId, e );
             throw e;
         }
 
@@ -377,6 +389,7 @@
     {
         try
         {
+            log.info( "Retrieving projects in build queue" );
             return continuumBuildAgentService.getProjectsInBuildQueue();
         }
         catch ( ContinuumBuildAgentException e )
@@ -391,6 +404,7 @@
     {
         try
         {
+            log.info( "Retrieving projects in prepare build queue" );
             return continuumBuildAgentService.getProjectsInPrepareBuildQueue();
         }
         catch ( ContinuumBuildAgentException e )
@@ -403,18 +417,21 @@
     public Boolean isProjectGroupInQueue( int projectGroupId )
         throws Exception
     {
+        log.info( "Checking if project group '" + projectGroupId + "' is in queue" );
         return continuumBuildAgentService.isProjectGroupInQueue( projectGroupId );
     }
 
     public Boolean isProjectCurrentlyBuilding( int projectId )
         throws Exception
     {
+        log.info( "Checking if project " + projectId + " is currently building in agent" );
         return continuumBuildAgentService.isProjectCurrentlyBuilding( projectId );
     }
 
     public Boolean isProjectInBuildQueue( int projectId )
         throws Exception
     {
+        log.info( "Checking if project " + projectId + "is in build queue of agent" );
         return continuumBuildAgentService.isProjectInBuildQueue( projectId );
     }
 
@@ -423,12 +440,15 @@
     {
         try
         {
+            log.info( "Remove projects from prepare build queue. projectGroupId=" + projectGroupId +
+                      ", scmRootId=" + scmRootId );
             return continuumBuildAgentService.removeFromPrepareBuildQueue( projectGroupId, scmRootId );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to remove projects from prepare build queue" );
-             throw e;
+            log.error( "Failed to remove projects from prepare build queue. projectGroupId=" + projectGroupId +
+                       ", scmRootId=" + scmRootId );
+            throw e;
         }
     }
 
@@ -441,6 +461,7 @@
         {
             continuumBuildAgentService.removeFromPrepareBuildQueue( hashCodes );
             result = Boolean.TRUE;
+            log.info( "Remove projects from prepare build queue" );
         }
         catch ( ContinuumBuildAgentException e )
         {
@@ -456,11 +477,12 @@
     {
         try
         {
+            log.debug( "Remove project '" + projectId + "' from build queue" );
             return continuumBuildAgentService.removeFromBuildQueue( projectId, buildDefinitionId );
         }
         catch ( ContinuumBuildAgentException e )
         {
-            log.error( "Failed to remove project from build queue" );
+            log.error( "Failed to remove project '" + projectId + "' from build queue" );
             throw e;
         }
     }
@@ -474,6 +496,7 @@
         {
             continuumBuildAgentService.removeFromBuildQueue( hashCodes );
             result = Boolean.TRUE;
+            log.info( "Remove projects from build queue" );
         }
         catch ( ContinuumBuildAgentException e )
         {

Modified: continuum/trunk/continuum-distributed/pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-distributed/pom.xml?rev=884391&amp;r1=884390&amp;r2=884391&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-distributed/pom.xml (original)
+++ continuum/trunk/continuum-distributed/pom.xml Thu Nov 26 03:12:11 2009
@@ -30,6 +30,7 @@
   &lt;modules&gt;
     &lt;module&gt;continuum-distributed-master&lt;/module&gt;
     &lt;module&gt;continuum-distributed-slave&lt;/module&gt;
+    &lt;module&gt;continuum-distributed-commons&lt;/module&gt;
     &lt;!-- &lt;module&gt;continuum-distributed-tests&lt;/module&gt; --&gt;
   &lt;/modules&gt;
 &lt;/project&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r881615 - /continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091117231144.4A04D2388882@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091117231144-4A04D2388882@eris-apache-org%3e</id>
<updated>2009-11-17T23:11:44Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Nov 17 23:11:43 2009
New Revision: 881615

URL: http://svn.apache.org/viewvc?rev=881615&amp;view=rev
Log:
fixed unit test
merge -r 881614 of 1.3.x branch

Modified:
    continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java

Modified: continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java?rev=881615&amp;r1=881614&amp;r2=881615&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
(original)
+++ continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
Tue Nov 17 23:11:43 2009
@@ -295,8 +295,7 @@
 
         ReleaseResult result = (ReleaseResult) releaseManager.getReleaseResults().get( "testRelease"
);
 
-        if ( !result.getOutput().contains( "test/executable/mvn" ) &amp;&amp; 
-                !result.getOutput().contains( "test\\executable\\mvn" ) )
+        if ( !result.getOutput().replace( "\\", "/" ).contains( "test/executable/mvn" ) )
         {
             fail( "Error in release:perform. Missing executable" );
         }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r881614 - /continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091117231035.DAAE1238888F@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091117231035-DAAE1238888F@eris-apache-org%3e</id>
<updated>2009-11-17T23:10:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Nov 17 23:10:35 2009
New Revision: 881614

URL: http://svn.apache.org/viewvc?rev=881614&amp;view=rev
Log:
fixed unit test

Modified:
    continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java

Modified: continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java?rev=881614&amp;r1=881613&amp;r2=881614&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
Tue Nov 17 23:10:35 2009
@@ -295,8 +295,7 @@
 
         ReleaseResult result = (ReleaseResult) releaseManager.getReleaseResults().get( "testRelease"
);
 
-        if ( !result.getOutput().contains( "test/executable/mvn" ) &amp;&amp; 
-                !result.getOutput().contains( "test\\executable\\mvn" ) )
+        if ( !result.getOutput().replace( "\\", "/" ).contains( "test/executable/mvn" ) )
         {
             fail( "Error in release:perform. Missing executable" );
         }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r881152 - /continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091117045044.38FBD238893B@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091117045044-38FBD238893B@eris-apache-org%3e</id>
<updated>2009-11-17T04:50:44Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Nov 17 04:50:43 2009
New Revision: 881152

URL: http://svn.apache.org/viewvc?rev=881152&amp;view=rev
Log:
fixed unit test
merge -r 881150 of 1.3.x branch

Modified:
    continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java

Modified: continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java?rev=881152&amp;r1=881151&amp;r2=881152&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
(original)
+++ continuum/trunk/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
Tue Nov 17 04:50:43 2009
@@ -295,7 +295,8 @@
 
         ReleaseResult result = (ReleaseResult) releaseManager.getReleaseResults().get( "testRelease"
);
 
-        if ( !result.getOutput().contains( "test/executable/mvn" ) )
+        if ( !result.getOutput().contains( "test/executable/mvn" ) &amp;&amp; 
+                !result.getOutput().contains( "test\\executable\\mvn" ) )
         {
             fail( "Error in release:perform. Missing executable" );
         }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r881150 - /continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091117044335.2FDE4238893B@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091117044335-2FDE4238893B@eris-apache-org%3e</id>
<updated>2009-11-17T04:43:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Nov 17 04:43:34 2009
New Revision: 881150

URL: http://svn.apache.org/viewvc?rev=881150&amp;view=rev
Log:
fixed unit test

Modified:
    continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java

Modified: continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java?rev=881150&amp;r1=881149&amp;r2=881150&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-release/src/test/java/org/apache/maven/continuum/release/executors/ReleaseTaskExecutorTest.java
Tue Nov 17 04:43:34 2009
@@ -295,7 +295,8 @@
 
         ReleaseResult result = (ReleaseResult) releaseManager.getReleaseResults().get( "testRelease"
);
 
-        if ( !result.getOutput().contains( "test/executable/mvn" ) )
+        if ( !result.getOutput().contains( "test/executable/mvn" ) &amp;&amp; 
+                !result.getOutput().contains( "test\\executable\\mvn" ) )
         {
             fail( "Error in release:perform. Missing executable" );
         }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834718 - /continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110235556.5D0BA23888BD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110235556-5D0BA23888BD@eris-apache-org%3e</id>
<updated>2009-11-10T23:55:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Nov 10 23:55:56 2009
New Revision: 834718

URL: http://svn.apache.org/viewvc?rev=834718&amp;view=rev
Log:
fixed unit test in userroles
merge -r 834717 of 1.3.x branch

Modified:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java

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=834718&amp;r1=834717&amp;r2=834718&amp;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 Nov 10 23:55:56 2009
@@ -348,7 +348,7 @@
     }
     */
 
-    @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_BuildProject" } )
+    @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_AssignUserToAGroup" } )
     public void testUserWithContinuumGroupProjectDeveloperRole()
     {
         username = getProperty( "GROUPPROJECTDEVELOPER_USERNAME" );




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834717 - /continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110235532.1E0042388998@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110235532-1E0042388998@eris-apache-org%3e</id>
<updated>2009-11-10T23:55:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Nov 10 23:55:31 2009
New Revision: 834717

URL: http://svn.apache.org/viewvc?rev=834717&amp;view=rev
Log:
fixed unit test in userroles

Modified:
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java?rev=834717&amp;r1=834716&amp;r2=834717&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
Tue Nov 10 23:55:31 2009
@@ -348,7 +348,7 @@
     }
     */
 
-    @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_BuildProject" } )
+    @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_AssignUserToAGroup" } )
     public void testUserWithContinuumGroupProjectDeveloperRole()
     {
         username = getProperty( "GROUPPROJECTDEVELOPER_USERNAME" );




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834714 - in /continuum/trunk: continuum-webapp-test/src/test/resources/ continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110234727.95F7723888BD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110234727-95F7723888BD@eris-apache-org%3e</id>
<updated>2009-11-10T23:47:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Nov 10 23:47:26 2009
New Revision: 834714

URL: http://svn.apache.org/viewvc?rev=834714&amp;view=rev
Log:
[CONTINUUM-2387] fixed members tab for groups that start or end with the same string
merge -r 834712:834713 of 1.3.x branch

Modified:
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java

Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=834714&amp;r1=834713&amp;r2=834714&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Tue Nov 10
23:47:26 2009
@@ -113,10 +113,13 @@
 # Test properties for testProjectGroupMembers
 TEST_PROJ_GRP_NAME_ONE=Group
 TEST_PROJ_GRP_ID_ONE=Group Id
-TEST_PROJ_GRP_DESCRIPTION_ONE=Project group for members test
-TEST_PROJ_GRP_NAME_TWO=Group-Two
-TEST_PROJ_GRP_ID_TWO=Group Id Two
-TEST_PROJ_GRP_DESCRIPTION_TWO=Project group two for members test
+TEST_PROJ_GRP_DESCRIPTION_ONE=First project group for members test
+TEST_PROJ_GRP_NAME_TWO=Group My
+TEST_PROJ_GRP_ID_TWO=Group Id My
+TEST_PROJ_GRP_DESCRIPTION_TWO=Second project group for members test
+TEST_PROJ_GRP_NAME_THREE = My Group
+TEST_PROJ_GRP_ID_THREE=My Group Id
+TEST_PROJ_GRP_DESCRIPTION_THREE=Third project group for members test
 
 ########################
 # notifier group 

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=834714&amp;r1=834713&amp;r2=834714&amp;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 Nov 10 23:47:26 2009
@@ -175,6 +175,9 @@
         String GRP_NAME_TWO = getProperty( "TEST_PROJ_GRP_NAME_TWO" );
         String GRP_ID_TWO = getProperty( "TEST_PROJ_GRP_ID_TWO" );
         String GRP_DESCRIPTION_TWO = getProperty( "TEST_PROJ_GRP_DESCRIPTION_TWO" );
+        String GRP_NAME_THREE = getProperty( "TEST_PROJ_GRP_NAME_THREE" );
+        String GRP_ID_THREE = getProperty( "TEST_PROJ_GRP_ID_THREE" );
+        String GRP_DESCRIPTION_THREE = getProperty( "TEST_PROJ_GRP_DESCRIPTION_THREE" );
 
         addProjectGroup( GRP_NAME_ONE, GRP_ID_ONE, GRP_DESCRIPTION_ONE, true );
         assertLinkPresent( GRP_NAME_ONE );
@@ -182,23 +185,37 @@
         addProjectGroup( GRP_NAME_TWO, GRP_ID_TWO, GRP_DESCRIPTION_TWO, true );
         assertLinkPresent( GRP_NAME_TWO );
 
+        addProjectGroup( GRP_NAME_THREE, GRP_ID_THREE, GRP_DESCRIPTION_THREE, true );
+        assertLinkPresent( GRP_NAME_THREE );
+
         createAndAddUserAsDeveloperToGroup( "username1", "user1", "user1@something.com",
"password123", GRP_NAME_ONE );
         createAndAddUserAsDeveloperToGroup( "username2", "user2", "user2@something.com",
"password123", GRP_NAME_ONE );
         createAndAddUserAsDeveloperToGroup( "username3", "user3", "user3@something.com",
"password123", GRP_NAME_TWO );
+        createAndAddUserAsDeveloperToGroup( "username4", "user4", "user4@something.com",
"password123", GRP_NAME_THREE );
 
         showMembers( GRP_NAME_ONE, GRP_ID_ONE, GRP_DESCRIPTION_ONE );
         assertUserPresent( "username1", "user1", "user1@something.com" );
         assertUserPresent( "username2", "user2", "user2@something.com" );
         assertUserNotPresent( "username3", "user3", "user3@something.com" );
+        assertUserNotPresent( "username4", "user4", "user4@something.com" );
 
         showMembers( GRP_NAME_TWO, GRP_ID_TWO, GRP_DESCRIPTION_TWO );
         assertUserNotPresent( "username1", "user1", "user1@something.com" );
         assertUserNotPresent( "username2", "user2", "user2@something.com" );
         assertUserPresent( "username3", "user3", "user3@something.com" );
+        assertUserNotPresent( "username4", "user4", "user4@something.com" );
+
+        showMembers( GRP_NAME_THREE, GRP_ID_THREE, GRP_DESCRIPTION_THREE );
+        assertUserNotPresent( "username1", "user1", "user1@something.com" );
+        assertUserNotPresent( "username2", "user2", "user2@something.com" );
+        assertUserNotPresent( "username3", "user3", "user3@something.com" );
+        assertUserPresent( "username4", "user4", "user4@something.com" );
 
         removeProjectGroup( GRP_NAME_ONE );
         assertLinkNotPresent( GRP_NAME_ONE );
         removeProjectGroup( GRP_NAME_TWO );
         assertLinkNotPresent( GRP_NAME_TWO );
+        removeProjectGroup( GRP_NAME_THREE );
+        assertLinkNotPresent( GRP_NAME_THREE );
     }
 }

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=834714&amp;r1=834713&amp;r2=834714&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Tue Nov 10 23:47:26 2009
@@ -30,6 +30,7 @@
 import java.util.Map;
 
 import org.apache.commons.collections.ComparatorUtils;
+import org.apache.commons.lang.StringUtils;
 import org.apache.continuum.buildmanager.BuildManagerException;
 import org.apache.continuum.buildmanager.BuildsManager;
 import org.apache.continuum.model.project.ProjectScmRoot;
@@ -54,7 +55,6 @@
 import org.codehaus.plexus.redback.role.RoleManager;
 import org.codehaus.plexus.redback.role.RoleManagerException;
 import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -692,8 +692,9 @@
             List&lt;String&gt; roleNames = new ArrayList&lt;String&gt;();
             for ( Role r : roles )
             {
-                int index = r.getName().indexOf( projectGroup.getName() );
-                if ( index &gt; -1 &amp;&amp; r.getName().substring( index ).trim().equals(
projectGroup.getName() ) )
+                String projectGroupName = StringUtils.substringAfter( r.getName(), "-" ).trim();
+
+                if ( projectGroupName.equals( group.getName() ) )
                 {
                     roleNames.add( r.getName() );
                 }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834713 - in /continuum/branches/continuum-1.3.x: continuum-webapp-test/src/test/resources/ continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110234610.EB96D23888BD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110234610-EB96D23888BD@eris-apache-org%3e</id>
<updated>2009-11-10T23:46:10Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Nov 10 23:46:10 2009
New Revision: 834713

URL: http://svn.apache.org/viewvc?rev=834713&amp;view=rev
Log:
[CONTINUUM-2387] fixed members tab with groups that start or end with the same string

Modified:
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties?rev=834713&amp;r1=834712&amp;r2=834713&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties
Tue Nov 10 23:46:10 2009
@@ -113,10 +113,13 @@
 # Test properties for testProjectGroupMembers
 TEST_PROJ_GRP_NAME_ONE=Group
 TEST_PROJ_GRP_ID_ONE=Group Id
-TEST_PROJ_GRP_DESCRIPTION_ONE=Project group for members test
-TEST_PROJ_GRP_NAME_TWO=Group-Two
-TEST_PROJ_GRP_ID_TWO=Group Id Two
-TEST_PROJ_GRP_DESCRIPTION_TWO=Project group two for members test
+TEST_PROJ_GRP_DESCRIPTION_ONE=First project group for members test
+TEST_PROJ_GRP_NAME_TWO=Group My
+TEST_PROJ_GRP_ID_TWO=Group Id My
+TEST_PROJ_GRP_DESCRIPTION_TWO=Second project group for members test
+TEST_PROJ_GRP_NAME_THREE = My Group
+TEST_PROJ_GRP_ID_THREE=My Group Id
+TEST_PROJ_GRP_DESCRIPTION_THREE=Third project group for members test
 
 ########################
 # notifier group 

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java?rev=834713&amp;r1=834712&amp;r2=834713&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
Tue Nov 10 23:46:10 2009
@@ -175,6 +175,9 @@
         String GRP_NAME_TWO = getProperty( "TEST_PROJ_GRP_NAME_TWO" );
         String GRP_ID_TWO = getProperty( "TEST_PROJ_GRP_ID_TWO" );
         String GRP_DESCRIPTION_TWO = getProperty( "TEST_PROJ_GRP_DESCRIPTION_TWO" );
+        String GRP_NAME_THREE = getProperty( "TEST_PROJ_GRP_NAME_THREE" );
+        String GRP_ID_THREE = getProperty( "TEST_PROJ_GRP_ID_THREE" );
+        String GRP_DESCRIPTION_THREE = getProperty( "TEST_PROJ_GRP_DESCRIPTION_THREE" );
 
         addProjectGroup( GRP_NAME_ONE, GRP_ID_ONE, GRP_DESCRIPTION_ONE, true );
         assertLinkPresent( GRP_NAME_ONE );
@@ -182,23 +185,37 @@
         addProjectGroup( GRP_NAME_TWO, GRP_ID_TWO, GRP_DESCRIPTION_TWO, true );
         assertLinkPresent( GRP_NAME_TWO );
 
+        addProjectGroup( GRP_NAME_THREE, GRP_ID_THREE, GRP_DESCRIPTION_THREE, true );
+        assertLinkPresent( GRP_NAME_THREE );
+
         createAndAddUserAsDeveloperToGroup( "username1", "user1", "user1@something.com",
"password123", GRP_NAME_ONE );
         createAndAddUserAsDeveloperToGroup( "username2", "user2", "user2@something.com",
"password123", GRP_NAME_ONE );
         createAndAddUserAsDeveloperToGroup( "username3", "user3", "user3@something.com",
"password123", GRP_NAME_TWO );
+        createAndAddUserAsDeveloperToGroup( "username4", "user4", "user4@something.com",
"password123", GRP_NAME_THREE );
 
         showMembers( GRP_NAME_ONE, GRP_ID_ONE, GRP_DESCRIPTION_ONE );
         assertUserPresent( "username1", "user1", "user1@something.com" );
         assertUserPresent( "username2", "user2", "user2@something.com" );
         assertUserNotPresent( "username3", "user3", "user3@something.com" );
+        assertUserNotPresent( "username4", "user4", "user4@something.com" );
 
         showMembers( GRP_NAME_TWO, GRP_ID_TWO, GRP_DESCRIPTION_TWO );
         assertUserNotPresent( "username1", "user1", "user1@something.com" );
         assertUserNotPresent( "username2", "user2", "user2@something.com" );
         assertUserPresent( "username3", "user3", "user3@something.com" );
+        assertUserNotPresent( "username4", "user4", "user4@something.com" );
+
+        showMembers( GRP_NAME_THREE, GRP_ID_THREE, GRP_DESCRIPTION_THREE );
+        assertUserNotPresent( "username1", "user1", "user1@something.com" );
+        assertUserNotPresent( "username2", "user2", "user2@something.com" );
+        assertUserNotPresent( "username3", "user3", "user3@something.com" );
+        assertUserPresent( "username4", "user4", "user4@something.com" );
 
         removeProjectGroup( GRP_NAME_ONE );
         assertLinkNotPresent( GRP_NAME_ONE );
         removeProjectGroup( GRP_NAME_TWO );
         assertLinkNotPresent( GRP_NAME_TWO );
+        removeProjectGroup( GRP_NAME_THREE );
+        assertLinkNotPresent( GRP_NAME_THREE );
     }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=834713&amp;r1=834712&amp;r2=834713&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Tue Nov 10 23:46:10 2009
@@ -30,6 +30,7 @@
 import java.util.Map;
 
 import org.apache.commons.collections.ComparatorUtils;
+import org.apache.commons.lang.StringUtils;
 import org.apache.continuum.buildmanager.BuildManagerException;
 import org.apache.continuum.buildmanager.BuildsManager;
 import org.apache.continuum.model.project.ProjectScmRoot;
@@ -53,7 +54,6 @@
 import org.codehaus.plexus.redback.role.RoleManager;
 import org.codehaus.plexus.redback.role.RoleManagerException;
 import org.codehaus.plexus.redback.users.User;
-import org.codehaus.plexus.util.StringUtils;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -689,8 +689,9 @@
             List&lt;String&gt; roleNames = new ArrayList&lt;String&gt;();
             for ( Role r : roles )
             {
-                int index = r.getName().indexOf( projectGroup.getName() );
-                if ( index &gt; -1 &amp;&amp; r.getName().substring( index ).trim().equals(
projectGroup.getName() ) )
+                String projectGroupName = StringUtils.substringAfter( r.getName(), "-" ).trim();
+
+                if ( projectGroupName.equals( group.getName() ) )
                 {
                     roleNames.add( r.getName() );
                 }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834358 - /continuum/branches/continuum-1.3.x/continuum-webapp-test/pom2.xml</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110055929.8BEE823888D1@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110055929-8BEE823888D1@eris-apache-org%3e</id>
<updated>2009-11-10T05:59:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Nov 10 05:59:28 2009
New Revision: 834358

URL: http://svn.apache.org/viewvc?rev=834358&amp;view=rev
Log:
removed pom2.xml

Removed:
    continuum/branches/continuum-1.3.x/continuum-webapp-test/pom2.xml



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834357 [7/7] - in /continuum/branches/continuum-1.3.x/continuum-webapp-test: ./ src/site/ src/site/apt/ src/test/it/org/apache/continuum/web/test/ src/test/resources/ src/test/testng/config/ src/test/testng/org/apache/continuum/web/test/ s...</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110053804.554042388A13@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110053804-554042388A13@eris-apache-org%3e</id>
<updated>2009-11-10T05:38:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractNotifierTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractNotifierTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractNotifierTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractNotifierTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,482 @@
+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.
+ */
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractNotifierTest
+    extends AbstractContinuumTest
+{
+    public void assertGroupNotifierPage( String projectGroupName )
+    {
+        assertTextPresent( "Project Group Notifiers of group " + projectGroupName );
+    }
+
+    public void assertProjectNotifierPage()
+    {
+        assertTextPresent( "Add Notifier" );
+    }
+
+    public void assertAddNotifierPage()
+    {
+        assertPage( "Continuum - Add Notifier" );
+        assertTextPresent( "Add Notifier" );
+        assertTextPresent( "Type" );
+        assertElementPresent( "notifierType" );
+        assertElementPresent( "Cancel" );
+    }
+
+    public void assertAddEditMailNotifierPage()
+    {
+        assertPage( "Continuum - Add/Edit Mail Notifier" );
+        assertTextPresent( "Add/Edit Mail Notifier" );
+        assertTextPresent( "Mail Recipient Address" );
+        assertTextPresent( "Send a mail to latest committers" );
+        assertTextPresent( "Send on Success" );
+        assertTextPresent( "Send on Failure" );
+        assertTextPresent( "Send on Error" );
+        assertTextPresent( "Send on Warning" );
+        assertTextPresent( "Send on SCM Failure" );
+        assertElementPresent( "address" );
+        assertElementPresent( "Cancel" );
+    }
+
+    public void assertAddEditIrcNotifierPage()
+    {
+        assertPage( "Continuum - Add/Edit IRC Notifier" );
+
+        assertTextPresent( "IRC Host" );
+        assertElementPresent( "host" );
+
+        assertTextPresent( "IRC port" );
+        assertElementPresent( "port" );
+
+        assertTextPresent( "IRC channel" );
+        assertElementPresent( "channel" );
+
+        assertTextPresent( "Nick Name" );
+        assertElementPresent( "nick" );
+
+        assertTextPresent( "Alternate Nick Name" );
+        assertElementPresent( "alternateNick" );
+
+        assertTextPresent( "User Name" );
+        assertElementPresent( "username" );
+
+        assertTextPresent( "Full Name" );
+        assertElementPresent( "fullName" );
+
+        assertTextPresent( "Password" );
+        assertElementPresent( "password" );
+
+        assertTextPresent( "SSL" );
+        assertTextPresent( "Send on Success" );
+        assertTextPresent( "Send on Failure" );
+        assertTextPresent( "Send on Error" );
+        assertTextPresent( "Send on Warning" );
+        assertTextPresent( "Send on SCM Failure" );
+    }
+
+    public void assertAddEditJabberPage()
+    {
+        assertPage( "Continuum - Add/Edit Jabber Notifier" );
+
+        assertTextPresent( "Jabber Host" );
+        assertElementPresent( "host" );
+        assertTextPresent( "Jabber port" );
+        assertElementPresent( "port" );
+        assertTextPresent( "Jabber login" );
+        assertElementPresent( "login" );
+        assertTextPresent( "Jabber Password" );
+        assertElementPresent( "password" );
+        assertTextPresent( "Jabber Domain Name" );
+        assertElementPresent( "domainName" );
+        assertTextPresent( "Jabber Recipient Address" );
+        assertElementPresent( "address" );
+
+        assertTextPresent( "Is it a SSL connection?" );
+        assertTextPresent( "Is it a Jabber group?" );
+        assertTextPresent( "Send on Success" );
+        assertTextPresent( "Send on Failure" );
+        assertTextPresent( "Send on Error" );
+        assertTextPresent( "Send on Warning" );
+        assertTextPresent( "Send on SCM Failure" );
+    }
+
+    public void assertAddEditMsnPage()
+    {
+        assertPage( "Continuum - Add/Edit MSN Notifier" );
+
+        assertTextPresent( "MSN login" );
+        assertElementPresent( "login" );
+        assertTextPresent( "MSN Password" );
+        assertElementPresent( "password" );
+        assertTextPresent( "MSN Recipient Address" );
+        assertElementPresent( "address" );
+
+        assertTextPresent( "Send on Success" );
+        assertTextPresent( "Send on Failure" );
+        assertTextPresent( "Send on Error" );
+        assertTextPresent( "Send on Warning" );
+        assertTextPresent( "Send on SCM Failure" );
+    }
+
+    public void assertAddEditWagonPage()
+    {
+        assertPage( "Continuum - Add/Edit Wagon Notifier" );
+
+        assertTextPresent( "Project Site URL" );
+        assertTextPresent( "Server Id (defined in your settings.xml for authentication)" );
+        assertElementPresent( "url" );
+        assertElementPresent( "id" );
+        assertTextPresent( "Send on Success" );
+        assertTextPresent( "Send on Failure" );
+        assertTextPresent( "Send on Error" );
+        assertTextPresent( "Send on Warning" );
+    }
+
+    public void goToGroupNotifier( String projectGroupName, String projectGroupId, String projectGroupDescription )
+        throws Exception
+    {
+        showProjectGroup( projectGroupName, projectGroupId, projectGroupDescription );
+        clickLinkWithText( "Notifiers" );
+        assertGroupNotifierPage( projectGroupName );
+        clickButtonWithValue( "Add" );
+        assertAddNotifierPage();
+    }
+
+    public void goToProjectNotifier( String projectGroupName, String projectName )
+        throws Exception
+    {
+        goToProjectInformationPage( projectGroupName, projectName );
+        clickLinkWithXPath( "//input[contains(@id,'addProjectNotifier') and @type='submit']" );
+        assertAddNotifierPage();
+    }
+
+    public void addMailNotifier( String projectGroupName, String projectName, String email, boolean isValid )
+        throws Exception
+    {
+        selectValue( "//select", "Mail" );
+        clickButtonWithValue( "Submit" );
+        assertAddEditMailNotifierPage();
+        setFieldValue( "address", email );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Address is invalid" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void editMailNotifier( String projectGroupName, String projectName, String oldMail, String newMail,
+                                  boolean isValid )
+        throws Exception
+    {
+        if ( projectName == null )
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'mail')])//img" );
+        }
+        else
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'mail')])//img" );
+        }
+        assertAddEditMailNotifierPage();
+        assertFieldValue( oldMail, "address" );
+        setFieldValue( "address", newMail );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Address is invalid" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void addIrcNotifier( String projectGroupName, String projectName, String host, String channel,
+                                boolean isValid )
+        throws Exception
+    {
+        selectValue( "//select", "IRC" );
+        clickButtonWithValue( "Submit" );
+        assertAddEditIrcNotifierPage();
+        setFieldValue( "host", host );
+        setFieldValue( "channel", channel );
+
+        clickButtonWithValue( "Save" );
+        if ( !isValid )
+        {
+            assertTextPresent( "Host is required" );
+            assertTextPresent( "Channel is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void editIrcNotifier( String projectGroupName, String projectName, String oldHost, String oldChannel,
+                                 String newHost, String newChannel, boolean isValid )
+        throws Exception
+    {
+        if ( projectName == null )
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'irc')])//img" );
+        }
+        else
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'irc')])//img" );
+        }
+        assertAddEditIrcNotifierPage();
+        assertFieldValue( oldHost, "host" );
+        assertFieldValue( oldChannel, "channel" );
+        setFieldValue( "host", newHost );
+        setFieldValue( "channel", newChannel );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Host is required" );
+            assertTextPresent( "Channel is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void addJabberNotifier( String projectGroupName, String projectName, String host, String login,
+                                   String password, String address, boolean isValid )
+        throws Exception
+    {
+        selectValue( "//select", "Jabber" );
+        clickButtonWithValue( "Submit" );
+        assertAddEditJabberPage();
+        setFieldValue( "host", host );
+        setFieldValue( "login", login );
+        setFieldValue( "password", password );
+        setFieldValue( "address", address );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Host is required" );
+            assertTextPresent( "Login is required" );
+            assertTextPresent( "Password is required" );
+            assertTextPresent( "Address is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void editJabberNotifier( String projectGroupName, String projectName, String oldHost, String oldLogin,
+                                    String oldAddress, String newHost, String newLogin, String newPassword,
+                                    String newAddress, boolean isValid )
+        throws Exception
+    {
+        if ( projectName == null )
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'jabber')])//img" );
+        }
+        else
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'jabber')])//img" );
+        }
+        assertAddEditJabberPage();
+        assertFieldValue( oldHost, "host" );
+        assertFieldValue( oldLogin, "login" );
+        assertFieldValue( oldAddress, "address" );
+        setFieldValue( "host", newHost );
+        setFieldValue( "login", newLogin );
+        setFieldValue( "password", newPassword );
+        setFieldValue( "address", newAddress );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Host is required" );
+            assertTextPresent( "Login is required" );
+            assertTextPresent( "Password is required" );
+            assertTextPresent( "Address is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void addMsnNotifier( String projectGroupName, String projectName, String login, String password,
+                                String recipientAddress, boolean isValid )
+        throws Exception
+    {
+        selectValue( "//select", "MSN" );
+        clickButtonWithValue( "Submit" );
+        assertAddEditMsnPage();
+        setFieldValue( "login", login );
+        setFieldValue( "password", password );
+        setFieldValue( "address", recipientAddress );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Login is required" );
+            assertTextPresent( "Password is required" );
+            assertTextPresent( "Address is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void editMsnNotifier( String projectGroupName, String projectName, String oldLogin, String oldAddress,
+                                 String newLogin, String newPassword, String newAddress, boolean isValid )
+        throws Exception
+    {
+        if ( projectName == null )
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'msn')])//img" );
+        }
+        else
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'msn')])//img" );
+        }
+        assertAddEditMsnPage();
+        assertFieldValue( oldLogin, "login" );
+        assertFieldValue( oldAddress, "address" );
+        setFieldValue( "login", newLogin );
+        setFieldValue( "password", newPassword );
+        setFieldValue( "address", newAddress );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Login is required" );
+            assertTextPresent( "Password is required" );
+            assertTextPresent( "Address is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void addWagonNotifierPage( String projectGroupName, String projectName, String siteUrl, String serverId,
+                                      boolean isValid )
+        throws Exception
+    {
+        selectValue( "//select", "Wagon" );
+        clickButtonWithValue( "Submit" );
+        assertAddEditWagonPage();
+        setFieldValue( "url", siteUrl );
+        setFieldValue( "id", serverId );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Destination URL is required" );
+            assertTextPresent( "Server Id is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+
+    public void editWagonNotifier( String projectGroupName, String projectName, String oldUrl, String oldId,
+                                   String newUrl, String newId, boolean isValid )
+        throws Exception
+    {
+        if ( projectName == null )
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'wagon')])//img" );
+        }
+        else
+        {
+            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'wagon')])//img" );
+        }
+        assertAddEditWagonPage();
+        assertFieldValue( oldUrl, "url" );
+        assertFieldValue( oldId, "id" );
+        setFieldValue( "url", newUrl );
+        setFieldValue( "id", newId );
+        clickButtonWithValue( "Save" );
+
+        if ( !isValid )
+        {
+            assertTextPresent( "Destination URL is required" );
+            assertTextPresent( "Server Id is required" );
+        }
+        else if ( projectName != null )
+        {
+            assertProjectInformationPage();
+        }
+        else
+        {
+            assertGroupNotifierPage( projectGroupName );
+        }
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractPurgeTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractPurgeTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractPurgeTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractPurgeTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,181 @@
+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.
+ */
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractPurgeTest
+    extends AbstractSeleniumTest
+{
+    public void goToGeneralPurgePage()
+    {
+        clickLinkWithText( "Purge Configurations" );
+        assertGeneralPurgePage();
+    }
+
+    public void assertGeneralPurgePage()
+    {
+        assertPage( "Continuum - Purge Configurations" );
+        assertTextPresent( "Repository Purge Configurations" );
+        assertTextPresent( "Directory Purge Configurations" );
+        assertButtonWithValuePresent( "Add" );
+    }
+
+    public void removeRepositoryPurge( String purgeDescription )
+    {
+        goToGeneralPurgePage();
+        clickLinkWithXPath( "(//a[contains(@href,'removePurgeConfig.action') and contains(@href, '" + purgeDescription
+            + "')])//img" );
+        assertTextPresent( "Delete Purge Configuration" );
+        assertTextPresent( "Are you sure you want to delete Purge Configuration \"" + purgeDescription + "\"?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertGeneralPurgePage();
+    }
+
+    public void removeDirectoryPurge( String purgeDescription )
+    {
+        goToGeneralPurgePage();
+        clickLinkWithXPath( "(//a[contains(@href,'removePurgeConfig.action') and contains(@href, '" + purgeDescription
+            + "')])//img" );
+        assertTextPresent( "Delete Purge Configuration" );
+        assertTextPresent( "Are you sure you want to delete Purge Configuration \"" + purgeDescription + "\"?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertGeneralPurgePage();
+    }
+
+    public void assertAddRepositoryPurgePage()
+    {
+        assertPage( "Continuum - Add/Edit Purge Configuration" );
+        assertTextPresent( "Add/Edit Purge Configuration" );
+        assertTextPresent( "Repository" );
+        assertElementPresent( "repositoryId" );
+        assertTextPresent( "Days Older" );
+        assertElementPresent( "daysOlder" );
+        assertTextPresent( "Retention Count" );
+        assertElementPresent( "retentionCount" );
+        assertElementPresent( "deleteAll" );
+        assertElementPresent( "deleteReleasedSnapshots" );
+        assertElementPresent( "defaultPurgeConfiguration" );
+        assertTextPresent( "Schedule" );
+        assertElementPresent( "scheduleId" );
+        assertTextPresent( "Description" );
+        assertElementPresent( "description" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void assertAddEditDirectoryPurgePage()
+    {
+        assertPage( "Continuum - Add/Edit Purge Configuration" );
+        assertTextPresent( "Add/Edit Purge Configuration" );
+        assertTextPresent( "Directory Type" );
+        assertElementPresent( "directoryType" );
+        assertTextPresent( "Days Older" );
+        assertElementPresent( "daysOlder" );
+        assertTextPresent( "Retention Count" );
+        assertElementPresent( "retentionCount" );
+        assertElementPresent( "deleteAll" );
+        assertElementPresent( "defaultPurgeConfiguration" );
+        assertTextPresent( "Schedule" );
+        assertElementPresent( "scheduleId" );
+        assertTextPresent( "Description" );
+        assertElementPresent( "description" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void goToAddRepositoryPurge()
+    {
+        goToGeneralPurgePage();
+        assertGeneralPurgePage();
+        clickLinkWithXPath( "//preceding::input[@value='repository' and @type='hidden']//following::input[@type='submit']" );
+        assertAddRepositoryPurgePage();
+    }
+
+    public void goToEditRepositoryPurge( String daysOlder, String retentionCount, String description )
+    {
+        goToGeneralPurgePage();
+        assertGeneralPurgePage();
+        String xPath = "//preceding::td[text()='" + description + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertAddRepositoryPurgePage();
+        assertFieldValue( daysOlder, "daysOlder" );
+        assertFieldValue( retentionCount, "retentionCount" );
+        assertFieldValue( description, "description" );
+    }
+
+    public void goToEditDirectoryPurge( String daysOlder, String retentionCount, String description )
+    {
+        goToGeneralPurgePage();
+        assertGeneralPurgePage();
+        String xPath = "//preceding::td[text()='" + description + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertAddEditDirectoryPurgePage();
+        assertFieldValue( daysOlder, "daysOlder" );
+        assertFieldValue( retentionCount, "retentionCount" );
+        assertFieldValue( description, "description" );
+    }
+
+    public void addEditRepositoryPurge( String daysOlder, String retentionCount, String description, boolean success )
+    {
+        setFieldValue( "daysOlder", daysOlder );
+        setFieldValue( "retentionCount", retentionCount );
+        setFieldValue( "description", description );
+        submit();
+        if ( success )
+        {
+            assertGeneralPurgePage();
+        }
+        else
+        {
+            assertAddRepositoryPurgePage();
+        }
+    }
+
+    public void goToAddDirectoryPurge()
+    {
+        goToGeneralPurgePage();
+        assertGeneralPurgePage();
+        clickLinkWithXPath( "//preceding::input[@value='directory' and @type='hidden']//following::input[@type='submit']" );
+        assertAddEditDirectoryPurgePage();
+    }
+
+    public void addEditDirectoryPurge( String daysOlder, String retentionCount, String description, boolean success )
+    {
+        setFieldValue( "daysOlder", daysOlder );
+        setFieldValue( "retentionCount", retentionCount );
+        setFieldValue( "description", description );
+        submit();
+        if ( success )
+        {
+            assertGeneralPurgePage();
+        }
+        else
+        {
+            assertAddEditDirectoryPurgePage();
+        }
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractScheduleTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractScheduleTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractScheduleTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractScheduleTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,175 @@
+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.
+ */
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractScheduleTest
+    extends AbstractSeleniumTest
+{
+    public void goToSchedulePage()
+    {
+        clickLinkWithText( "Schedules" );
+
+        assertSchedulePage();
+    }
+
+    public void goToAddSchedule()
+    {
+        goToSchedulePage();
+        clickButtonWithValue( "Add" );
+        assertAddSchedulePage();
+    }
+
+    public void assertSchedulePage()
+    {
+        assertPage( "Continuum - Schedules" );
+        assertTextPresent( "Schedules" );
+        assertTextPresent( "Name" );
+        assertTextPresent( "Description" );
+        assertTextPresent( "Quiet Period" );
+        assertTextPresent( "Cron Expression" );
+        assertTextPresent( "Max Job Time" );
+        assertTextPresent( "Active" );
+        assertTextPresent( "DEFAULT_SCHEDULE" );
+        assertImgWithAlt( "Edit" );
+        assertImgWithAlt( "Delete" );
+        assertButtonWithValuePresent( "Add" );
+    }
+
+    public void assertAddSchedulePage()
+    {
+        assertPage( "Continuum - Edit Schedule" );
+        assertTextPresent( "Edit Schedule" );
+        assertTextPresent( "Name" );
+        assertElementPresent( "name" );
+        assertTextPresent( "Description" );
+        assertElementPresent( "description" );
+        assertTextPresent( "Cron Expression" );
+        assertTextPresent( "Second" );
+        assertElementPresent( "second" );
+        assertTextPresent( "Minute" );
+        assertElementPresent( "minute" );
+        assertTextPresent( "Hour" );
+        assertElementPresent( "hour" );
+        assertTextPresent( "Day of Month" );
+        assertElementPresent( "dayOfMonth" );
+        assertTextPresent( "Month" );
+        assertElementPresent( "month" );
+        assertTextPresent( "Day of Week" );
+        assertElementPresent( "dayOfWeek" );
+        assertTextPresent( "Year [optional]" );
+        assertElementPresent( "year" );
+        assertTextPresent( "Maximum job execution time" );
+        assertElementPresent( "maxJobExecutionTime" );
+        assertTextPresent( "Quiet Period (seconds):" );
+        assertElementPresent( "delay" );
+        assertTextPresent( "Add Build Queue" );
+        assertElementPresent( "availableBuildQueuesIds" );
+        assertElementPresent( "selectedBuildQueuesIds" );
+        assertElementPresent( "active" );
+        assertTextPresent( "Enable/Disable the schedule" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addEditSchedule( String name, String description, String second, String minute, String hour,
+                                 String dayMonth, String month, String dayWeek, String year, String maxTime,
+                                 String period, boolean buildQueue, boolean success )
+    {
+	if ( buildQueue ) 
+	{
+	        setFieldValue( "name", name );
+		setFieldValue( "description", description );
+		setFieldValue( "second", second );
+		setFieldValue( "minute", minute );
+		setFieldValue( "hour", hour );
+		setFieldValue( "dayOfMonth", dayMonth );
+		setFieldValue( "month", month );
+		setFieldValue( "dayOfWeek", dayWeek );
+		setFieldValue( "year", year );
+		setFieldValue( "maxJobExecutionTime", maxTime );
+		setFieldValue( "delay", period );
+		getSelenium().addSelection("saveSchedule_availableBuildQueuesIds", "label=DEFAULT_BUILD_QUEUE");
+		getSelenium().click("//input[@value='-&gt;']");
+		submit();
+	}
+	else
+	{
+		setFieldValue( "name", name );
+		setFieldValue( "description", description );
+		setFieldValue( "second", second );
+		setFieldValue( "minute", minute );
+		setFieldValue( "hour", hour );
+		setFieldValue( "dayOfMonth", dayMonth );
+		setFieldValue( "month", month );
+		setFieldValue( "dayOfWeek", dayWeek );
+		setFieldValue( "year", year );
+		setFieldValue( "maxJobExecutionTime", maxTime );
+		setFieldValue( "delay", period );
+		submit();
+	}
+
+        if ( success )
+        {
+            assertSchedulePage();
+        }
+        else
+        {
+            assertAddSchedulePage();
+        }
+    }
+
+    public void goToEditSchedule( String name, String description, String second, String minute, String hour,
+                                  String dayMonth, String month, String dayWeek, String year, String maxTime,
+                                  String period )
+    {
+        goToSchedulePage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertAddSchedulePage();
+        assertFieldValue( name, "name" );
+        assertFieldValue( description, "description" );
+        assertFieldValue( second, "second" );
+        assertFieldValue( minute, "minute" );
+        assertFieldValue( hour, "hour" );
+        assertFieldValue( dayMonth, "dayOfMonth" );
+        assertFieldValue( month, "month" );
+        assertFieldValue( dayWeek, "dayOfWeek" );
+        assertFieldValue( year, "year" );
+        assertFieldValue( maxTime, "maxJobExecutionTime" );
+        assertFieldValue( period, "delay" );
+    }
+
+    public void removeSchedule( String name )
+    {
+        goToSchedulePage();
+        clickLinkWithXPath( "(//a[contains(@href,'removeSchedule.action') and contains(@href, '" + name + "')])//img" );
+        assertPage( "Continuum - Delete Schedule" );
+        assertTextPresent( "Delete Schedule" );
+        assertTextPresent( "Are you sure you want to delete the schedule \"" + name + "\"?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertSchedulePage();
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,447 @@
+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 java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Properties;
+import java.util.Map.Entry;
+
+import org.apache.commons.io.IOUtils;
+import org.testng.Assert;
+
+import com.thoughtworks.selenium.DefaultSelenium;
+import com.thoughtworks.selenium.Selenium;
+
+/**
+ * Based on AbstractSeleniumTestCase of Emmanuel Venisse test.
+ *
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractSeleniumTest
+{
+    public static String baseUrl;
+
+    public static String maxWaitTimeInMs;
+
+    private static ThreadLocal&lt;Selenium&gt; selenium = new ThreadLocal&lt;Selenium&gt;();
+
+    private static Properties p;
+
+    private final static String PROPERTIES_SEPARATOR = "=";
+
+    /**
+     * Initialize properties.
+     */
+    public void open()
+        throws Exception
+    {
+        InputStream input = this.getClass().getClassLoader().getResourceAsStream( "testng.properties" );
+        p = new Properties();
+        p.load( input );
+
+        maxWaitTimeInMs = getProperty( "MAX_WAIT_TIME_IN_MS" );
+    }
+
+    /**
+     * Initialize selenium
+     */
+    public void open( String baseUrl, String browser, String seleniumHost, int seleniumPort )
+        throws Exception
+    {
+        this.baseUrl = baseUrl;
+
+        if ( getSelenium() == null )
+        {
+            DefaultSelenium s = new DefaultSelenium( seleniumHost, seleniumPort, browser, baseUrl );
+            s.start();
+            selenium.set( s );
+        }
+    }
+
+    public static Selenium getSelenium()
+    {
+        return selenium == null ? null : selenium.get();
+    }
+
+    protected String getProperty( String key )
+    {
+        return p.getProperty( key );
+    }
+
+    protected String getEscapeProperty( String key )
+    {
+        InputStream input = this.getClass().getClassLoader().getResourceAsStream( "testng.properties" );
+        String value = null;
+        List&lt;String&gt; lines;
+        try
+        {
+            lines = IOUtils.readLines( input );
+        }
+        catch ( IOException e )
+        {
+            lines = new ArrayList&lt;String&gt;();
+        }
+        for ( String l : lines )
+        {
+            if ( l != null &amp;&amp; l.startsWith( key ) )
+            {
+                int indexSeparator = l.indexOf( PROPERTIES_SEPARATOR );
+                value = l.substring( indexSeparator + 1 ).trim();
+                break;
+            }
+        }
+        return value;
+    }
+
+    /**
+     * Close selenium session. Called from AfterSuite method of sub-class
+     */
+    public void close()
+        throws Exception
+    {
+        if ( getSelenium() != null )
+        {
+            getSelenium().stop();
+            selenium.set( null );
+        }
+    }
+
+    // *******************************************************
+    // Auxiliar methods. This method help us and simplify test.
+    // *******************************************************
+
+    public void assertFieldValue( String fieldValue, String fieldName )
+    {
+        assertElementPresent( fieldName );
+        Assert.assertEquals( fieldValue, getSelenium().getValue( fieldName ) );
+    }
+
+    public void assertPage( String title )
+    {
+        Assert.assertEquals( getTitle(), title );
+    }
+
+    public String getTitle()
+    {
+        return getSelenium().getTitle();
+    }
+
+    public String getHtmlContent()
+    {
+        return getSelenium().getHtmlSource();
+    }
+
+    public void assertTextPresent( String text )
+    {
+        Assert.assertTrue( getSelenium().isTextPresent( text ), "'" + text + "' isn't present." );
+    }
+
+    public void assertTextNotPresent( String text )
+    {
+        Assert.assertFalse( getSelenium().isTextPresent( text ), "'" + text + "' is present." );
+    }
+
+    public void assertElementPresent( String elementLocator )
+    {
+        Assert.assertTrue( isElementPresent( elementLocator ), "'" + elementLocator + "' isn't present." );
+    }
+
+    public void assertElementNotPresent( String elementLocator )
+    {
+        Assert.assertFalse( isElementPresent( elementLocator ), "'" + elementLocator + "' is present." );
+    }
+
+    public void assertLinkPresent( String text )
+    {
+        Assert.assertTrue( isElementPresent( "link=" + text ), "The link '" + text + "' isn't present." );
+    }
+
+    public void assertLinkNotPresent( String text )
+    {
+            Assert.assertFalse( isElementPresent( "link=" + text ), "The link '" + text + "' is present." );
+    }
+
+    public void assertImgWithAlt( String alt )
+    {
+        assertElementPresent( "//img[@alt='" + alt + "']" );
+    }
+
+    public void assertImgWithAltAtRowCol( boolean isALink, String alt, int row, int column )
+    {
+        String locator = "//tr[" + row + "]/td[" + column + "]/";
+        locator += isALink ? "a/" : "";
+        locator += "img[@alt='" + alt + "']";
+
+        assertElementPresent( locator );
+    }
+
+    public void assertCellValueFromTable( String expected, String tableElement, int row, int column )
+    {
+        Assert.assertEquals( expected, getCellValueFromTable( tableElement, row, column ) );
+    }
+
+    public boolean isTextPresent( String text )
+    {
+        return getSelenium().isTextPresent( text );
+    }
+
+    public boolean isLinkPresent( String text )
+    {
+        return isElementPresent( "link=" + text );
+    }
+
+    public boolean isElementPresent( String locator )
+    {
+        return getSelenium().isElementPresent( locator );
+    }
+
+    public void waitPage()
+    {
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+    }
+
+    public String getFieldValue( String fieldName )
+    {
+        return getSelenium().getValue( fieldName );
+    }
+
+    public String getCellValueFromTable( String tableElement, int row, int column )
+    {
+        return getSelenium().getTable( tableElement + "." + row + "." + column );
+    }
+
+    public void selectValue( String locator, String value )
+    {
+        getSelenium().select( locator, "label=" + value );
+    }
+
+    public void assertOptionPresent( String selectField, String[] options )
+    {
+        assertElementPresent( selectField );
+        String[] optionsPresent = getSelenium().getSelectOptions( selectField );
+        List&lt;String&gt; expected = Arrays.asList( options );
+        List&lt;String&gt; present = Arrays.asList( optionsPresent );
+
+        Assert.assertTrue( present.containsAll( expected ), "Options expected are not included in present options" );
+    }
+
+    public void assertSelectedValue( String value, String fieldName )
+    {
+        assertElementPresent( fieldName );
+        String optionsPresent = getSelenium().getSelectedLabel( value );
+
+        Assert.assertEquals( optionsPresent, value );
+    }
+
+    public void submit()
+    {
+        clickLinkWithXPath( "//input[@type='submit']" );
+    }
+
+    public void assertButtonWithValuePresent( String text )
+    {
+        Assert.assertTrue( isButtonWithValuePresent( text ), "'" + text + "' button isn't present" );
+    }
+
+    public void assertButtonWithIdPresent( String id )
+    {
+        Assert.assertTrue( isButtonWithIdPresent( id ), "'Button with id =" + id + "' isn't present" );
+    }
+
+    public void assertButtonWithValueNotPresent( String text )
+    {
+        Assert.assertFalse( isButtonWithValuePresent( text ), "'" + text + "' button is present" );
+    }
+
+    public boolean isButtonWithValuePresent( String text )
+    {
+        return isElementPresent( "//button[@value='" + text + "']" )
+            || isElementPresent( "//input[@value='" + text + "']" );
+    }
+
+    public boolean isButtonWithIdPresent( String text )
+    {
+        return isElementPresent( "//button[@id='" + text + "']" ) || isElementPresent( "//input[@id='" + text + "']" );
+    }
+
+    public void clickButtonWithValue( String text )
+    {
+        clickButtonWithValue( text, true );
+    }
+
+    public void clickButtonWithValue( String text, boolean wait )
+    {
+        assertButtonWithValuePresent( text );
+
+        if ( isElementPresent( "//button[@value='" + text + "']" ) )
+        {
+            clickLinkWithXPath( "//button[@value='" + text + "']", wait );
+        }
+        else
+        {
+            clickLinkWithXPath( "//input[@value='" + text + "']", wait );
+        }
+    }
+
+    public void clickSubmitWithLocator( String locator )
+    {
+        clickLinkWithLocator( locator );
+    }
+
+    public void clickSubmitWithLocator( String locator, boolean wait )
+    {
+        clickLinkWithLocator( locator, wait );
+    }
+
+    public void clickImgWithAlt( String alt )
+    {
+        clickLinkWithLocator( "//img[@alt='" + alt + "']" );
+    }
+
+    public void clickLinkWithText( String text )
+    {
+        clickLinkWithText( text, true );
+    }
+
+    public void clickLinkWithText( String text, boolean wait )
+    {
+        clickLinkWithLocator( "link=" + text, wait );
+    }
+
+    public void clickLinkWithXPath( String xpath )
+    {
+        clickLinkWithXPath( xpath, true );
+    }
+
+    public void clickLinkWithXPath( String xpath, boolean wait )
+    {
+        clickLinkWithLocator( "xpath=" + xpath, wait );
+    }
+
+    public void clickLinkWithLocator( String locator )
+    {
+        clickLinkWithLocator( locator, true );
+    }
+
+    public void clickLinkWithLocator( String locator, boolean wait )
+    {
+        assertElementPresent( locator );
+        getSelenium().click( locator );
+        if ( wait )
+        {
+            waitPage();
+        }
+    }
+
+    public void setFieldValues( Map&lt;String, String&gt; fieldMap )
+    {
+        Map.Entry&lt;String, String&gt; entry;
+
+        for ( Iterator&lt;Entry&lt;String, String&gt;&gt; entries = fieldMap.entrySet().iterator(); entries.hasNext(); )
+        {
+            entry = entries.next();
+
+            getSelenium().type( entry.getKey(), entry.getValue() );
+        }
+    }
+
+    public void setFieldValue( String fieldName, String value )
+    {
+        getSelenium().type( fieldName, value );
+    }
+
+    public void checkField( String locator )
+    {
+        getSelenium().check( locator );
+    }
+
+    public void uncheckField( String locator )
+    {
+        getSelenium().uncheck( locator );
+    }
+
+    public boolean isChecked( String locator )
+    {
+        return getSelenium().isChecked( locator );
+    }
+
+    public void assertIsChecked( String locator )
+    {
+        Assert.assertTrue( getSelenium().isChecked( locator ) );
+    }
+
+    public void assertIsNotChecked( String locator )
+    {
+        Assert.assertFalse( getSelenium().isChecked( locator ) );
+    }
+
+    public void clickAndWait( String locator )
+    {
+        getSelenium().click( locator );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+    }
+
+    public void waitForElementPresent( String locator )
+        throws InterruptedException
+    {
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        for ( int second = 0;; second++ )
+        {
+            if ( second &gt;= 60 )
+                Assert.fail( "timeout" );
+            try
+            {
+                if ( isElementPresent( locator ) )
+                    break;
+            }
+            catch ( Exception e )
+            {
+            }
+            Thread.sleep( 1000 );
+        }
+    }
+
+    public void waitForTextPresent( String text )
+        throws InterruptedException
+    {
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        for ( int second = 0;; second++ )
+        {
+            if ( second &gt;= 60 )
+                Assert.fail( "Timeout" );
+            try
+            {
+                if ( isTextPresent( text ) )
+                    break;
+            }
+            catch ( Exception e )
+            {
+            }
+            Thread.sleep( 1000 );
+        }
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,375 @@
+package org.apache.continuum.web.test.parent;
+
+import java.io.File;
+
+import org.apache.continuum.web.test.XPathExpressionUtil;
+
+public abstract class AbstractUserRolesManagementTest
+	extends AbstractContinuumTest
+{
+	protected String username;
+	protected String fullname;
+
+	public String getUserEmail()
+	{
+		String email = getProperty( "USERROLE_EMAIL" );
+		return email;
+	}
+
+	public String getUserRolePassword()
+	{
+		String password = getProperty( "USERROLE_PASSWORD" );
+		return password;
+	}
+
+	public String getUserRoleNewPassword()
+	{
+		String password_new = getProperty( "NEW_USERROLE_PASSWORD" );
+		return password_new;
+	}
+
+	public String getBasedir()
+    {
+        String basedir = System.getProperty( "basedir" );
+
+        if ( basedir == null )
+        {
+            basedir = new File( "" ).getAbsolutePath();
+        }
+
+        return basedir;
+    }
+
+	public String getAdminUsername()
+	{
+		String adminUsername = getProperty( "ADMIN_USERNAME" );
+		return adminUsername;
+	}
+
+	public String getAdminPassword()
+	{
+		String adminPassword = getProperty( "ADMIN_PASSWORD" );
+		return adminPassword;
+	}
+
+	////////////////////////////
+	// Assertions
+	////////////////////////////
+	public void assertCreateUserPage()
+	{
+		assertPage( "[Admin] User Create" );
+		assertTextPresent( "[Admin] User Create" );
+		assertTextPresent( "Username*:" );
+		assertElementPresent( "user.username" );
+		assertTextPresent( "Full Name*:");
+		assertElementPresent( "user.fullName" );
+		assertTextPresent( "Email Address*:" );
+		assertElementPresent( "user.email" );
+		assertTextPresent( "Password*:" );
+		assertElementPresent( "user.password" );
+		assertTextPresent( "Confirm Password*:" );
+		assertElementPresent( "user.confirmPassword" );
+		assertButtonWithValuePresent( "Create User" );
+	}
+
+	public void assertUserRolesPage()
+	{
+		assertPage( "[Admin] User Edit" );
+		assertTextPresent( "[Admin] User Roles" );
+		String userRoles = "Username,Full Name,Email,redback-xwork-integration-core,Redback XWork Integration Security Core,Guest,Registered User,System Administrator,User Administrator,Continuum Group Project Administrator,Continuum Group Project Developer,Continuum Group Project User,Continuum Manage Build Environments,Continuum Manage Build Templates,Continuum Manage Installations,Continuum Manage Local Repositories,Continuum Manage Purging,Continuum Manage Queues,Continuum Manage Scheduling,Project Administrator,Project Developer,Project User,Default Project Group";
+		String[] arrayUserRoles = userRoles.split( "," );
+			for ( String userroles : arrayUserRoles )
+				assertTextPresent( userroles );
+	}
+
+	   public void assertCreatedUserInfo( String username )
+    {
+        selectValue( "name=ec_rd", "50" );
+        waitPage();
+        clickLinkWithText( username );
+        clickLinkWithText( "Edit Roles" );
+    }
+
+	public void assertUserRoleCheckBoxPresent( String value )
+    {
+    	getSelenium().isElementPresent( "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='"+ value + "']" );
+    }
+
+    public void assertResourceRolesCheckBoxPresent( String value )
+    {
+    	getSelenium().isElementPresent( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
+    }
+
+    public void checkUserRoleWithValue( String value )
+    {
+    	assertUserRoleCheckBoxPresent( value );
+    	getSelenium().click( "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='"+ value + "']" );
+    }
+
+    public void checkResourceRoleWithValue( String value )
+    {
+    	assertResourceRolesCheckBoxPresent( value );
+    	getSelenium().click( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
+    }
+
+	public void assertLeftNavMenuWithRole( String role )
+	{
+		if( role == "System Administrator" )
+    	{
+    		String navMenu = "About,Show Project Groups,Maven 2.0.x Project,Maven 1.x Project,Ant Project,Shell Project,Local Repositories,Purge Configurations,Schedules,Installations,Build Environments,Queues,Build Definition Templates,Configuration,Appearance,Users,Roles,Build Queue";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "User Administrator" )
+    	{
+    		String navMenu = "About,Show Project Groups,Users,Roles";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Group Project Administrator" )
+    	{
+    		String navMenu = "About,Show Project Groups,Maven 2.0.x Project,Maven 1.x Project,Ant Project,Shell Project,Schedules,Queues,Users,Roles";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Group Project Developer" )
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Group Project User" )
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Build Environments" )
+    	{
+    		String navMenu = "About,Show Project Groups,Build Environments";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Build Templates" )
+    	{
+    		String navMenu = "About,Show Project Groups,Build Definition Templates";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Installations" )
+    	{
+    		String navMenu = "About,Show Project Groups,Installations";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Local Repositories" )
+    	{
+    		String navMenu = "About,Show Project Groups,Local Repositories";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Purging" )
+    	{
+    		String navMenu = "About,Show Project Groups,Purge Configurations";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Queues" )
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Scheduling" )
+    	{
+    		String navMenu = "About,Show Project Groups,Schedules";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Project Administrator - Default Project Group" )
+    	{
+    		String navMenu = "About,Show Project Groups,Queues,Users,Roles";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Project Developer - Default Project Group" || role == "Project User - Default Project Group" )
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else
+    	{
+    		String navMenu = "About,Show Project Groups";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    		assertTextPresent( "Project Groups" );
+    		//assertTextPresent( "Project Groups list is empty." );
+    	}
+
+	}
+
+    public void assertDeleteUserPage( String username )
+    {
+        assertPage( "[Admin] User Delete" ); //TODO
+        assertTextPresent( "[Admin] User Delete" );
+        assertTextPresent( "The following user will be deleted:" );
+        assertTextPresent( "Username: " + username );
+        assertButtonWithValuePresent( "Delete User" );
+    }
+
+	public void assertProjectAdministratorAccess()
+    {
+        assertLinkPresent( "About" );
+        assertLinkPresent( "Show Project Groups" );
+        assertLinkPresent( "Maven 2.0.x Project" );
+        assertLinkPresent( "Maven 1.x Project" );
+        assertLinkPresent( "Ant Project" );
+        assertLinkPresent( "Shell Project" );
+        assertLinkPresent( "Schedules" );
+        assertLinkPresent( "Queues" );
+        assertLinkPresent( "Users" );
+        assertLinkPresent( "Roles" );
+        assertLinkNotPresent( "Local Repositories" );
+        assertLinkNotPresent( "Purge Configurations" );
+        assertLinkNotPresent( "Installations" );
+        assertLinkNotPresent( "Build Environments" );
+        assertLinkNotPresent( "Build Definition Templates" );
+        assertLinkNotPresent( "Configuration" );
+        assertLinkNotPresent( "Appearance" );
+        assertLinkNotPresent( "Build Queue" );
+        assertLinkNotPresent( "Build Agent" );
+    }
+
+	/////////////////////////////////////////
+	// User Roles Management
+	/////////////////////////////////////////
+    public void changePassword( String oldPassword, String newPassword )
+	{
+		assertPage( "Change Password" );
+		setFieldValue( "existingPassword", oldPassword );
+		setFieldValue( "newPassword", newPassword );
+		setFieldValue( "newPasswordConfirm", newPassword );
+		clickButtonWithValue( "Change Password" );
+	}
+
+	public void createUser( String userName, String fullName, String email, String password, boolean valid )
+	{
+		createUser( userName, fullName, email, password, password, valid );
+	}
+
+	private void createUser( String userName, String fullName, String emailAd, String password, String confirmPassword,
+                             boolean valid )
+	{
+		login( getAdminUsername() , getAdminPassword() );
+		clickLinkWithText( "Users" );
+		clickButtonWithValue( "Create New User" );
+		assertCreateUserPage();
+        setFieldValue( "user.username", userName );
+        setFieldValue( "user.fullName", fullName );
+        setFieldValue( "user.email", emailAd );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", confirmPassword );
+        submit();
+
+        assertUserRolesPage( );
+        clickButtonWithValue( "Submit" );
+
+        /*if (valid )
+        {
+        	String[] columnValues = {userName, fullName, emailAd};
+            assertElementPresent( XPathExpressionUtil.getTableRow( columnValues ) );
+        }
+        else
+        {
+            assertCreateUserPage();
+        }*/
+	}
+
+
+	public void login( String username, String password )
+	{
+	    login( username, password, true, "Login Page" );
+	}
+
+    public void login( String username, String password, boolean valid, String assertReturnPage )
+	{
+        if ( isLinkPresent( "Login" ) )
+	    {
+            goToLoginPage();
+
+            submitLoginPage( username, password, false, valid, assertReturnPage );
+	    }
+    }
+
+    public void submitLoginPage( String username, String password )
+    {
+        submitLoginPage( username, password, false, true, "Login Page" );
+    }
+
+    public void submitLoginPage( String username, String password, boolean validUsernamePassword )
+    {
+        submitLoginPage( username, password, false, validUsernamePassword, "Login Page" );
+    }
+
+    public void submitLoginPage( String username, String password, boolean rememberMe, boolean validUsernamePassword,
+                                 String assertReturnPage )
+    {
+        assertLoginPage();
+        setFieldValue( "username", username );
+        setFieldValue( "password", password );
+        if ( rememberMe )
+        {
+            checkField( "rememberMe" );
+        }
+        clickButtonWithValue( "Login" );
+
+        if ( validUsernamePassword )
+        {
+            assertTextPresent( "Current User:" );
+            assertTextPresent( username );
+            assertLinkPresent( "Edit Details" );
+            assertLinkPresent( "Logout" );
+        }
+        else
+        {
+            if ( "Login Page".equals( assertReturnPage ) )
+            {
+                assertLoginPage();
+            }
+            else
+            {
+                assertPage( assertReturnPage );
+            }
+        }
+    }
+
+	public void deleteUser( String userName, String fullName, String emailAdd )
+    {
+        deleteUser( userName, fullName, emailAdd, false, false );
+    }
+
+    public void deleteUser( String userName, String fullName, String emailAd, boolean validated, boolean locked )
+    {
+	    //clickLinkWithText( "userlist" );
+        clickLinkWithXPath( "//table[@id='ec_table']/tbody[2]/tr[3]/td[7]/a/img" );
+        assertDeleteUserPage( userName );
+        submit();
+        assertElementNotPresent( userName );
+    }
+}

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/tomcat5x/conf/catalina.policy
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/tomcat5x/conf/catalina.policy?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/tomcat5x/conf/catalina.policy (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/tomcat5x/conf/catalina.policy Tue Nov 10 05:38:01 2009
@@ -1,172 +1,172 @@
-// ============================================================================
-// catalina.corepolicy - Security Policy Permissions for Tomcat 5
-//
-// This file contains a default set of security policies to be enforced (by the
-// JVM) when Catalina is executed with the "-security" option.  In addition
-// to the permissions granted here, the following additional permissions are
-// granted to the codebase specific to each web application:
-//
-// * Read access to the document root directory
-//
-// $Id: catalina.policy 393732 2006-04-13 06:32:25Z pero $
-// ============================================================================
-
-
-// ========== SYSTEM CODE PERMISSIONS =========================================
-
-
-// These permissions apply to javac
-grant codeBase "file:${java.home}/lib/-" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to all shared system extensions
-grant codeBase "file:${java.home}/jre/lib/ext/-" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
-grant codeBase "file:${java.home}/../lib/-" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to all shared system extensions when
-// ${java.home} points at $JAVA_HOME/jre
-grant codeBase "file:${java.home}/lib/ext/-" {
-        permission java.security.AllPermission;
-};
-
-
-// ========== CATALINA CODE PERMISSIONS =======================================
-
-
-// These permissions apply to the launcher code
-grant codeBase "file:${catalina.home}/bin/commons-launcher.jar" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to the daemon code
-grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to the commons-logging API
-grant codeBase "file:${catalina.home}/bin/commons-logging-api.jar" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to the server startup code
-grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to the JMX server
-grant codeBase "file:${catalina.home}/bin/jmx.jar" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to JULI
-grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to the servlet API classes
-// and those that are shared across all class loaders
-// located in the "common" directory
-grant codeBase "file:${catalina.home}/common/-" {
-        permission java.security.AllPermission;
-};
-
-// These permissions apply to the container's core code, plus any additional
-// libraries installed in the "server" directory
-grant codeBase "file:${catalina.home}/server/-" {
-        permission java.security.AllPermission;
-};
-
-// The permissions granted to the balancer WEB-INF/classes and WEB-INF/lib directory
-grant codeBase "file:${catalina.home}/webapps/balancer/-" {
-        permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester";
-        permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester.*";
-};
-// ========== WEB APPLICATION PERMISSIONS =====================================
-
-
-// These permissions are granted by default to all web applications
-// In addition, a web application will be given a read FilePermission
-// and JndiPermission for all files and directories in its document root.
-grant { 
-    // Required for JNDI lookup of named JDBC DataSource's and
-    // javamail named MimePart DataSource used to send mail
-    permission java.util.PropertyPermission "java.home", "read";
-    permission java.util.PropertyPermission "java.naming.*", "read";
-    permission java.util.PropertyPermission "javax.sql.*", "read";
-
-    // OS Specific properties to allow read access
-    permission java.util.PropertyPermission "os.name", "read";
-    permission java.util.PropertyPermission "os.version", "read";
-    permission java.util.PropertyPermission "os.arch", "read";
-    permission java.util.PropertyPermission "file.separator", "read";
-    permission java.util.PropertyPermission "path.separator", "read";
-    permission java.util.PropertyPermission "line.separator", "read";
-
-    // JVM properties to allow read access
-    permission java.util.PropertyPermission "java.version", "read";
-    permission java.util.PropertyPermission "java.vendor", "read";
-    permission java.util.PropertyPermission "java.vendor.url", "read";
-    permission java.util.PropertyPermission "java.class.version", "read";
-	permission java.util.PropertyPermission "java.specification.version", "read";
-	permission java.util.PropertyPermission "java.specification.vendor", "read";
-	permission java.util.PropertyPermission "java.specification.name", "read";
-
-	permission java.util.PropertyPermission "java.vm.specification.version", "read";
-	permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
-	permission java.util.PropertyPermission "java.vm.specification.name", "read";
-	permission java.util.PropertyPermission "java.vm.version", "read";
-	permission java.util.PropertyPermission "java.vm.vendor", "read";
-	permission java.util.PropertyPermission "java.vm.name", "read";
-
-    // Required for OpenJMX
-    permission java.lang.RuntimePermission "getAttribute";
-
-	// Allow read of JAXP compliant XML parser debug
-	permission java.util.PropertyPermission "jaxp.debug", "read";
-
-    // Precompiled JSPs need access to this package.
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
-    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
-    
-};
-
-
-// You can assign additional permissions to particular web applications by
-// adding additional "grant" entries here, based on the code base for that
-// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
-//
-// Different permissions can be granted to JSP pages, classes loaded from
-// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
-// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
-//
-// For instance, assume that the standard "examples" application
-// included a JDBC driver that needed to establish a network connection to the
-// corresponding database and used the scrape taglib to get the weather from
-// the NOAA web server.  You might create a "grant" entries like this:
-//
-// The permissions granted to the context root directory apply to JSP pages.
-// grant codeBase "file:${catalina.home}/webapps/examples/-" {
-//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
-//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
-// };
-//
-// The permissions granted to the context WEB-INF/classes directory
-// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
-// };
-//
-// The permission granted to your JDBC driver
-// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
-//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
-// };
-// The permission granted to the scrape taglib
-// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
-//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
-// };
-
+// ============================================================================
+// catalina.corepolicy - Security Policy Permissions for Tomcat 5
+//
+// This file contains a default set of security policies to be enforced (by the
+// JVM) when Catalina is executed with the "-security" option.  In addition
+// to the permissions granted here, the following additional permissions are
+// granted to the codebase specific to each web application:
+//
+// * Read access to the document root directory
+//
+// $Id$
+// ============================================================================
+
+
+// ========== SYSTEM CODE PERMISSIONS =========================================
+
+
+// These permissions apply to javac
+grant codeBase "file:${java.home}/lib/-" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions
+grant codeBase "file:${java.home}/jre/lib/ext/-" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/../lib/-" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions when
+// ${java.home} points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/lib/ext/-" {
+        permission java.security.AllPermission;
+};
+
+
+// ========== CATALINA CODE PERMISSIONS =======================================
+
+
+// These permissions apply to the launcher code
+grant codeBase "file:${catalina.home}/bin/commons-launcher.jar" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to the daemon code
+grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to the commons-logging API
+grant codeBase "file:${catalina.home}/bin/commons-logging-api.jar" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to the server startup code
+grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to the JMX server
+grant codeBase "file:${catalina.home}/bin/jmx.jar" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to JULI
+grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to the servlet API classes
+// and those that are shared across all class loaders
+// located in the "common" directory
+grant codeBase "file:${catalina.home}/common/-" {
+        permission java.security.AllPermission;
+};
+
+// These permissions apply to the container's core code, plus any additional
+// libraries installed in the "server" directory
+grant codeBase "file:${catalina.home}/server/-" {
+        permission java.security.AllPermission;
+};
+
+// The permissions granted to the balancer WEB-INF/classes and WEB-INF/lib directory
+grant codeBase "file:${catalina.home}/webapps/balancer/-" {
+        permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester";
+        permission java.lang.RuntimePermission "accessClassInPackage.org.apache.tomcat.util.digester.*";
+};
+// ========== WEB APPLICATION PERMISSIONS =====================================
+
+
+// These permissions are granted by default to all web applications
+// In addition, a web application will be given a read FilePermission
+// and JndiPermission for all files and directories in its document root.
+grant { 
+    // Required for JNDI lookup of named JDBC DataSource's and
+    // javamail named MimePart DataSource used to send mail
+    permission java.util.PropertyPermission "java.home", "read";
+    permission java.util.PropertyPermission "java.naming.*", "read";
+    permission java.util.PropertyPermission "javax.sql.*", "read";
+
+    // OS Specific properties to allow read access
+    permission java.util.PropertyPermission "os.name", "read";
+    permission java.util.PropertyPermission "os.version", "read";
+    permission java.util.PropertyPermission "os.arch", "read";
+    permission java.util.PropertyPermission "file.separator", "read";
+    permission java.util.PropertyPermission "path.separator", "read";
+    permission java.util.PropertyPermission "line.separator", "read";
+
+    // JVM properties to allow read access
+    permission java.util.PropertyPermission "java.version", "read";
+    permission java.util.PropertyPermission "java.vendor", "read";
+    permission java.util.PropertyPermission "java.vendor.url", "read";
+    permission java.util.PropertyPermission "java.class.version", "read";
+	permission java.util.PropertyPermission "java.specification.version", "read";
+	permission java.util.PropertyPermission "java.specification.vendor", "read";
+	permission java.util.PropertyPermission "java.specification.name", "read";
+
+	permission java.util.PropertyPermission "java.vm.specification.version", "read";
+	permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
+	permission java.util.PropertyPermission "java.vm.specification.name", "read";
+	permission java.util.PropertyPermission "java.vm.version", "read";
+	permission java.util.PropertyPermission "java.vm.vendor", "read";
+	permission java.util.PropertyPermission "java.vm.name", "read";
+
+    // Required for OpenJMX
+    permission java.lang.RuntimePermission "getAttribute";
+
+	// Allow read of JAXP compliant XML parser debug
+	permission java.util.PropertyPermission "jaxp.debug", "read";
+
+    // Precompiled JSPs need access to this package.
+    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
+    permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
+    
+};
+
+
+// You can assign additional permissions to particular web applications by
+// adding additional "grant" entries here, based on the code base for that
+// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
+//
+// Different permissions can be granted to JSP pages, classes loaded from
+// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
+// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
+//
+// For instance, assume that the standard "examples" application
+// included a JDBC driver that needed to establish a network connection to the
+// corresponding database and used the scrape taglib to get the weather from
+// the NOAA web server.  You might create a "grant" entries like this:
+//
+// The permissions granted to the context root directory apply to JSP pages.
+// grant codeBase "file:${catalina.home}/webapps/examples/-" {
+//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+//
+// The permissions granted to the context WEB-INF/classes directory
+// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
+// };
+//
+// The permission granted to your JDBC driver
+// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
+//      permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// };
+// The permission granted to the scrape taglib
+// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
+//      permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/testng-pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/testng-pom.xml?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/testng-pom.xml (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/testng-pom.xml Tue Nov 10 05:38:01 2009
@@ -1,122 +0,0 @@
-&lt;?xml version='1.0' encoding='UTF-8'?&gt;
-&lt;!--
-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.
---&gt;
-&lt;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"&gt;
-  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
-  &lt;parent&gt;
-    &lt;groupId&gt;org.apache.continuum&lt;/groupId&gt;
-    &lt;artifactId&gt;continuum&lt;/artifactId&gt;
-    &lt;version&gt;1.3.2-SNAPSHOT&lt;/version&gt;
-  &lt;/parent&gt;
-  &lt;artifactId&gt;continuum-webapp-test&lt;/artifactId&gt;
-  &lt;name&gt;Continuum Webapp Test&lt;/name&gt;
-  &lt;packaging&gt;pom&lt;/packaging&gt;
-
-  &lt;build&gt;
-    &lt;testSourceDirectory&gt;src/test/testng&lt;/testSourceDirectory&gt;
-    &lt;plugins&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
-        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
-        &lt;configuration&gt;
-          &lt;source&gt;1.5&lt;/source&gt;
-          &lt;target&gt;1.5&lt;/target&gt;
-          &lt;verbose&gt;true&lt;/verbose&gt;
-        &lt;/configuration&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;testCompile&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;testResources&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
-        &lt;artifactId&gt;selenium-maven-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;phase&gt;pre-integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;start-server&lt;/goal&gt;
-            &lt;/goals&gt;
-            &lt;configuration&gt;
-              &lt;background&gt;true&lt;/background&gt;
-            &lt;/configuration&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
-        &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
-        &lt;configuration&gt;
-          &lt;suiteXmlFiles&gt;
-            &lt;suiteXmlFile&gt;src/test/testng/config/testng.xml&lt;/suiteXmlFile&gt;
-          &lt;/suiteXmlFiles&gt;
-        &lt;/configuration&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;id&gt;integration-tests&lt;/id&gt;
-            &lt;phase&gt;integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;test&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-    &lt;/plugins&gt;
-  &lt;/build&gt;
-  &lt;dependencies&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.testng&lt;/groupId&gt;
-      &lt;artifactId&gt;testng&lt;/artifactId&gt;
-      &lt;version&gt;5.8&lt;/version&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-      &lt;classifier&gt;jdk15&lt;/classifier&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.openqa.selenium.client-drivers&lt;/groupId&gt;
-      &lt;artifactId&gt;selenium-java-client-driver&lt;/artifactId&gt;
-      &lt;version&gt;0.9.2&lt;/version&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-    
-    &lt;!-- dependencies below are for code in src/test/it --&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.codehaus.plexus&lt;/groupId&gt;
-      &lt;artifactId&gt;plexus-utils&lt;/artifactId&gt;
-      &lt;version&gt;1.4&lt;/version&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.openqa.selenium.server&lt;/groupId&gt;
-      &lt;artifactId&gt;selenium-server&lt;/artifactId&gt;
-      &lt;version&gt;0.9.2&lt;/version&gt;
-    &lt;/dependency&gt;
-  &lt;/dependencies&gt;
-&lt;/project&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834357 [3/7] - in /continuum/branches/continuum-1.3.x/continuum-webapp-test: ./ src/site/ src/site/apt/ src/test/it/org/apache/continuum/web/test/ src/test/resources/ src/test/testng/config/ src/test/testng/org/apache/continuum/web/test/ s...</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110053804.428C123889BB@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110053804-428C123889BB@eris-apache-org%3e</id>
<updated>2009-11-10T05:38:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java Tue Nov 10 05:38:01 2009
@@ -1,1101 +0,0 @@
-package org.apache.continuum.web.test;
-
-/*
- * 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.Assert;
-
-/**
- * Based on AbstractContinuumTestCase of Emmanuel Venisse test.
- *
- * @author JosÃ© Morales MartÃ­nez
- * @version $Id$
- */
-public abstract class AbstractContinuumTest
-    extends AbstractSeleniumTest
-{
-
-    // ////////////////////////////////////
-    // About
-    // ////////////////////////////////////
-    public void goToAboutPage()
-    {
-        clickLinkWithText( "About" );
-
-        assertAboutPage();
-    }
-
-    public void assertAboutPage()
-    {
-        assertPage( "Continuum - About" );
-        assertTextPresent( "About Continuum" );
-        assertTextPresent( "Version:" );
-    }
-
-    // ////////////////////////////////////
-    // Configuration
-    // ////////////////////////////////////
-    public void assertEditConfigurationPage()
-    {
-        assertPage( "Continuum - Configuration" );
-        assertTextPresent( "Working Directory" );
-        assertElementPresent( "workingDirectory" );
-        assertTextPresent( "Build Output Directory" );
-        assertElementPresent( "buildOutputDirectory" );
-        assertTextPresent( "Deployment Repository Directory" );
-        assertElementPresent( "deploymentRepositoryDirectory" );
-        assertTextPresent( "Base URL" );
-        assertElementPresent( "baseUrl" );
-    }
-
-    public void submitConfigurationPage( String baseUrl, String companyName, String companyLogo, String companyUrl )
-    {
-        setFieldValue( "baseUrl", baseUrl );
-        if ( companyName != null )
-        {
-            setFieldValue( "companyName", companyName );
-        }
-        if ( companyLogo != null )
-        {
-            setFieldValue( "companyLogo", companyLogo );
-        }
-        if ( companyUrl != null )
-        {
-            setFieldValue( "companyUrl", companyUrl );
-        }
-        submit();
-        waitPage();
-    }
-
-    // ////////////////////////////////////
-    // ANT/SHELL Projects
-    // ////////////////////////////////////
-    public void assertAddProjectPage( String type )
-    {
-        String title = type.substring( 0, 1 ).toUpperCase() + type.substring( 1 ).toLowerCase();
-        assertPage( "Continuum - Add " + title + " Project" );
-        assertTextPresent( "Add " + title + " Project" );
-        assertTextPresent( "Project Name" );
-        assertElementPresent( "projectName" );
-        assertTextPresent( "Version" );
-        assertElementPresent( "projectVersion" );
-        assertTextPresent( "Scm Url" );
-        assertElementPresent( "projectScmUrl" );
-        assertTextPresent( "Scm Username" );
-        assertElementPresent( "projectScmUsername" );
-        assertTextPresent( "Scm Password" );
-        assertElementPresent( "projectScmPassword" );
-        assertTextPresent( "Scm Branch/Tag" );
-        assertElementPresent( "projectScmTag" );
-        assertLinkPresent( "Maven SCM URL" );
-    }
-
-    public void assertAddAntProjectPage()
-    {
-        assertAddProjectPage( "ant" );
-    }
-
-    public void assertAddShellProjectPage()
-    {
-        assertAddProjectPage( "shell" );
-    }
-
-    // ////////////////////////////////////
-    // Project Groups
-    // ////////////////////////////////////
-    public void goToProjectGroupsSummaryPage()
-        throws Exception
-    {
-        clickLinkWithText( "Show Project Groups" );
-
-        assertProjectGroupsSummaryPage();
-    }
-
-    public void assertProjectGroupsSummaryPage()
-    {
-        assertPage( "Continuum - Group Summary" );
-        assertTextPresent( "Project Groups" );
-
-        if ( isTextPresent( "Project Groups list is empty." ) )
-        {
-            assertTextNotPresent( "Name" );
-            assertTextNotPresent( "Group Id" );
-        }
-        else
-        {
-            assertTextPresent( "Name" );
-            assertTextPresent( "Group Id" );
-        }
-    }
-
-    // ////////////////////////////////////
-    // Project Group
-    // ////////////////////////////////////
-    public void showProjectGroup( String name, String groupId, String description )
-        throws Exception
-    {
-        goToProjectGroupsSummaryPage();
-
-        // Checks the link to the created Project Group
-        assertLinkPresent( name );
-        clickLinkWithText( name );
-
-        assertProjectGroupSummaryPage( name, groupId, description );
-    }
-
-    public void assertProjectGroupSummaryPage( String name, String groupId, String description )
-    {
-        assertPage( "Continuum - Project Group" );
-        assertTextPresent( "Project Group Name" );
-        assertTextPresent( name );
-        assertTextPresent( "Project Group Id" );
-        assertTextPresent( groupId );
-        assertTextPresent( "Description" );
-        assertTextPresent( description );
-
-        // Assert the available Project Group Actions
-        assertTextPresent( "Group Actions" );
-        assertElementPresent( "build" );
-        assertElementPresent( "edit" );
-        assertElementPresent( "remove" );
-
-        assertTextPresent( "Project Group Scm Root" );
-
-        if ( isTextPresent( "Member Projects" ) )
-        {
-            assertTextPresent( "Project Name" );
-            assertTextPresent( "Version" );
-            assertTextPresent( "Build" );
-        }
-        else
-        {
-            assertTextNotPresent( "Project Name" );
-        }
-    }
-
-    public void addProjectGroup( String name, String groupId, String description, boolean success )
-        throws Exception
-    {
-        goToProjectGroupsSummaryPage();
-
-        // Go to Add Project Group Page
-        clickButtonWithValue( "Add Project Group" );
-        assertAddProjectGroupPage();
-
-        // Enter values into Add Project Group fields, and submit
-        setFieldValue( "name", name );
-        setFieldValue( "groupId", groupId );
-        setFieldValue( "description", description );
-
-        submit();
-        if ( success )
-        {
-            assertProjectGroupsSummaryPage();
-        }
-        else
-        {
-            assertAddProjectGroupPage();
-        }
-    }
-
-    public void assertAddProjectGroupPage()
-    {
-        assertPage( "Continuum - Add Project Group" );
-
-        assertTextPresent( "Add Project Group" );
-        assertTextPresent( "Project Group Name" );
-        assertElementPresent( "name" );
-        assertTextPresent( "Project Group Id" );
-        assertElementPresent( "groupId" );
-        assertTextPresent( "Description" );
-        assertElementPresent( "description" );
-    }
-
-    public void removeProjectGroup( String name, String groupId, String description )
-        throws Exception
-    {
-        showProjectGroup( name, groupId, description );
-
-        // Remove
-        clickLinkWithLocator( "remove" );
-
-        // Assert Confirmation
-        assertElementPresent( "removeProjectGroup_" );
-        assertElementPresent( "Cancel" );
-
-        // Confirm Project Group deletion
-        clickButtonWithValue( "Save" );
-        assertProjectGroupsSummaryPage();
-    }
-
-    public void editProjectGroup( String name, String groupId, String description, String newName, String newDescription )
-        throws Exception
-    {
-        showProjectGroup( name, groupId, description );
-        clickButtonWithValue( "Edit" );
-        assertEditGroupPage( groupId );
-        setFieldValue( "saveProjectGroup_name", newName );
-        setFieldValue( "saveProjectGroup_description", newDescription );
-        clickButtonWithValue( "Save" );
-    }
-
-    public void assertEditGroupPage( String groupId )
-        throws Exception
-    {
-        assertPage( "Continuum - Update Project Group" );
-        assertTextPresent( "Update Project Group" );
-        assertTextPresent( "Project Group Name" );
-        assertTextPresent( "Project Group Id" );
-        assertTextPresent( groupId );
-        assertTextPresent( "Description" );
-        assertTextPresent( "Homepage Url" );
-        assertTextPresent( "Local Repository" );
-        assertElementPresent( "saveProjectGroup_" );
-        assertElementPresent( "Cancel" );
-    }
-
-    public void buildProjectGroup( String projectGroupName, String groupId, String description )
-        throws Exception
-    {
-        int currentIt = 1;
-        int maxIt = 20;
-        showProjectGroup( projectGroupName, groupId, description );
-        clickButtonWithValue( "Build all projects" );
-
-        while ( isElementPresent( "//img[@alt='Building']" ) || isElementPresent( "//img[@alt='Updating']" ) )
-        {
-            Thread.sleep( 10000 );
-            geSelenium().refresh();
-            waitPage();
-            if ( currentIt &gt; maxIt )
-            {
-                Assert.fail("Timeout, Can't build project group");
-            }
-            currentIt++;
-        }
-        clickLinkWithText( p.getProperty( "M2_PROJ_GRP_NAME" ) );
-        clickLinkWithText( "Builds" );
-        clickLinkWithText( "Result" );
-        assertTextPresent( "BUILD SUCCESSFUL" );
-        clickLinkWithText( "Project Group Summary" );
-    }
-
-    public void assertReleaseSuccess()
-    {
-        assertTextPresent( "Choose Release Goal for Apache Maven" );
-    }
-
-    public void addValidM2ProjectFromProjectGroup( String projectGroupName, String groupId, String description,
-                                                   String m2PomUrl )
-        throws Exception
-    {
-        showProjectGroup( projectGroupName, groupId, description );
-        selectValue( "projectTypes", "Add M2 Project" );
-        clickButtonWithValue( "Add" );
-        assertAddMavenTwoProjectPage();
-
-        setFieldValue( "m2PomUrl", m2PomUrl );
-        clickButtonWithValue( "Add" );
-
-        // if success redirect to summary page
-        assertProjectGroupsSummaryPage();
-    }
-
-    public void goToGroupBuildDefinitionPage( String projectGroupName, String groupId, String description )
-        throws Exception
-    {
-        showProjectGroup( projectGroupName, groupId, description );
-        clickLinkWithText( "Build Definitions" );
-        assertTextPresent( "Project Group Build Definitions of " + projectGroupName + " group" );
-
-        assertGroupBuildDefinitionPage( projectGroupName );
-
-    }
-
-    public void assertGroupBuildDefinitionPage( String projectGroupName )
-    {
-
-        assertTextPresent( "Project Group Build Definitions of " + projectGroupName + " group" );
-    }
-
-    public void assertDeleteBuildDefinitionPage( String description, String goals)
-    {
-        assertTextPresent( "Are you sure you want to delete the build definition with description \""+description+"\", goals \""+ goals + "\" and id" );
-        isButtonWithValuePresent( "Cancel" );
-        isButtonWithValuePresent( "Delete" );
-    }
-
-
-
-    public void assertAddEditBuildDefinitionPage()
-    {
-        assertTextPresent( "Add/Edit Build Definition" );
-        assertTextPresent( "POM filename*:" );
-        assertElementPresent( "buildFile" );
-        assertTextPresent( "Goals:" );
-        assertElementPresent( "goals" );
-        assertTextPresent( "Arguments:" );
-        assertElementPresent( "arguments" );
-        assertTextPresent( "Build Fresh" );
-        assertElementPresent( "buildFresh" );
-        assertTextPresent( "Always Build" );
-        assertElementPresent( "alwaysBuild" );
-        assertTextPresent( "Is it default?" );
-        assertTextPresent( "Schedule:" );
-        assertElementPresent( "scheduleId" );
-        assertTextPresent( "Description" );
-        assertElementPresent( "description" );
-        assertTextPresent( "Type" );
-        assertElementPresent( "buildDefinitionType" );
-        assertTextPresent( "Build Environment" );
-        assertElementPresent( "profileId" );
-    }
-
-    public void addEditGroupBuildDefinition( String groupName, String buildFile, String goals, String arguments, String description,
-                                             boolean buildFresh, boolean alwaysBuild, boolean isDefault )
-    {
-        assertAddEditBuildDefinitionPage();
-        // Enter values into Add Build Definition fields, and submit
-        setFieldValue( "buildFile", buildFile );
-        setFieldValue( "goals", goals );
-        setFieldValue( "arguments", arguments );
-        setFieldValue( "description", description );
-
-        if ( buildFresh )
-        {
-            checkField( "buildFresh" );
-        }
-        else
-        {
-            uncheckField( "buildFresh" );
-        }
-        if ( isElementPresent( "defaultBuildDefinition" ) )
-        {
-            if ( isDefault )
-            {
-                checkField( "defaultBuildDefinition" );
-            }
-            else
-            {
-                uncheckField( "defaultBuildDefinition" );
-            }
-        }
-        if ( alwaysBuild )
-        {
-            checkField( "alwaysBuild" );
-        }
-        else
-        {
-            uncheckField( "alwaysBuild" );
-        }
-
-        submit();
-        if(groupName != null){
-            assertGroupBuildDefinitionPage( groupName );
-        } else {
-            assertProjectInformationPage();
-        }
-    }
-
-    public void assertGroupNotifierPage( String projectGroupName )
-    {
-        assertTextPresent( "Project Group Notifiers of group " + projectGroupName );
-    }
-
-    public void assertProjectNotifierPage()
-    {
-        assertTextPresent( "Add Notifier" );
-    }
-
-    public void assertAddNotifierPage()
-    {
-        assertPage( "Continuum - Add Notifier" );
-        assertTextPresent( "Add Notifier" );
-        assertTextPresent( "Type" );
-        assertElementPresent( "notifierType" );
-        assertElementPresent( "Cancel" );
-    }
-
-    public void assertAddEditMailNotifierPage()
-    {
-        assertPage( "Continuum - Add/Edit Mail Notifier" );
-        assertTextPresent( "Add/Edit Mail Notifier" );
-        assertTextPresent( "Mail Recipient Address" );
-        assertTextPresent( "Send a mail to latest committers" );
-        assertTextPresent( "Send on Success" );
-        assertTextPresent( "Send on Failure" );
-        assertTextPresent( "Send on Error" );
-        assertTextPresent( "Send on Warning" );
-        // TODO: Replace On for on
-        assertTextPresent( "Send On SCM Failure" );
-        assertElementPresent( "address" );
-        assertElementPresent( "Cancel" );
-    }
-
-    public void assertAddEditIrcNotifierPage()
-    {
-        assertPage( "Continuum - Add/Edit IRC Notifier" );
-
-        assertTextPresent( "IRC Host" );
-        assertElementPresent( "host" );
-
-        assertTextPresent( "IRC port" );
-        assertElementPresent( "port" );
-
-        assertTextPresent( "IRC channel" );
-        assertElementPresent( "channel" );
-
-        assertTextPresent( "Nick Name" );
-        assertElementPresent( "nick" );
-
-        assertTextPresent( "Alternate Nick Name" );
-        assertElementPresent( "alternateNick" );
-
-        assertTextPresent( "User Name" );
-        assertElementPresent( "username" );
-
-        assertTextPresent( "Full Name" );
-        assertElementPresent( "fullName" );
-
-        assertTextPresent( "Password" );
-        assertElementPresent( "password" );
-
-        assertTextPresent( "SSL" );
-        assertTextPresent( "Send on Success" );
-        assertTextPresent( "Send on Failure" );
-        assertTextPresent( "Send on Error" );
-        assertTextPresent( "Send on Warning" );
-        assertTextPresent( "Send On SCM Failure" );
-    }
-
-    public void assertAddEditJabberPage()
-    {
-        assertPage( "Continuum - Add/Edit Jabber Notifier" );
-
-        assertTextPresent( "Jabber Host" );
-        assertElementPresent( "host" );
-        assertTextPresent( "Jabber port" );
-        assertElementPresent( "port" );
-        assertTextPresent( "Jabber login" );
-        assertElementPresent( "login" );
-        assertTextPresent( "Jabber Password" );
-        assertElementPresent( "password" );
-        assertTextPresent( "Jabber Domain Name" );
-        assertElementPresent( "domainName" );
-        assertTextPresent( "Jabber Recipient Address" );
-        assertElementPresent( "address" );
-
-        assertTextPresent( "Is it a SSL connection?" );
-        assertTextPresent( "Is it a Jabber group?" );
-        assertTextPresent( "Send on Success" );
-        assertTextPresent( "Send on Failure" );
-        assertTextPresent( "Send on Error" );
-        assertTextPresent( "Send on Warning" );
-        // TODO: Change On for on
-        assertTextPresent( "Send On SCM Failure" );
-    }
-
-    public void assertAddEditMsnPage()
-    {
-        assertPage( "Continuum - Add/Edit MSN Notifier" );
-
-        assertTextPresent( "MSN login" );
-        assertElementPresent( "login" );
-        assertTextPresent( "MSN Password" );
-        assertElementPresent( "password" );
-        assertTextPresent( "MSN Recipient Address" );
-        assertElementPresent( "address" );
-
-        assertTextPresent( "Send on Success" );
-        assertTextPresent( "Send on Failure" );
-        assertTextPresent( "Send on Error" );
-        assertTextPresent( "Send on Warning" );
-        assertTextPresent( "Send On SCM Failure" );
-    }
-
-    public void assertAddEditWagonPage()
-    {
-        assertPage( "Continuum - Add/Edit Wagon Notifier" );
-
-        assertTextPresent( "Project Site URL" );
-        assertTextPresent( "Server Id (defined in your settings.xml for authentication)" );
-        assertElementPresent( "url" );
-        assertElementPresent( "id" );
-        assertTextPresent( "Send on Success" );
-        assertTextPresent( "Send on Failure" );
-        assertTextPresent( "Send on Error" );
-        assertTextPresent( "Send on Warning" );
-    }
-
-    public void goToGroupNotifier( String projectGroupName, String projectGroupId, String projectGroupDescription )
-        throws Exception
-    {
-        showProjectGroup( projectGroupName, projectGroupId, projectGroupDescription );
-        clickLinkWithText( "Notifiers" );
-        assertGroupNotifierPage( projectGroupName );
-        clickButtonWithValue( "Add" );
-        assertAddNotifierPage();
-    }
-
-    public void goToProjectNotifier( String projectGroupName, String projectName )
-        throws Exception
-    {
-        goToProjectInformationPage( projectGroupName, projectName );
-        clickLinkWithXPath( "//input[contains(@id,'addProjectNotifier') and @type='submit']" );
-        assertAddNotifierPage();
-    }
-
-    public void addMailNotifier( String projectGroupName, String projectName, String email, boolean isValid )
-        throws Exception
-    {
-        selectValue( "//select", "Mail" );
-        clickButtonWithValue( "Submit" );
-        assertAddEditMailNotifierPage();
-        setFieldValue( "address", email );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Address is invalid" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void editMailNotifier( String projectGroupName, String projectName, String oldMail, String newMail,
-                                  boolean isValid )
-        throws Exception
-    {
-        if ( projectName == null )
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'mail')])//img" );
-        }
-        else
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'mail')])//img" );
-        }
-        assertAddEditMailNotifierPage();
-        assertFieldValue( oldMail, "address" );
-        setFieldValue( "address", newMail );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Address is invalid" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void addIrcNotifier( String projectGroupName, String projectName, String host, String channel,
-                                boolean isValid )
-        throws Exception
-    {
-        selectValue( "//select", "IRC" );
-        clickButtonWithValue( "Submit" );
-        assertAddEditIrcNotifierPage();
-        setFieldValue( "host", host );
-        setFieldValue( "channel", channel );
-
-        clickButtonWithValue( "Save" );
-        if ( !isValid )
-        {
-            assertTextPresent( "Host is required" );
-            assertTextPresent( "Channel is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void editIrcNotifier( String projectGroupName, String projectName, String oldHost, String oldChannel,
-                                 String newHost, String newChannel, boolean isValid )
-        throws Exception
-    {
-        if ( projectName == null )
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'irc')])//img" );
-        }
-        else
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'irc')])//img" );
-        }
-        assertAddEditIrcNotifierPage();
-        assertFieldValue( oldHost, "host" );
-        assertFieldValue( oldChannel, "channel" );
-        setFieldValue( "host", newHost );
-        setFieldValue( "channel", newChannel );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Host is required" );
-            assertTextPresent( "Channel is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void addJabberNotifier( String projectGroupName, String projectName, String host, String login,
-                                   String password, String address, boolean isValid )
-        throws Exception
-    {
-        selectValue( "//select", "Jabber" );
-        clickButtonWithValue( "Submit" );
-        assertAddEditJabberPage();
-        setFieldValue( "host", host );
-        setFieldValue( "login", login );
-        setFieldValue( "password", password );
-        setFieldValue( "address", address );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Host is required" );
-            assertTextPresent( "Login is required" );
-            assertTextPresent( "Password is required" );
-            assertTextPresent( "Address is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void editJabberNotifier( String projectGroupName, String projectName, String oldHost, String oldLogin,
-                                    String oldAddress, String newHost, String newLogin, String newPassword,
-                                    String newAddress, boolean isValid )
-        throws Exception
-    {
-        if ( projectName == null )
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'jabber')])//img" );
-        }
-        else
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'jabber')])//img" );
-        }
-        assertAddEditJabberPage();
-        assertFieldValue( oldHost, "host" );
-        assertFieldValue( oldLogin, "login" );
-        assertFieldValue( oldAddress, "address" );
-        setFieldValue( "host", newHost );
-        setFieldValue( "login", newLogin );
-        setFieldValue( "password", newPassword );
-        setFieldValue( "address", newAddress );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Host is required" );
-            assertTextPresent( "Login is required" );
-            assertTextPresent( "Password is required" );
-            assertTextPresent( "Address is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void addMsnNotifier( String projectGroupName, String projectName, String login, String password,
-                                String recipientAddress, boolean isValid )
-        throws Exception
-    {
-        selectValue( "//select", "MSN" );
-        clickButtonWithValue( "Submit" );
-        assertAddEditMsnPage();
-        setFieldValue( "login", login );
-        setFieldValue( "password", password );
-        setFieldValue( "address", recipientAddress );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Login is required" );
-            assertTextPresent( "Password is required" );
-            assertTextPresent( "Address is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void editMsnNotifier( String projectGroupName, String projectName, String oldLogin, String oldAddress,
-                                 String newLogin, String newPassword, String newAddress, boolean isValid )
-        throws Exception
-    {
-        if ( projectName == null )
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'msn')])//img" );
-        }
-        else
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'msn')])//img" );
-        }
-        assertAddEditMsnPage();
-        assertFieldValue( oldLogin, "login" );
-        assertFieldValue( oldAddress, "address" );
-        setFieldValue( "login", newLogin );
-        setFieldValue( "password", newPassword );
-        setFieldValue( "address", newAddress );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Login is required" );
-            assertTextPresent( "Password is required" );
-            assertTextPresent( "Address is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void addWagonNotifierPage( String projectGroupName, String projectName, String siteUrl, String serverId,
-                                      boolean isValid )
-        throws Exception
-    {
-        selectValue( "//select", "Wagon" );
-        clickButtonWithValue( "Submit" );
-        assertAddEditWagonPage();
-        setFieldValue( "url", siteUrl );
-        setFieldValue( "id", serverId );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Destination URL is required" );
-            assertTextPresent( "Server Id is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    public void editWagonNotifier( String projectGroupName, String projectName, String oldUrl, String oldId,
-                                   String newUrl, String newId, boolean isValid )
-        throws Exception
-    {
-        if ( projectName == null )
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectGroupNotifier') and contains(@href,'wagon')])//img" );
-        }
-        else
-        {
-            clickLinkWithXPath( "(//a[contains(@href,'editProjectNotifier') and contains(@href,'wagon')])//img" );
-        }
-        assertAddEditWagonPage();
-        assertFieldValue( oldUrl, "url" );
-        // TODO: BUG: ServerId is not loader
-        // assertFieldValue( oldId, "id" );
-        setFieldValue( "url", newUrl );
-        setFieldValue( "id", newId );
-        clickButtonWithValue( "Save" );
-
-        if ( !isValid )
-        {
-            assertTextPresent( "Destination URL is required" );
-            assertTextPresent( "Server Id is required" );
-        }
-        else if ( projectName != null )
-        {
-            assertProjectInformationPage();
-        }
-        else
-        {
-            assertGroupNotifierPage( projectGroupName );
-        }
-    }
-
-    // ////////////////////////////////////
-    // General Project Pages
-    // ////////////////////////////////////
-    public void goToEditProjectPage( String projectGroupName, String projectName )
-    {
-        clickLinkWithText( "Show Project Groups" );
-        clickLinkWithText( projectGroupName );
-        clickLinkWithText( projectName );
-        clickButtonWithValue( "Edit" );
-
-        assertEditProjectPage();
-    }
-
-    public void assertEditProjectPage()
-    {
-        assertTextPresent( "Update Continuum Project" );
-        assertTextPresent( "Project Name*:" );
-        assertElementPresent( "name" );
-        assertTextPresent( "Version*:" );
-        assertElementPresent( "version" );
-        assertTextPresent( "SCM Url*:" );
-        assertElementPresent( "scmUrl" );
-        assertTextPresent( "Use SCM Credentials Cache, if available" );
-        assertElementPresent( "scmUseCache" );
-        assertTextPresent( "SCM Username:" );
-        assertElementPresent( "scmUsername" );
-        assertTextPresent( "SCM Password:" );
-        assertElementPresent( "scmPassword" );
-        assertTextPresent( "SCM Branch/Tag:" );
-        assertElementPresent( "scmTag" );
-    }
-
-    public void goToAddNotifierPage( String projectGroupName, String projectName )
-    {
-        clickLinkWithText( "Show Project Groups" );
-        clickLinkWithText( projectGroupName );
-        clickLinkWithText( projectName );
-        geSelenium().click( "addProjectNotifier" );
-        clickLinkWithXPath( "//input[@id='addProjectNotifier_0']" );
-
-        assertNotifierPage();
-    }
-
-    public void assertNotifierPage()
-    {
-        assertPage( "Continuum - Add Notifier" );
-        assertTextPresent( "Add Notifier" );
-        assertTextPresent( "Type:" );
-        assertElementPresent( "notifierType" );
-    }
-
-    public void addMailNotifier( String projectGroupName, String projectName, String email, boolean success,
-                                 boolean failure, boolean error, boolean warning )
-    {
-        goToAddNotifierPage( projectGroupName, projectName );
-        clickButtonWithValue( "Submit" );
-
-        // Enter values into Add Notifier fields, and submit
-        setFieldValue( "address", email );
-        if ( success )
-        {
-            checkField( "sendOnSuccess" );
-        }
-        if ( failure )
-        {
-            checkField( "sendOnFailure" );
-        }
-        if ( error )
-        {
-            checkField( "sendOnError" );
-        }
-        if ( warning )
-        {
-            checkField( "sendOnWarning" );
-        }
-
-        submit();
-        assertProjectInformationPage();
-    }
-
-    public void goToProjectInformationPage( String projectGroupName, String projectName )
-    {
-        clickLinkWithText( "Show Project Groups" );
-        clickLinkWithText( projectGroupName );
-        clickLinkWithText( projectName );
-
-        assertProjectInformationPage();
-    }
-
-    public void assertProjectInformationPage()
-    {
-        assertTextPresent( "Project Group Summary" );
-        assertTextPresent( "Project Information" );
-        assertTextPresent( "Builds" );
-        assertTextPresent( "Working Copy" );
-        assertTextPresent( "Build Definitions" );
-        assertTextPresent( "Notifiers" );
-        assertTextPresent( "Dependencies" );
-        assertTextPresent( "Developers" );
-    }
-
-    public void moveProjectToProjectGroup( String name, String groupId, String description, String newProjectGroup )
-        throws Exception
-    {
-        showProjectGroup( name, groupId, description );
-        clickButtonWithValue( "Edit" );
-
-        assertTextPresent( "Move to Group" );
-        selectValue( "//select[contains(@name,'project')]", newProjectGroup );
-        clickButtonWithValue( "Save" );
-    }
-
-    // ////////////////////////////////////
-    // Maven 2.0.x Project
-    // ////////////////////////////////////
-    public void goToAddMavenTwoProjectPage()
-    {
-        clickLinkWithText( "Maven 2.0.x Project" );
-
-        assertAddMavenTwoProjectPage();
-    }
-
-    public void assertAddMavenTwoProjectPage()
-    {
-        assertTextPresent( "POM Url" );
-        assertElementPresent( "m2PomUrl" );
-        assertTextPresent( "Username" );
-        assertElementPresent( "scmUsername" );
-        assertTextPresent( "Password" );
-        assertElementPresent( "scmPassword" );
-        assertTextPresent( "Upload POM" );
-        assertElementPresent( "m2PomFile" );
-        assertTextPresent( "Project Group" );
-        assertElementPresent( "selectedProjectGroup" );
-    }
-
-    public void addMavenTwoProject( String pomUrl, String username, String password, String projectGroup,
-                                    boolean success )
-        throws Exception
-    {
-        goToAddMavenTwoProjectPage();
-
-        // Enter values into Add Maven Two Project fields, and submit
-        setFieldValue( "m2PomUrl", pomUrl );
-        setFieldValue( "scmUsername", username );
-        setFieldValue( "scmPassword", password );
-
-        if ( projectGroup != null )
-        {
-            selectValue( "addMavenTwoProject_selectedProjectGroup", projectGroup );
-        }
-        submit();
-        String ident;
-        if ( success )
-        {
-            ident = "projectGroupSummary";
-        }
-        else
-        {
-            ident = "addMavenTwoProject";
-        }
-        // TODO: Improve the condition
-        String condition = "selenium.browserbot.getCurrentWindow().document.getElementById('" + ident + "')";
-        // 'Continuum - Project Group'
-        geSelenium().waitForCondition( condition, maxWaitTimeInMs );
-    }
-
-    /**
-     * submit the page
-     *
-     * @param m2PomUrl
-     * @param validPom
-     */
-    public void submitAddMavenTwoProjectPage( String m2PomUrl, boolean validPom )
-        throws Exception
-    {
-        addMavenTwoProject( m2PomUrl, "", "", null, validPom );
-
-        if ( validPom )
-        {
-            assertTextPresent( "Default Project Group" );
-            // TODO: Add more tests
-        }
-    }
-
-    // ////////////////////////////////////
-    // Maven 1.x Project
-    // ////////////////////////////////////
-    public void goToAddMavenOneProjectPage()
-    {
-        clickLinkWithText( "Maven 1.x Project" );
-
-        assertAddMavenOneProjectPage();
-    }
-
-    public void assertAddMavenOneProjectPage()
-    {
-        assertTextPresent( "POM Url" );
-        assertElementPresent( "m1PomUrl" );
-        assertTextPresent( "Username" );
-        assertElementPresent( "scmUsername" );
-        assertTextPresent( "Password" );
-        assertElementPresent( "scmPassword" );
-        assertTextPresent( "Upload POM" );
-        assertElementPresent( "m1PomFile" );
-        assertTextPresent( "Project Group" );
-        assertElementPresent( "selectedProjectGroup" );
-    }
-
-    public void addMavenOneProject( String pomUrl, String username, String password, String projectGroup,
-                                    boolean validProject )
-    {
-        goToAddMavenOneProjectPage();
-
-        // Enter values into Add Maven One Project fields, and submit
-        setFieldValue( "m1PomUrl", pomUrl );
-        setFieldValue( "scmUsername", username );
-        setFieldValue( "scmPassword", password );
-
-        if ( projectGroup != null )
-        {
-            selectValue( "addMavenOneProject_selectedProjectGroup", projectGroup );
-        }
-
-        submit();
-
-        geSelenium().waitForCondition( "'' == document.title", maxWaitTimeInMs );
-    }
-}

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java Tue Nov 10 05:38:01 2009
@@ -1,316 +0,0 @@
-package org.apache.continuum.web.test;
-
-/*
- * 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 java.util.Iterator;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Map.Entry;
-
-import org.testng.Assert;
-
-import com.thoughtworks.selenium.DefaultSelenium;
-import com.thoughtworks.selenium.Selenium;
-
-/**
- * Based on AbstractSeleniumTestCase of Emmanuel Venisse test.
- *
- * @author JosÃ© Morales MartÃ­nez
- * @version $Id$
- */
-public abstract class AbstractSeleniumTest
-{
-    public static String baseUrl;
-
-    public static String maxWaitTimeInMs;
-
-    private static ThreadLocal&lt;Selenium&gt; selenium;
-
-    public static Properties p;
-
-    /**
-     * Initialize selenium an others properties. This method is called from BeforeSuite method of sub-class.
-     */
-    public void open(int number)
-        throws Exception
-    {
-        p = new Properties();
-        p.load( this.getClass().getClassLoader().getResourceAsStream( "testng.properties" ) );
-
-        baseUrl = p.getProperty( "BASE_URL" );
-        maxWaitTimeInMs = p.getProperty( "MAX_WAIT_TIME_IN_MS" );
-
-        String seleniumHost = p.getProperty( "SELENIUM_HOST" );
-        int seleniumPort = Integer.parseInt( ( p.getProperty( "SELENIUM_PORT" ) ) );
-        String seleniumBrowser = p.getProperty( "SELENIUM_BROWSER" );
-        final Selenium s = new DefaultSelenium( seleniumHost, seleniumPort, seleniumBrowser, baseUrl );
-        selenium = new ThreadLocal&lt;Selenium&gt;() {
-            protected Selenium initialValue() {
-                return s;
-            }
-        };
-        geSelenium().start();
-    }
-
-    protected static Selenium geSelenium()
-    {
-        return selenium.get();
-    }
-
-    /**
-     * Close selenium session. Called from AfterSuite method of sub-class
-     */
-    public void close()
-        throws Exception
-    {
-        geSelenium().stop();
-    }
-
-    // *******************************************************
-    // Auxiliar methods. This method help us and simplify test.
-    // *******************************************************
-
-    public void assertFieldValue( String fieldValue, String fieldName )
-    {
-        assertElementPresent( fieldName );
-        Assert.assertEquals( fieldValue, geSelenium().getValue( fieldName ) );
-    }
-
-    public void assertPage( String title )
-    {
-        Assert.assertEquals( getTitle(), title );
-    }
-
-    public String getTitle()
-    {
-        return geSelenium().getTitle();
-    }
-
-    public String getHtmlContent()
-    {
-        return geSelenium().getHtmlSource();
-    }
-
-    public void assertTextPresent( String text )
-    {
-        Assert.assertTrue( geSelenium().isTextPresent( text ), "'" + text + "' isn't present." );
-    }
-
-    public void assertTextNotPresent( String text )
-    {
-        Assert.assertFalse( geSelenium().isTextPresent( text ), "'" + text + "' is present." );
-    }
-
-    public void assertElementPresent( String elementLocator )
-    {
-        Assert.assertTrue( isElementPresent( elementLocator ), "'" + elementLocator + "' isn't present." );
-    }
-
-    public void assertElementNotPresent( String elementLocator )
-    {
-        Assert.assertFalse( isElementPresent( elementLocator ), "'" + elementLocator + "' is present." );
-    }
-
-    public void assertLinkPresent( String text )
-    {
-        Assert.assertTrue( isElementPresent( "link=" + text ), "The link '" + text + "' isn't present." );
-    }
-
-    public void assertLinkNotPresent( String text )
-    {
-        Assert.assertFalse( isElementPresent( "link=" + text ), "The link '" + text + "' is present." );
-    }
-
-    public void assertImgWithAlt( String alt )
-    {
-        assertElementPresent( "//img[@alt='" + alt + "']" );
-    }
-
-    public void assertImgWithAltAtRowCol( boolean isALink, String alt, int row, int column )
-    {
-        String locator = "//tr[" + row + "]/td[" + column + "]/";
-        locator += isALink ? "a/" : "";
-        locator += "img[@alt='" + alt + "']";
-
-        assertElementPresent( locator );
-    }
-
-    public void assertCellValueFromTable( String expected, String tableElement, int row, int column )
-    {
-        Assert.assertEquals( expected, getCellValueFromTable( tableElement, row, column ) );
-    }
-
-    public boolean isTextPresent( String text )
-    {
-        return geSelenium().isTextPresent( text );
-    }
-
-    public boolean isLinkPresent( String text )
-    {
-        return isElementPresent( "link=" + text );
-    }
-
-    public boolean isElementPresent( String locator )
-    {
-        return geSelenium().isElementPresent( locator );
-    }
-
-    public void waitPage()
-    {
-        geSelenium().waitForPageToLoad( maxWaitTimeInMs );
-    }
-
-    public String getFieldValue( String fieldName )
-    {
-        return geSelenium().getValue( fieldName );
-    }
-
-    public String getCellValueFromTable( String tableElement, int row, int column )
-    {
-        return geSelenium().getTable( tableElement + "." + row + "." + column );
-    }
-
-    public void selectValue( String locator, String value )
-    {
-        geSelenium().select( locator, "label=" + value );
-    }
-
-    public void submit()
-    {
-        clickLinkWithXPath( "//input[@type='submit']" );
-    }
-
-    public void assertButtonWithValuePresent( String text )
-    {
-        Assert.assertTrue( isButtonWithValuePresent( text ), "'" + text + "' button isn't present" );
-    }
-
-    public void assertButtonWithValueNotPresent( String text )
-    {
-        Assert.assertFalse( isButtonWithValuePresent( text ), "'" + text + "' button is present" );
-    }
-
-    public boolean isButtonWithValuePresent( String text )
-    {
-        return isElementPresent( "//button[@value='" + text + "']" )
-            || isElementPresent( "//input[@value='" + text + "']" );
-    }
-
-    public void clickButtonWithValue( String text )
-    {
-        clickButtonWithValue( text, true );
-    }
-
-    public void clickButtonWithValue( String text, boolean wait )
-    {
-        assertButtonWithValuePresent( text );
-
-        if ( isElementPresent( "//button[@value='" + text + "']" ) )
-        {
-            clickLinkWithXPath( "//button[@value='" + text + "']", wait );
-        }
-        else
-        {
-            clickLinkWithXPath( "//input[@value='" + text + "']", wait );
-        }
-    }
-
-    public void clickSubmitWithLocator( String locator )
-    {
-        clickLinkWithLocator( locator );
-    }
-
-    public void clickSubmitWithLocator( String locator, boolean wait )
-    {
-        clickLinkWithLocator( locator, wait );
-    }
-
-    public void clickImgWithAlt( String alt )
-    {
-        clickLinkWithLocator( "//img[@alt='" + alt + "']" );
-    }
-
-    public void clickLinkWithText( String text )
-    {
-        clickLinkWithText( text, true );
-    }
-
-    public void clickLinkWithText( String text, boolean wait )
-    {
-        clickLinkWithLocator( "link=" + text, wait );
-    }
-
-    public void clickLinkWithXPath( String xpath )
-    {
-        clickLinkWithXPath( xpath, true );
-    }
-
-    public void clickLinkWithXPath( String xpath, boolean wait )
-    {
-        clickLinkWithLocator( "xpath=" + xpath, wait );
-    }
-
-    public void clickLinkWithLocator( String locator )
-    {
-        clickLinkWithLocator( locator, true );
-    }
-
-    public void clickLinkWithLocator( String locator, boolean wait )
-    {
-        assertElementPresent( locator );
-        geSelenium().click( locator );
-        if ( wait )
-        {
-            waitPage();
-        }
-    }
-
-    public void setFieldValues( Map&lt;String, String&gt; fieldMap )
-    {
-        Map.Entry&lt;String, String&gt; entry;
-
-        for ( Iterator&lt;Entry&lt;String, String&gt;&gt; entries = fieldMap.entrySet().iterator(); entries.hasNext(); )
-        {
-            entry = entries.next();
-
-            geSelenium().type( entry.getKey(), entry.getValue() );
-        }
-    }
-
-    public void setFieldValue( String fieldName, String value )
-    {
-        geSelenium().type( fieldName, value );
-    }
-
-    public void checkField( String locator )
-    {
-        geSelenium().check( locator );
-    }
-
-    public void uncheckField( String locator )
-    {
-        geSelenium().uncheck( locator );
-    }
-
-    public boolean isChecked( String locator )
-    {
-        return geSelenium().isChecked( locator );
-    }
-}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,81 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractContinuumTest;
+import org.testng.annotations.Test;
+
+/**
+ * Based on AddAntProjectTestCase of Emmanuel Venisse.
+ *
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "antProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class AntProjectTest
+    extends AbstractContinuumTest
+{
+    @Test( dependsOnMethods = { "testAddProjectGroup" } )
+    public void testAddAntProject()
+        throws Exception
+    {
+        String ANT_NAME = getProperty( "ANT_NAME" );
+        String ANT_DESCRIPTION = getProperty( "ANT_DESCRIPTION" );
+        String ANT_VERSION = getProperty( "ANT_VERSION" );
+        String ANT_TAG = getProperty( "ANT_TAG" );
+        String ANT_SCM_URL = getProperty( "ANT_SCM_URL" );
+        String ANT_SCM_USERNAME = getProperty( "ANT_SCM_USERNAME" );
+        String ANT_SCM_PASSWORD = getProperty( "ANT_SCM_PASSWORD" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        goToAddAntProjectPage();
+        addProject( ANT_NAME, ANT_DESCRIPTION, ANT_VERSION, ANT_SCM_URL, ANT_SCM_USERNAME, ANT_SCM_PASSWORD, ANT_TAG,
+                    false, TEST_PROJ_GRP_NAME, null, true );
+        assertProjectGroupSummaryPage( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+    }
+
+    public void testSubmitEmptyForm()
+    {
+        goToAddAntProjectPage();
+        submit();
+        assertAddProjectPage( "ant" );
+        assertTextPresent( "Name is required and cannot contain null or spaces only" );
+        assertTextPresent( "Version is required and cannot contain null or spaces only" );
+        assertTextPresent( "SCM Url is required and cannot contain null or spaces only" );
+    }
+
+    @Test( dependsOnMethods = { "testAddAntProject" } )
+    public void testAddDupliedAntProject()
+        throws Exception
+    {
+        String ANT_NAME = getProperty( "ANT_NAME" );
+        String ANT_DESCRIPTION = getProperty( "ANT_DESCRIPTION" );
+        String ANT_VERSION = getProperty( "ANT_VERSION" );
+        String ANT_TAG = getProperty( "ANT_TAG" );
+        String ANT_SCM_URL = getProperty( "ANT_SCM_URL" );
+        String ANT_SCM_USERNAME = getProperty( "ANT_SCM_USERNAME" );
+        String ANT_SCM_PASSWORD = getProperty( "ANT_SCM_PASSWORD" );
+        goToAddAntProjectPage();
+        addProject( ANT_NAME, ANT_DESCRIPTION, ANT_VERSION, ANT_SCM_URL, ANT_SCM_USERNAME, ANT_SCM_PASSWORD, ANT_TAG,
+                    false, null, null, false );
+        assertTextPresent( "Project name already exist" );
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,165 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractBuildQueueTest;
+import org.testng.annotations.Test;
+import org.apache.continuum.web.test.parent.AbstractBuildAgentsTest;
+
+
+@Test( groups = { "agent" }, dependsOnMethods = { "testDeleteBuildDefinitionTemplate" } )
+public class BuildAgentsTest
+    extends AbstractBuildAgentsTest
+{
+
+    public void testAddBuildAgent()
+    {
+		String BUILD_AGENT_NAME = getProperty( "BUILD_AGENT_NAME" );
+		String BUILD_AGENT_DESCRIPTION = getProperty( "BUILD_AGENT_DESCRIPTION" );
+		String BUILD_AGENT_NAME2 = getProperty( "BUILD_AGENT_NAME2" );
+		String BUILD_AGENT_DESCRIPTION2 = getProperty( "BUILD_AGENT_DESCRIPTION2" );
+		String BUILD_AGENT_NAME3 = getProperty( "BUILD_AGENT_NAME3" );
+		String BUILD_AGENT_DESCRIPTION3 = getProperty( "BUILD_AGENT_DESCRIPTION3" );
+
+		enableDistributedBuilds();
+        goToAddBuildAgent();
+        addBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION, true );
+        goToAddBuildAgent();
+        addBuildAgent( BUILD_AGENT_NAME2, BUILD_AGENT_DESCRIPTION2, true );
+        goToAddBuildAgent();
+        addBuildAgent( BUILD_AGENT_NAME3, BUILD_AGENT_DESCRIPTION3, true );
+        disableDistributedBuilds();
+	}
+
+	@Test( dependsOnMethods = { "testEditBuildAgent" } )
+    public void testAddAnExistingBuildAgent()
+    {
+		String BUILD_AGENT_NAME = getProperty( "BUILD_AGENT_NAME" );
+		String BUILD_AGENT_DESCRIPTION = getProperty( "BUILD_AGENT_DESCRIPTION" );
+
+		enableDistributedBuilds();
+		goToAddBuildAgent();
+		addBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION, false ) ;
+        assertTextPresent( "Build agent already exists" );
+        disableDistributedBuilds();
+    }
+
+	@Test( dependsOnMethods = { "testAddBuildAgent" } )
+	public void testEditBuildAgent()
+
+    {
+		String BUILD_AGENT_NAME = getProperty( "BUILD_AGENT_NAME" );
+		String BUILD_AGENT_DESCRIPTION = getProperty( "BUILD_AGENT_DESCRIPTION" );
+		String new_agentDescription = "new_agentDescription";
+
+		enableDistributedBuilds();
+        goToEditBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION);
+		addEditBuildAgent( BUILD_AGENT_NAME, new_agentDescription );
+		goToEditBuildAgent( BUILD_AGENT_NAME, new_agentDescription);
+		addEditBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION );
+		disableDistributedBuilds();
+    }
+
+	@Test( dependsOnMethods = { "testAddAnExistingBuildAgent" } )
+    public void testDeleteBuildAgent()
+
+    {
+	    enableDistributedBuilds();
+        goToBuildAgentPage();
+        String BUILD_AGENT_NAME3 = getProperty( "BUILD_AGENT_NAME3" );
+        removeBuildAgent( BUILD_AGENT_NAME3 );
+        assertTextNotPresent( BUILD_AGENT_NAME3 );
+        disableDistributedBuilds();
+    }
+
+	@Test( dependsOnMethods = { "testDeleteBuildAgent" } )
+    public void testAddEmptyBuildAgent()
+    {
+    	String BUILD_AGENT_DESCRIPTION = getProperty( "BUILD_AGENT_DESCRIPTION" );
+
+    	enableDistributedBuilds();
+    	goToAddBuildAgent();
+		addBuildAgent( "", BUILD_AGENT_DESCRIPTION, false ) ;
+		assertTextPresent( "Build agent url is required." );
+		disableDistributedBuilds();
+    }
+
+//TESTS FOR BUILD AGENT GROUPS
+
+    @Test( dependsOnMethods = { "testAddBuildAgent" } )
+    public void testAddBuildAgentGroup()
+    throws Exception
+    {
+    	String BUILD_AGENT_GROUPNAME = getProperty( "BUILD_AGENT_GROUPNAME" );
+    	enableDistributedBuilds();
+    	goToAddBuildAgentGroup();
+		addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { "Agent_url_name", "Second_Agent" }, new String[] {}, true );
+		disableDistributedBuilds();
+	}
+
+	@Test( dependsOnMethods = { "testAddBuildAgentGroup" } )
+    public void testEditBuildAgentGroup()
+        throws Exception
+    {
+    	String BUILD_AGENT_GROUPNAME = getProperty( "BUILD_AGENT_GROUPNAME" );
+        String newName = "new_agentgroupname";
+        enableDistributedBuilds();
+        goToEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { "Agent_url_name", "Second_Agent" } );
+        addEditBuildAgentGroup( newName, new String[] {},
+                         new String[] { "Second_Agent" }, true );
+        goToEditBuildAgentGroup( newName, new String[] { "Agent_url_name" } );
+        addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { "Second_Agent" },
+                         new String[] {}, true );
+        disableDistributedBuilds();
+    }
+
+	@Test( dependsOnMethods = { "testEditBuildAgentGroup" } )
+    public void testAddAnExistingBuildAgentGroup()
+    throws Exception
+    {
+        String BUILD_AGENT_GROUPNAME = getProperty( "BUILD_AGENT_GROUPNAME" );
+
+        enableDistributedBuilds();
+    	goToAddBuildAgentGroup();
+	   	addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { "Agent_url_name", "Second_Agent" }, new String[] {}, false );
+	   	assertTextPresent( "Build agent group already exists." );
+	   	disableDistributedBuilds();
+    }
+
+    @Test( dependsOnMethods = { "testAddAnExistingBuildAgentGroup" } )
+    public void testAddEmptyBuildAgentGroupName()
+    throws Exception
+    {
+        enableDistributedBuilds();
+    	goToAddBuildAgentGroup();
+    	addEditBuildAgentGroup( "", new String[] {}, new String[] {}, false );
+		assertTextPresent( "Build agent group name required." );
+		disableDistributedBuilds();
+    }
+
+    @Test( dependsOnMethods = { "testAddEmptyBuildAgentGroupName" } )
+    public void testDeleteBuildAgentGroup()
+    {
+    	String BUILD_AGENT_GROUPNAME = getProperty( "BUILD_AGENT_GROUPNAME" );
+    	enableDistributedBuilds();
+        removeBuildAgentGroup( BUILD_AGENT_GROUPNAME );
+        disableDistributedBuilds();
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,113 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractBuildDefinitionTemplateTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "buildDefinitionTemplate" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class BuildDefinitionTemplateTest
+    extends AbstractBuildDefinitionTemplateTest
+{
+    public void testAddTemplate()
+        throws Exception
+    {
+        String TEMPLATE_NAME = getProperty( "TEMPLATE_NAME" );
+        goToAddTemplate();
+        addEditTemplate( TEMPLATE_NAME, new String[] { "Default Maven 2 Build Definition",
+            "Default Maven 1 Build Definition" }, new String[] {}, true );
+    }
+
+    public void testAddInvalidTemplate()
+        throws Exception
+    {
+        goToAddTemplate();
+        addEditTemplate( "", new String[] {}, new String[] {}, false );
+        assertTextPresent( "Name is required" );
+    }
+
+    @Test( dependsOnMethods = { "testAddTemplate" } )
+    public void testEditTemplate()
+        throws Exception
+    {
+        String TEMPLATE_NAME = getProperty( "TEMPLATE_NAME" );
+        String newName = "new_name";
+        goToEditTemplate( TEMPLATE_NAME, new String[] { "Default Maven 2 Build Definition",
+            "Default Maven 1 Build Definition" } );
+        addEditTemplate( newName, new String[] { "Default Shell Build Definition" },
+                         new String[] { "Default Maven 2 Build Definition" }, true );
+        goToEditTemplate( newName,
+                          new String[] { "Default Maven 1 Build Definition", "Default Shell Build Definition" } );
+        addEditTemplate( TEMPLATE_NAME, new String[] { "Default Maven 2 Build Definition" },
+                         new String[] { "Default Shell Build Definition" }, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditTemplate" } )
+    public void testDeleteTemplate()
+    {
+        String TEMPLATE_NAME = getProperty( "TEMPLATE_NAME" );
+        removeTemplate( TEMPLATE_NAME );
+    }
+
+    public void testAddBuildDefinitionTemplate()
+        throws Exception
+    {
+        String TEMPLATE_BUILD_POM_NAME = getProperty( "TEMPLATE_BUILD_POM_NAME" );
+        String TEMPLATE_BUILD_GOALS = getProperty( "TEMPLATE_BUILD_GOALS" );
+        String TEMPLATE_BUILD_ARGUMENTS = getProperty( "TEMPLATE_BUILD_ARGUMENTS" );
+        String TEMPLATE_BUILD_DESCRIPTION = getProperty( "TEMPLATE_BUILD_DESCRIPTION" );
+        goToAddBuildDefinitionTemplate();
+        addEditBuildDefinitionTemplate( TEMPLATE_BUILD_POM_NAME, TEMPLATE_BUILD_GOALS, TEMPLATE_BUILD_ARGUMENTS,
+                                        TEMPLATE_BUILD_DESCRIPTION, true, true, true, true );
+    }
+
+    public void testAddInvalidBuildDefinitionTemplate()
+        throws Exception
+    {
+        goToAddBuildDefinitionTemplate();
+        addEditBuildDefinitionTemplate( "", "", "", "", true, true, true, false );
+        assertTextPresent( "BuildFile is required" );
+        assertTextPresent( "Description is required" );
+    }
+
+    @Test( dependsOnMethods = { "testAddBuildDefinitionTemplate" } )
+    public void testEditBuildDefinitionTemplate()
+        throws Exception
+    {
+        String TEMPLATE_BUILD_POM_NAME = getProperty( "TEMPLATE_BUILD_POM_NAME" );
+        String TEMPLATE_BUILD_GOALS = getProperty( "TEMPLATE_BUILD_GOALS" );
+        String TEMPLATE_BUILD_ARGUMENTS = getProperty( "TEMPLATE_BUILD_ARGUMENTS" );
+        String TEMPLATE_BUILD_DESCRIPTION = getProperty( "TEMPLATE_BUILD_DESCRIPTION" );
+        goToEditBuildDefinitionTemplate( TEMPLATE_BUILD_DESCRIPTION );
+        addEditBuildDefinitionTemplate( TEMPLATE_BUILD_POM_NAME, TEMPLATE_BUILD_GOALS, TEMPLATE_BUILD_ARGUMENTS,
+                                        TEMPLATE_BUILD_DESCRIPTION, false, false, false, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditBuildDefinitionTemplate" } )
+    public void testDeleteBuildDefinitionTemplate()
+    {
+        String TEMPLATE_BUILD_DESCRIPTION = getProperty( "TEMPLATE_BUILD_DESCRIPTION" );
+        removeBuildDefinitionTemplate( TEMPLATE_BUILD_DESCRIPTION );
+    }
+}

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java Tue Nov 10 05:38:01 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
 /**
@@ -32,9 +33,9 @@
     public void testDefaultGroupBuildDefinition()
         throws Exception
     {
-        String DEFAULT_PROJ_GRP_NAME = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
-        String DEFAULT_PROJ_GRP_ID = p.getProperty( "DEFAULT_PROJ_GRP_ID" );
-        String DEFAULT_PROJ_GRP_DESCRIPTION = p.getProperty( "DEFAULT_PROJ_GRP_DESCRIPTION" );
+        String DEFAULT_PROJ_GRP_NAME = getProperty( "DEFAULT_PROJ_GRP_NAME" );
+        String DEFAULT_PROJ_GRP_ID = getProperty( "DEFAULT_PROJ_GRP_ID" );
+        String DEFAULT_PROJ_GRP_DESCRIPTION = getProperty( "DEFAULT_PROJ_GRP_DESCRIPTION" );
 
         goToGroupBuildDefinitionPage( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
         String tableElement = "ec_table";
@@ -69,9 +70,9 @@
     public void testAddInvalidGroupBuildDefinition()
         throws Exception
     {
-        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
-        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
-        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+        String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
         goToGroupBuildDefinitionPage( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION );
         clickButtonWithValue( "Add" );
         setFieldValue( "buildFile", "" );
@@ -83,25 +84,25 @@
     public void testBuildFromGroupBuildDefinition()
         throws Exception
     {
-        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
-        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
-        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+        String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
         goToGroupBuildDefinitionPage( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION );
         clickImgWithAlt( "Build" );
-        assertProjectGroupsSummaryPage();
+        assertProjectGroupSummaryPage( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION );
     }
 
     @Test( dependsOnMethods = { "testAddProjectGroup2" } )
     public void testAddDefautltGroupBuildDefinition()
         throws Exception
     {
-        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
-        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
-        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
-        String BUILD_POM_NAME = p.getProperty( "BUILD_POM_NAME" );
-        String BUILD_GOALS = p.getProperty( "BUILD_GOALS" );
-        String BUILD_ARGUMENTS = p.getProperty( "BUILD_ARGUMENTS" );
-        String BUILD_DESCRIPTION = p.getProperty( "BUILD_DESCRIPTION" );
+        String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+        String BUILD_POM_NAME = getProperty( "BUILD_POM_NAME" );
+        String BUILD_GOALS = getProperty( "BUILD_GOALS" );
+        String BUILD_ARGUMENTS = getProperty( "BUILD_ARGUMENTS" );
+        String BUILD_DESCRIPTION = getProperty( "BUILD_DESCRIPTION" );
         goToGroupBuildDefinitionPage( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION );
         clickButtonWithValue( "Add" );
         addEditGroupBuildDefinition( TEST2_PROJ_GRP_NAME, BUILD_POM_NAME, BUILD_GOALS, BUILD_ARGUMENTS,
@@ -112,13 +113,13 @@
     public void testAddNotDefautltGroupBuildDefinition()
         throws Exception
     {
-        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
-        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
-        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
-        String BUILD_POM_NAME = p.getProperty( "BUILD_POM_NAME" );
-        String BUILD_GOALS = p.getProperty( "BUILD_GOALS" );
-        String BUILD_ARGUMENTS = p.getProperty( "BUILD_ARGUMENTS" );
-        String BUILD_DESCRIPTION = p.getProperty( "BUILD_DESCRIPTION" );
+        String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+        String BUILD_POM_NAME = getProperty( "BUILD_POM_NAME" );
+        String BUILD_GOALS = getProperty( "BUILD_GOALS" );
+        String BUILD_ARGUMENTS = getProperty( "BUILD_ARGUMENTS" );
+        String BUILD_DESCRIPTION = getProperty( "BUILD_DESCRIPTION" );
         goToGroupBuildDefinitionPage( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION );
         clickButtonWithValue( "Add" );
         addEditGroupBuildDefinition( TEST2_PROJ_GRP_NAME, BUILD_POM_NAME, BUILD_GOALS, BUILD_ARGUMENTS,
@@ -129,13 +130,13 @@
     public void testEditGroupBuildDefinition()
         throws Exception
     {
-        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
-        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
-        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
-        String BUILD_POM_NAME = p.getProperty( "BUILD_POM_NAME" );
-        String BUILD_GOALS = p.getProperty( "BUILD_GOALS" );
-        String BUILD_ARGUMENTS = p.getProperty( "BUILD_ARGUMENTS" );
-        String BUILD_DESCRIPTION = p.getProperty( "BUILD_DESCRIPTION" );
+        String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+        String BUILD_POM_NAME = getProperty( "BUILD_POM_NAME" );
+        String BUILD_GOALS = getProperty( "BUILD_GOALS" );
+        String BUILD_ARGUMENTS = getProperty( "BUILD_ARGUMENTS" );
+        String BUILD_DESCRIPTION = getProperty( "BUILD_DESCRIPTION" );
         String newPom = "newpom.xml";
         String newGoals = "new goals";
         String newArguments = "new arguments";
@@ -153,11 +154,11 @@
     public void testDeleteGroupBuildDefinition()
         throws Exception
     {
-        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
-        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
-        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
-        String BUILD_GOALS = p.getProperty( "BUILD_GOALS" );
-        String BUILD_DESCRIPTION = p.getProperty( "BUILD_DESCRIPTION" );
+        String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+        String BUILD_GOALS = getProperty( "BUILD_GOALS" );
+        String BUILD_DESCRIPTION = getProperty( "BUILD_DESCRIPTION" );
         goToGroupBuildDefinitionPage( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION );
         // Click in Delete Image
         clickLinkWithXPath( "(//a[contains(@href,'removeGroupBuildDefinition')])//img" );
@@ -166,16 +167,16 @@
         assertGroupBuildDefinitionPage( TEST2_PROJ_GRP_NAME );
     }
 
-    @Test( dependsOnMethods = { "testAddMavenTwoProjectFromRemoteSourceToNonDefaultProjectGroup" } )
+    @Test( dependsOnMethods = { "testMoveProject" } )
     public void testAddNotDefautltProjectBuildDefinition()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String BUILD_POM_NAME = p.getProperty( "BUILD_POM_NAME" );
-        String BUILD_GOALS = p.getProperty( "BUILD_GOALS" );
-        String BUILD_ARGUMENTS = p.getProperty( "BUILD_ARGUMENTS" );
-        String BUILD_DESCRIPTION = p.getProperty( "BUILD_DESCRIPTION" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String BUILD_POM_NAME = getProperty( "BUILD_POM_NAME" );
+        String BUILD_GOALS = getProperty( "BUILD_GOALS" );
+        String BUILD_ARGUMENTS = getProperty( "BUILD_ARGUMENTS" );
+        String BUILD_DESCRIPTION = getProperty( "BUILD_DESCRIPTION" );
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         clickLinkWithXPath( "//input[contains(@id,'buildDefinition')]" );
         addEditGroupBuildDefinition( null, BUILD_POM_NAME, BUILD_GOALS, BUILD_ARGUMENTS, BUILD_DESCRIPTION, false,
@@ -186,10 +187,10 @@
     public void testDeleteProjectBuildDefinition()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String BUILD_GOALS = p.getProperty( "BUILD_GOALS" );
-        String BUILD_DESCRIPTION = p.getProperty( "BUILD_DESCRIPTION" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String BUILD_GOALS = getProperty( "BUILD_GOALS" );
+        String BUILD_DESCRIPTION = getProperty( "BUILD_DESCRIPTION" );
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         // Click in Delete Image
         clickLinkWithXPath( "(//a[contains(@href,'removeProjectBuildDefinition')])//img" );

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,84 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractBuildEnvironmentTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "buildEnvironment" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class BuildEnvironmentTest
+    extends AbstractBuildEnvironmentTest
+{
+    public void testAddBuildEnvironment()
+    {
+        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" );
+        goToAddBuildEnvironment();
+        addBuildEnvironment( BUIL_ENV_NAME, new String[] {}, true );
+    }
+
+    public void testAddInvalidBuildEnvironment()
+    {
+        goToAddBuildEnvironment();
+        addBuildEnvironment( "", new String[] {}, false );
+        assertTextPresent( "You must define a name" );
+    }
+
+    @Test( dependsOnMethods = { "testAddBuildEnvironment" } )
+    public void testEditInvalidBuildEnvironment()
+    {
+        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" );
+        goToEditBuildEnvironment( BUIL_ENV_NAME );
+        editBuildEnvironment( "", new String[] {}, false );
+        assertTextPresent( "You must define a name" );
+    }
+
+    @Test( dependsOnMethods = { "testAddBuildEnvironment" } )
+    public void testAddDuplicatedBuildEnvironment()
+    {
+        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" );
+        goToAddBuildEnvironment();
+        addBuildEnvironment( BUIL_ENV_NAME, new String[] {}, false );
+        assertTextPresent( "A Build Environment with the same name already exists" );
+    }
+
+    @Test( dependsOnMethods = { "testAddBuildEnvironment" } )
+    public void testEditBuildEnvironment()
+    {
+        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" );
+        String newName = "new_name";
+        goToEditBuildEnvironment( BUIL_ENV_NAME );
+        editBuildEnvironment( newName, new String[] {}, true );
+        // TODO: ADD INSTALLATIONS TO ENVIROTMENT
+        goToEditBuildEnvironment( newName );
+        editBuildEnvironment( BUIL_ENV_NAME, new String[] {}, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditInvalidBuildEnvironment", "testEditBuildEnvironment",
+        "testAddDuplicatedBuildEnvironment", "testEditInvalidBuildEnvironment" } )
+    public void testDeleteBuildEnvironment()
+    {
+        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" );
+        removeBuildEnvironment( BUIL_ENV_NAME );
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,87 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractConfigurationTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "configuration" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class ConfigurationTest
+    extends AbstractConfigurationTest
+{
+    private String WORKING_DIRECTORY;
+
+    private String BASE_URL;
+
+    private String BUILD_OUTPUT_DIRECTORY;
+
+    private String RELEASE_OUTPUT_DIRECTORY;
+
+    private String DEPLOYMENT_REPOSITORY_DIRECTORY;
+
+    private String NUMBER_ALLOWED_PARALLEL;
+
+    public void defaultConfiguration()
+    {
+        goToConfigurationPage();
+        WORKING_DIRECTORY = getFieldValue( "workingDirectory" );
+        BASE_URL = getFieldValue( "baseUrl" );
+        BUILD_OUTPUT_DIRECTORY = getFieldValue( "buildOutputDirectory" );
+        RELEASE_OUTPUT_DIRECTORY = getFieldValue( "releaseOutputDirectory" );
+        DEPLOYMENT_REPOSITORY_DIRECTORY = getFieldValue( "deploymentRepositoryDirectory" );
+        NUMBER_ALLOWED_PARALLEL = getFieldValue( "numberOfAllowedBuildsinParallel" );
+    }
+
+    @Test( dependsOnMethods = { "defaultConfiguration" } )
+    public void editConfiguration()
+    {
+        String newWorking = "newWorking";
+        String newUrl = "http://localhost:8181";
+        String newBuildOutput = "newBuildOutput";
+        String newReleaseOutput = "newReleaseOutput";
+        String newDeployRepository = "newDeployRepository";
+        String newNumberParallel = "9";
+        goToConfigurationPage();
+        submitConfiguration( newWorking, newBuildOutput, newReleaseOutput, newDeployRepository, newUrl,
+                             newNumberParallel, true, true );
+        clickButtonWithValue( "Edit" );
+        submitConfiguration( WORKING_DIRECTORY, BUILD_OUTPUT_DIRECTORY, RELEASE_OUTPUT_DIRECTORY,
+                             DEPLOYMENT_REPOSITORY_DIRECTORY, BASE_URL, NUMBER_ALLOWED_PARALLEL, false, true );
+    }
+
+    public void setInvalidConfiguration()
+    {
+        goToConfigurationPage();
+        submitConfiguration( "", "", "", "", "", "", true, false );
+        assertTextPresent( "You must define a working directory" );
+        assertTextPresent( "You must define a build output directory" );
+        assertTextPresent( "You must define a URL" );
+    }
+
+    public void setZeroParallelBuilds()
+    {
+        setMaxBuildQueue( 0 );
+        assertTextPresent( "Number of Allowed Builds in Parallel must be greater than zero" );
+    }
+}




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834357 [6/7] - in /continuum/branches/continuum-1.3.x/continuum-webapp-test: ./ src/site/ src/site/apt/ src/test/it/org/apache/continuum/web/test/ src/test/resources/ src/test/testng/config/ src/test/testng/org/apache/continuum/web/test/ s...</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110053804.50F362388A04@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110053804-50F362388A04@eris-apache-org%3e</id>
<updated>2009-11-10T05:38:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,232 @@
+package org.apache.continuum.web.test.parent;
+
+//import org.testng.Assert;
+import org.apache.continuum.web.test.ConfigurationTest;
+
+/*
+ * 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.
+ */
+
+public abstract class AbstractBuildAgentsTest
+    extends AbstractContinuumTest
+{
+    public void enableDistributedBuilds()
+    {
+		ConfigurationTest config = new ConfigurationTest();
+	    config.goToConfigurationPage();
+        setFieldValue( "numberOfAllowedBuildsinParallel", "2" );
+        if ( !isChecked( "configuration_distributedBuildEnabled" ) )
+        {
+            checkField( "configuration_distributedBuildEnabled" );
+        }
+        clickAndWait( "configuration_" );
+        assertTextPresent( "true" );
+        assertTextPresent( "Distributed Builds" );
+        assertElementPresent( "link=Build Agents" );
+    }
+
+    public void disableDistributedBuilds()
+    {
+        ConfigurationTest config = new ConfigurationTest();
+        config.goToConfigurationPage();
+        setFieldValue( "numberOfAllowedBuildsinParallel", "2" );
+        if ( isChecked( "configuration_distributedBuildEnabled" ) )
+        {
+            uncheckField( "configuration_distributedBuildEnabled" );
+        }
+        submit();
+        assertTextPresent( "false" );
+        assertElementNotPresent( "link=Build Agents" );
+    }
+
+	public void goToBuildAgentPage()
+    {
+		clickAndWait("link=Build Agents");
+		assertPage("Continuum - Build Agents");
+	}
+
+	public void assertBuildAgentPage()
+    {
+		assertPage("Continuum - Build Agents");
+		assertTextPresent("Build Agents");
+		assertTextPresent("Build Agent Groups");
+		assertButtonWithValuePresent( "Add" );
+
+    }
+
+	public void goToAddBuildAgent()
+    {
+		goToBuildAgentPage();
+		assertBuildAgentPage();
+		clickAndWait("editBuildAgent_0"); //add button
+		assertAddEditBuildAgentPage();
+    }
+
+	public void assertAddEditBuildAgentPage()
+    {
+		assertPage( "Continuum - Add/Edit Build Agent" );
+        assertTextPresent( "Add/Edit Build Agent" );
+        assertTextPresent( "Build Agent URL*:" );
+		assertTextPresent( "Description:" );
+		assertTextPresent( "Enabled" );
+        assertElementPresent( "saveBuildAgent_buildAgent_url" );
+		assertElementPresent( "saveBuildAgent_buildAgent_description");
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+	public void removeBuildAgent( String agentName )
+	{
+        clickLinkWithXPath( "(//a[contains(@href,'deleteBuildAgent.action') and contains(@href, '" + agentName + "')])//img" );
+		assertPage("Continuum - Delete Build Agent");
+        assertTextPresent( "Delete Build Agent" );
+        assertTextPresent( "Are you sure you want to delete build agent " + agentName + " ?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertBuildAgentPage();
+    }
+
+	public void addBuildAgent( String agentURL, String description, boolean success )
+	{
+		setFieldValue( "saveBuildAgent_buildAgent_url", agentURL );
+	    setFieldValue("saveBuildAgent_buildAgent_description", description );
+	    checkField("saveBuildAgent_buildAgent_enabled");
+		submit();
+	    if ( success )
+	    {
+	        assertBuildAgentPage();
+	        assertElementPresent( "link=" + agentURL );
+
+	    }
+	    else
+	    {
+	        assertAddEditBuildAgentPage();
+	    }
+
+	}
+
+	public void goToEditBuildAgent( String name, String description )
+	{
+	   goToBuildAgentPage();
+	   clickImgWithAlt( "Edit" );
+	   assertAddEditBuildAgentPage();
+	   assertFieldValue( name, "saveBuildAgent_buildAgent_url" );
+	   assertFieldValue( description, "saveBuildAgent_buildAgent_description" );
+
+	}
+
+	public void addEditBuildAgent( String agentName, String newDesc )
+	{
+		assertFieldValue( agentName, "saveBuildAgent_buildAgent_url" );
+		setFieldValue( "saveBuildAgent_buildAgent_description", newDesc );
+		submit();
+		assertBuildAgentPage();
+		assertTextPresent( newDesc );
+
+	}
+
+
+	public void goToAddBuildAgentGroup()
+    {
+		goToBuildAgentPage();
+		clickAndWait("editBuildAgentGroup_0"); //add button
+        String[] options =
+            new String[] { "--- Available Build Agents ---", "Agent_url_name", "Second_Agent" };
+        assertAddEditBuildAgentGroupPage( options, null );
+    }
+
+
+	public void addEditBuildAgentGroup( String name, String[] addBuildAgents, String[] removeBuildAgents,
+            boolean success ) throws Exception
+	{
+		setFieldValue( "saveBuildAgentGroup_buildAgentGroup_name", name );
+		if ( addBuildAgents != null &amp;&amp; addBuildAgents.length &gt; 0 )
+		{
+			for ( String ba : addBuildAgents )
+			{
+				selectValue( "buildAgentIds", ba );
+				clickButtonWithValue( "-&gt;", false );
+			}
+		}
+		if ( removeBuildAgents != null &amp;&amp; removeBuildAgents.length &gt; 0 )
+		{
+			for ( String ba : removeBuildAgents )
+			{
+				selectValue( "selectedBuildAgentIds", ba );
+				clickButtonWithValue( "&lt;-", false );
+			}
+		}
+		submit();
+		if ( success )
+		{
+			assertBuildAgentPage();
+		}
+		else
+		{
+			assertAddEditBuildAgentGroupPage( null, null );
+		}
+
+
+	}
+
+	public void assertAddEditBuildAgentGroupPage( String[] availableBuildAgents, String[] usedBuildAgents )
+    {
+		assertPage( "Continuum - Add/Edit Build Agent Group" );
+        assertTextPresent( "Add/Edit Build Agent Group" );
+        assertTextPresent( "Name*:" );
+		assertTextPresent( "Configure the used Build Agents:" );
+		assertElementPresent( "buildAgentGroup.name" );
+		if ( availableBuildAgents != null &amp;&amp; availableBuildAgents.length &gt; 0 )
+        {
+            assertOptionPresent( "buildAgentIds", availableBuildAgents );
+        }
+        if ( usedBuildAgents != null &amp;&amp; usedBuildAgents.length &gt; 0 )
+        {
+            assertOptionPresent( "selectedBuildAgentIds", usedBuildAgents );
+        }
+
+		assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+	public void goToEditBuildAgentGroup( String name, String[] buildAgents )
+    {
+		goToBuildAgentPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertAddEditBuildAgentGroupPage( null, buildAgents );
+        assertFieldValue( name, "buildAgentGroup.name" );
+    }
+
+
+	public void removeBuildAgentGroup( String name )
+	{
+		goToBuildAgentPage();
+		clickLinkWithXPath( "(//a[contains(@href,'deleteBuildAgentGroup.action') and contains(@href, '" + name + "')])//img" );
+		assertPage("Continuum - Delete Build Agent Group");
+		assertTextPresent( "Delete Build Agent" );
+        assertTextPresent( "Are you sure you want to delete build agent group " + name + " ?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertBuildAgentPage();
+    }
+
+
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildDefinitionTemplateTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildDefinitionTemplateTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildDefinitionTemplateTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildDefinitionTemplateTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,228 @@
+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.
+ */
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractBuildDefinitionTemplateTest
+    extends AbstractContinuumTest
+{
+    public void goToBuildDefinitionTemplatePage()
+    {
+        clickLinkWithText( "Build Definition Templates" );
+        assertBuildDefinitionTemplatePage();
+    }
+
+    public void assertBuildDefinitionTemplatePage()
+    {
+        assertPage( "Continuum - Build Definition Templates" );
+        assertTextPresent( "Available Templates" );
+        assertTextPresent( "Available Build Definitions" );
+        assertButtonWithIdPresent( "buildDefinitionTemplate_0" );
+        assertButtonWithIdPresent( "buildDefinitionAsTemplate_0" );
+    }
+
+    public void goToAddTemplate()
+    {
+        goToBuildDefinitionTemplatePage();
+        clickSubmitWithLocator( "buildDefinitionTemplate_0" );
+        String[] options =
+            new String[] { "--- Available Build Definitions ---", "Default Ant Build Definition",
+                "Default Maven 1 Build Definition", "Default Maven 2 Build Definition",
+                "Default Shell Build Definition" };
+        assertAddEditTemplatePage( options, null );
+    }
+
+    public void assertAddEditTemplatePage( String[] pendingSelectBuild, String[] selectedBuild )
+    {
+        assertPage( "Continuum - Build Definition Template" );
+        assertTextPresent( "Build Definition Template" );
+        assertTextPresent( "Name" );
+        assertElementPresent( "buildDefinitionTemplate.name" );
+        assertTextPresent( "Configure the used Build Definitions" );
+        if ( pendingSelectBuild != null &amp;&amp; pendingSelectBuild.length &gt; 0 )
+        {
+            assertOptionPresent( "buildDefinitionIds", pendingSelectBuild );
+        }
+        if ( selectedBuild != null &amp;&amp; selectedBuild.length &gt; 0 )
+        {
+            assertOptionPresent( "selectedBuildDefinitionIds", selectedBuild );
+        }
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addEditTemplate( String name, String[] addBuildDefinitions, String[] removeBuildDefinitions,
+                                 boolean success )
+        throws Exception
+    {
+        setFieldValue( "buildDefinitionTemplate.name", name );
+        if ( addBuildDefinitions != null &amp;&amp; addBuildDefinitions.length &gt; 0 )
+        {
+            for ( String bd : addBuildDefinitions )
+            {
+                selectValue( "buildDefinitionIds", bd );
+                clickButtonWithValue( "-&gt;", false );
+            }
+        }
+        if ( removeBuildDefinitions != null &amp;&amp; removeBuildDefinitions.length &gt; 0 )
+        {
+            for ( String bd : removeBuildDefinitions )
+            {
+                selectValue( "selectedBuildDefinitionIds", bd );
+                clickButtonWithValue( "&lt;-", false );
+            }
+        }
+        submit();
+        if ( success )
+        {
+            assertBuildDefinitionTemplatePage();
+        }
+        else
+        {
+            assertAddEditTemplatePage( null, null );
+        }
+    }
+
+    public void goToEditTemplate( String name, String[] buildDefinitions )
+    {
+        goToBuildDefinitionTemplatePage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertAddEditTemplatePage( null, buildDefinitions );
+        assertFieldValue( name, "buildDefinitionTemplate.name" );
+    }
+
+    public void removeTemplate( String name )
+    {
+        goToBuildDefinitionTemplatePage();
+        clickLinkWithXPath( "(//a[contains(@href,'deleteDefinitionTemplate') and contains(@href, '" + name
+            + "')])//img" );
+        assertPage( "Continuum - Delete Build Definition Template" );
+        assertTextPresent( "Delete Build Definition Template" );
+        assertTextPresent( "Are you sure you want to delete build definition template \"" + name + "\"?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertBuildDefinitionTemplatePage();
+    }
+
+    public void goToAddBuildDefinitionTemplate()
+    {
+        goToBuildDefinitionTemplatePage();
+        clickSubmitWithLocator( "buildDefinitionAsTemplate_0" );
+        assertAddEditBuildDefinitionTemplatePage();
+    }
+
+    public void goToEditBuildDefinitionTemplate( String description )
+    {
+        goToBuildDefinitionTemplatePage();
+        String xPath = "//preceding::td[text()='" + description + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertAddEditBuildDefinitionTemplatePage();
+    }
+
+    public void assertAddEditBuildDefinitionTemplatePage()
+    {
+        assertPage( "Continuum - Build Definition Template" );
+        assertTextPresent( "Build Definition Template" );
+        assertTextPresent( "POM filename*:" );
+        assertElementPresent( "buildDefinition.buildFile" );
+        assertTextPresent( "Goals:" );
+        assertElementPresent( "buildDefinition.goals" );
+        assertTextPresent( "Arguments:" );
+        assertElementPresent( "buildDefinition.arguments" );
+        assertTextPresent( "Build Fresh" );
+        assertElementPresent( "buildDefinition.buildFresh" );
+        assertTextPresent( "Always Build" );
+        assertElementPresent( "buildDefinition.alwaysBuild" );
+        assertTextPresent( "Is it default?" );
+        assertTextPresent( "Schedule:" );
+        assertElementPresent( "buildDefinition.schedule.id" );
+        assertTextPresent( "Description" );
+        assertElementPresent( "buildDefinition.description" );
+        assertTextPresent( "Type" );
+        assertElementPresent( "buildDefinition.type" );
+        assertTextPresent( "Build Environment" );
+        assertElementPresent( "buildDefinition.profile.id" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addEditBuildDefinitionTemplate( String buildFile, String goals, String arguments, String description,
+                                                boolean buildFresh, boolean alwaysBuild, boolean isDefault,
+                                                boolean success )
+    {
+        // Enter values into Add Build Definition fields, and submit
+        setFieldValue( "buildDefinition.buildFile", buildFile );
+        setFieldValue( "buildDefinition.goals", goals );
+        setFieldValue( "buildDefinition.arguments", arguments );
+        setFieldValue( "buildDefinition.description", description );
+        if ( buildFresh )
+        {
+            checkField( "buildDefinition.buildFresh" );
+        }
+        else
+        {
+            uncheckField( "buildDefinition.buildFresh" );
+        }
+        if ( isDefault )
+        {
+            checkField( "buildDefinition.defaultForProject" );
+        }
+        else
+        {
+            uncheckField( "buildDefinition.defaultForProject" );
+        }
+        if ( alwaysBuild )
+        {
+            checkField( "buildDefinition.alwaysBuild" );
+        }
+        else
+        {
+            uncheckField( "buildDefinition.alwaysBuild" );
+        }
+        submit();
+        if ( success )
+        {
+            assertBuildDefinitionTemplatePage();
+        }
+        else
+        {
+            assertAddEditBuildDefinitionTemplatePage();
+        }
+    }
+
+    public void removeBuildDefinitionTemplate( String description )
+    {
+        goToBuildDefinitionTemplatePage();
+        String xPath = "//preceding::td[text()='" + description + "']//following::img[@alt='Delete']";
+        clickLinkWithXPath( xPath );
+        assertPage( "Continuum - Delete Build Definition Template" );
+        assertTextPresent( "Delete Build Definition Template" );
+        assertTextPresent( "Are you sure you want to delete build definition template \"" + description + "\"?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertBuildDefinitionTemplatePage();
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,114 @@
+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.
+ */
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractBuildEnvironmentTest
+    extends AbstractSeleniumTest
+{
+    public void goToBuildEnvironmentPage()
+    {
+        clickLinkWithText( "Build Environments" );
+        assertBuildEnvironmentPage();
+    }
+
+    public void assertBuildEnvironmentPage()
+    {
+        assertPage( "Continuum - Build Environments" );
+        assertTextPresent( "Build Environments" );
+        assertButtonWithValuePresent( "Add" );
+    }
+
+    public void goToAddBuildEnvironment()
+    {
+        goToBuildEnvironmentPage();
+        clickButtonWithValue( "Add" );
+        assertAddBuildEnvironmentPage();
+    }
+
+    public void assertAddBuildEnvironmentPage()
+    {
+        assertPage( "Continuum - Build Environment" );
+        assertTextPresent( "Build Environment" );
+        assertTextPresent( "Build Environment Name" );
+        assertElementPresent( "profile.name" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void assertEditBuildEnvironmentPage( String name )
+    {
+        assertAddBuildEnvironmentPage();
+        assertTextPresent( "Installation Name" );
+        assertTextPresent( "Type" );
+        assertFieldValue( name, "profile.name" );
+    }
+
+    public void addBuildEnvironment( String name, String[] installations, boolean success )
+    {
+        setFieldValue( "profile.name", name );
+        submit();
+        editBuildEnvironment( name, installations, success );
+    }
+
+    public void editBuildEnvironment( String name, String[] installations, boolean success )
+    {
+        setFieldValue( "profile.name", name );
+        for ( String i : installations )
+        {
+            selectValue( "installationId", i );
+            clickButtonWithValue( "Add" );
+        }
+        submit();
+        if ( success )
+        {
+            assertBuildEnvironmentPage();
+        }
+        else
+        {
+            assertAddBuildEnvironmentPage();
+        }
+    }
+
+    public void goToEditBuildEnvironment( String name )
+    {
+        goToBuildEnvironmentPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertEditBuildEnvironmentPage( name );
+    }
+
+    public void removeBuildEnvironment( String name )
+    {
+        goToBuildEnvironmentPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Delete']";
+        clickLinkWithXPath( xPath );
+        assertPage( "Continuum - Delete Build Environment" );
+        assertTextPresent( "Delete Build Environment" );
+        assertTextPresent( "Are you sure you want to delete Build Environment \"" + name + "\" ?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertBuildEnvironmentPage();
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildQueueTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildQueueTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildQueueTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildQueueTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,99 @@
+package org.apache.continuum.web.test.parent;
+
+import org.testng.Assert;
+
+/*
+ * 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.
+ */
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractBuildQueueTest
+    extends AbstractContinuumTest
+{
+    public void goToBuildQueuePage()
+    {
+        clickLinkWithText( "Build Queue" );
+
+        assertBuildQueuePage();
+    }
+
+    public void assertBuildQueuePage()
+    {
+        assertPage( "Continumm - Parallel Build Queue" );
+        assertTextPresent( "Continuum - Parallel Build Queue" );
+        assertTextPresent( "Name" );
+        assertTextPresent( "DEFAULT_BUILD_QUEUE" );
+        assertButtonWithValuePresent( "Add" );
+    }
+
+    public void removeBuildQueue( String queueName )
+    {
+        clickLinkWithXPath( "(//a[contains(@href,'deleteBuildQueue.action') and contains(@href, '" + queueName
+            + "')])//img" );
+        assertTextPresent( "Delete Parallel Build Queue" );
+        assertTextPresent( "Are you sure you want to delete the build queue \"" + queueName + "\"?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertBuildQueuePage();
+    }
+
+    public void assertAddBuildQueuePage()
+    {
+        assertPage( "Continuum - Add/Edit Parallel Build Queue" );
+        assertTextPresent( "Continuum - Add/Edit Parallel Build Queue" );
+        assertTextPresent( "Name*" );
+        assertElementPresent( "name" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+	public void addBuildQueue( String name, boolean success )
+	{
+	    goToBuildQueuePage();
+	    assertBuildQueuePage();
+	    submit();
+	    assertAddBuildQueuePage();
+	    setFieldValue( "name", name );
+	    submit();
+	    if ( success )
+	    {
+	        assertBuildQueuePage();
+	        assertTextPresent( name );
+	    }
+	    else
+	    {
+	        assertAddBuildQueuePage();
+	    }
+	}
+	    
+	public void buildProjectForQueuePageTest( String projectGroupName, String groupId, String description, String projectName )
+    throws Exception
+    {       
+        showProjectGroup( projectGroupName, groupId, description );
+        clickButtonWithValue( "Build all projects" );
+        waitForElementPresent( "//img[@alt='Building']" );
+        Thread.sleep( 10000 );
+               	
+     }
+	    
+	    
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractConfigurationTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractConfigurationTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractConfigurationTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractConfigurationTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,93 @@
+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.
+ */
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractConfigurationTest
+    extends AbstractContinuumTest
+{
+    public void goToConfigurationPage()
+    {
+        clickLinkWithText( "Configuration" );
+        assertEditConfigurationPage();
+    }
+
+    public void assertEditedConfigurationPage( String working, String buildOutput, String releaseOutput,
+                                               String deploymentRepository, String baseUrl, String numberBuildParallel )
+    {
+        assertPage( "Continuum - Configuration" );
+        assertTextPresent( "General Configuration " );
+        assertTextPresent( "Working Directory" );
+        assertElementNotPresent( "workingDirectory" );
+        assertTextPresent( working );
+        assertTextPresent( "Build Output Directory" );
+        assertElementNotPresent( "buildOutputDirectory" );
+        assertTextPresent( buildOutput );
+        assertTextPresent( "Release Output Directory" );
+        assertElementNotPresent( "releaseOutputDirectory" );
+        assertTextPresent( releaseOutput );
+        assertTextPresent( "Deployment Repository Directory" );
+        assertElementNotPresent( "deploymentRepositoryDirectory" );
+        assertTextPresent( deploymentRepository );
+        assertTextPresent( "Base URL" );
+        assertElementNotPresent( "baseUrl" );
+        assertTextPresent( baseUrl );
+        assertTextPresent( "Number of Allowed Builds in Parallel" );
+        assertElementNotPresent( "numberOfAllowedBuildsinParallel" );
+        assertTextPresent( numberBuildParallel );
+        assertTextPresent( "Enable Distributed Builds" );
+        assertElementNotPresent( "distributedBuildEnabled" );
+        assertButtonWithValuePresent( "Edit" );
+
+    }
+
+    public void submitConfiguration( String working, String buildOutput, String releaseOutput,
+                                     String deploymentRepository, String baseUrl, String numberBuildParallel,
+                                     boolean distributed, boolean success )
+    {
+        setFieldValue( "workingDirectory", working );
+        setFieldValue( "buildOutputDirectory", buildOutput );
+        setFieldValue( "releaseOutputDirectory", releaseOutput );
+        setFieldValue( "deploymentRepositoryDirectory", deploymentRepository );
+        setFieldValue( "baseUrl", baseUrl );
+        setFieldValue( "numberOfAllowedBuildsinParallel", numberBuildParallel );
+        if ( distributed )
+        {
+            checkField( "distributedBuildEnabled" );
+        }
+        else
+        {
+            uncheckField( "distributedBuildEnabled" );
+        }
+        submit();
+        if ( success )
+        {
+            assertEditedConfigurationPage( working, buildOutput, releaseOutput, deploymentRepository, baseUrl,
+                                           numberBuildParallel );
+        }
+        else
+        {
+            assertEditConfigurationPage();
+        }
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,904 @@
+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.Assert;
+
+/**
+ * Based on AbstractContinuumTestCase of Emmanuel Venisse test.
+ *
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractContinuumTest
+    extends AbstractSeleniumTest
+{
+
+    // ////////////////////////////////////
+    // Create Admin User
+    // ////////////////////////////////////
+    public void assertCreateAdmin()
+    {
+        assertPage( "Create Admin User" );
+        assertTextPresent( "Username" );
+        assertFieldValue( "admin", "user.username" );
+        assertTextPresent( "Full Name*" );
+        assertElementPresent( "user.fullName" );
+        assertTextPresent( "Email Address*" );
+        assertElementPresent( "user.email" );
+        assertTextPresent( "Password*" );
+        assertElementPresent( "user.password" );
+        assertTextPresent( "Confirm Password*" );
+        assertElementPresent( "user.confirmPassword" );
+        assertButtonWithValuePresent( "Create Admin" );
+    }
+
+    public void submitAdminData(String fullname,String email,String password )
+    {
+        setFieldValue( "user.fullName", fullname );
+        setFieldValue( "user.email", email );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", password );
+        submit();
+    }
+
+    // ////////////////////////////////////
+    // About
+    // ////////////////////////////////////
+    public void goToAboutPage()
+    {
+        getSelenium().open( baseUrl );
+        clickLinkWithText( "About" );
+        assertAboutPage();
+    }
+
+    public void assertAboutPage()
+    {
+        assertPage( "Continuum - About" );
+        assertTextPresent( "About Continuum" );
+        assertTextPresent( "Version:" );
+    }
+
+    // ////////////////////////////////////
+    // Login
+    // ////////////////////////////////////
+
+    public void goToLoginPage()
+    {
+        getSelenium().open( baseUrl );
+        clickLinkWithText( "Login" );
+        assertLoginPage();
+    }
+
+    public void assertLoginPage()
+    {
+        assertPage( "Login Page" );
+        assertTextPresent( "Login" );
+        assertTextPresent( "Register" );
+        assertTextPresent( "Username" );
+        assertElementPresent( "username" );
+        assertTextPresent( "Password" );
+        assertElementPresent( "password" );
+        assertTextPresent( "Remember Me" );
+        assertElementPresent( "rememberMe" );
+        assertButtonWithValuePresent( "Login" );
+        assertButtonWithValuePresent( "Cancel" );
+        assertTextPresent( "Need an Account? Register!" );
+        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" );
+        assertTextPresent( "Edit Details" );
+        assertTextPresent( "Logout" );
+        assertTextNotPresent( "Login" );
+        assertTextPresent( username );
+    }
+
+    public void assertChangePasswordPage()
+    {
+        assertPage( "Change Password" );
+        assertTextPresent( "Change Password" );
+        assertTextPresent( "Existing Password*:" );
+        assertElementPresent( "existingPassword" );
+        assertTextPresent( "New Password*:" );
+        assertElementPresent( "newPassword" );
+        assertTextPresent( "Confirm New Password*:" );
+        assertElementPresent( "newPasswordConfirm" );
+    }
+
+    public void assertUserEditPage( String username, String name, String email )
+    {
+        assertPage( "[Admin] User Edit" );
+        assertTextPresent( "[Admin] User Edit" );
+        assertTextPresent( "Username" );
+        assertTextPresent( username );
+        assertTextPresent( "Full Name*:" );
+        assertFieldValue( name, "userEditForm_user_fullName" );
+        assertTextPresent( "Email Address*:" );
+        assertFieldValue( email, "userEditForm_user_email" );
+        assertTextPresent( "Password*:" );
+        assertFieldValue( "", "userEditForm_user_password" );
+        assertTextPresent( "Confirm Password*:" );
+        assertElementPresent( "userEditForm_user_confirmPassword" );
+        assertTextPresent( "Account Creation:" );
+        assertTextPresent( "Last Password Change:" );
+        assertTextPresent( "Effective Roles" );
+        assertLinkPresent( "Edit Roles" );
+    }
+
+    // ////////////////////////////////////
+    // Configuration
+    // ////////////////////////////////////
+
+    public void assertEditConfigurationPage()
+    {
+        assertPage( "Continuum - Configuration" );
+        assertTextPresent( "General Configuration " );
+        assertTextPresent( "Working Directory" );
+        assertElementPresent( "workingDirectory" );
+        assertTextPresent( "Build Output Directory" );
+        assertElementPresent( "buildOutputDirectory" );
+        assertTextPresent( "Release Output Directory" );
+        assertElementPresent( "releaseOutputDirectory" );
+        assertTextPresent( "Deployment Repository Directory" );
+        assertElementPresent( "deploymentRepositoryDirectory" );
+        assertTextPresent( "Base URL" );
+        assertElementPresent( "baseUrl" );
+        assertTextPresent( "Number of Allowed Builds in Parallel" );
+        assertElementPresent( "numberOfAllowedBuildsinParallel" );
+        assertTextPresent( "Enable Distributed Builds" );
+        assertElementPresent( "distributedBuildEnabled" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    // ////////////////////////////////////
+    // Build Queue
+    // ////////////////////////////////////
+
+    public void setMaxBuildQueue(int maxBuildQueue )
+    {
+        clickLinkWithText( "Configuration" );
+        setFieldValue( "numberOfAllowedBuildsinParallel", String.valueOf( maxBuildQueue ) );
+        submit();
+    }
+
+    // ////////////////////////////////////
+    // Project Groups
+    // ////////////////////////////////////
+    public void goToProjectGroupsSummaryPage()
+        throws Exception
+    {
+        clickLinkWithText( "Show Project Groups" );
+
+        assertProjectGroupsSummaryPage();
+    }
+
+    public void assertProjectGroupsSummaryPage()
+    {
+        assertPage( "Continuum - Group Summary" );
+        assertTextPresent( "Project Groups" );
+
+        if ( isTextPresent( "Project Groups list is empty." ) )
+        {
+            assertTextNotPresent( "Name" );
+            assertTextNotPresent( "Group Id" );
+        }
+        else
+        {
+            assertTextPresent( "Name" );
+            assertTextPresent( "Group Id" );
+        }
+    }
+
+    // ////////////////////////////////////
+    // Project Group
+    // ////////////////////////////////////
+    public void showProjectGroup(String name,String groupId,String description )
+        throws Exception
+    {
+        goToProjectGroupsSummaryPage();
+
+        // Checks the link to the created Project Group
+        assertLinkPresent( name );
+        clickLinkWithText( name );
+
+        assertProjectGroupSummaryPage( name, groupId, description );
+    }
+
+    public void assertProjectGroupSummaryPage(String name,String groupId,String description )
+    {
+        assertPage( "Continuum - Project Group" );
+        assertTextPresent( "Project Group Name" );
+        assertTextPresent( name );
+        assertTextPresent( "Project Group Id" );
+        assertTextPresent( groupId );
+        assertTextPresent( "Description" );
+        assertTextPresent( description );
+
+        // Assert the available Project Group Actions
+        assertTextPresent( "Group Actions" );
+        assertElementPresent( "build" );
+        assertElementPresent( "edit" );
+        // assertElementPresent( "remove" );
+
+        assertTextPresent( "Project Group Scm Root" );
+        assertTextPresent( "Scm Root URL" );
+
+        if ( isTextPresent( "Member Projects" ) )
+        {
+            assertTextPresent( "Project Name" );
+            assertTextPresent( "Version" );
+            assertTextPresent( "Build" );
+        }
+        else
+        {
+            assertTextNotPresent( "Project Name" );
+        }
+    }
+
+    public void addProjectGroup(String name,String groupId,String description,boolean success )
+        throws Exception
+    {
+        goToProjectGroupsSummaryPage();
+
+        // Go to Add Project Group Page
+        clickButtonWithValue( "Add Project Group" );
+        assertAddProjectGroupPage();
+
+        // Enter values into Add Project Group fields, and submit
+        setFieldValue( "name", name );
+        setFieldValue( "groupId", groupId );
+        setFieldValue( "description", description );
+
+        submit();
+        if ( success )
+        {
+            assertProjectGroupsSummaryPage();
+        }
+        else
+        {
+            assertAddProjectGroupPage();
+        }
+    }
+
+    public void assertAddProjectGroupPage()
+    {
+        assertPage( "Continuum - Add Project Group" );
+        assertTextPresent( "Add Project Group" );
+        assertTextPresent( "Project Group Name" );
+        assertElementPresent( "name" );
+        assertTextPresent( "Project Group Id" );
+        assertElementPresent( "groupId" );
+        assertTextPresent( "Description" );
+        assertElementPresent( "description" );
+    }
+
+    public void removeProjectGroup(String name,String groupId,String description )
+        throws Exception
+    {
+        showProjectGroup( name, groupId, description );
+        // Remove
+        clickLinkWithLocator( "remove" );
+        // Assert Confirmation
+        assertElementPresent( "removeProjectGroup_" );
+        assertElementPresent( "Cancel" );
+        // Confirm Project Group deletion
+        clickButtonWithValue( "Save" );
+        assertProjectGroupsSummaryPage();
+    }
+    
+    public void removeProjectGroup( String groupName )
+        throws Exception
+    {
+        goToProjectGroupsSummaryPage();
+        clickLinkWithText( groupName );
+        clickButtonWithValue( "Delete Group" );
+        assertTextPresent( "Project Group Removal" );
+        clickButtonWithValue( "Delete" );
+        assertProjectGroupsSummaryPage();
+    }
+
+    public void editProjectGroup(String name,String groupId,String description,String newName,String newDescription )
+        throws Exception
+    {
+        showProjectGroup( name, groupId, description );
+        clickButtonWithValue( "Edit" );
+        assertEditGroupPage( groupId );
+        setFieldValue( "name", newName );
+        setFieldValue( "description", newDescription );
+        clickButtonWithValue( "Save" );
+    }
+
+    public void assertEditGroupPage(String groupId )
+        throws Exception
+    {
+        assertPage( "Continuum - Update Project Group" );
+        assertTextPresent( "Update Project Group" );
+        assertTextPresent( "Project Group Name" );
+        assertTextPresent( "Project Group Id" );
+        assertTextPresent( groupId );
+        assertTextPresent( "Description" );
+        assertTextPresent( "Homepage Url" );
+        assertTextPresent( "Local Repository" );
+        assertElementPresent( "saveProjectGroup_" );
+        assertElementPresent( "Cancel" );
+    }
+
+    public void buildProjectGroup(String projectGroupName,String groupId,String description,String projectName )
+        throws Exception
+    {
+        int currentIt = 1;
+        int maxIt = 10;
+        showProjectGroup( projectGroupName, groupId, description );
+        clickButtonWithValue( "Build all projects" );
+        while ( isElementPresent( "//img[@alt='Building']" ) || isElementPresent( "//img[@alt='Updating']" ) )
+        {
+            Thread.sleep( 10000 );
+            getSelenium().refresh();
+            waitPage();
+            if ( currentIt &gt; maxIt )
+            {
+                Assert.fail( "Timeout, Can't build project group" );
+            }
+            currentIt++;
+        }
+        Thread.sleep( 10000 );
+        clickLinkWithText( projectName );
+        clickLinkWithText( "Builds" );
+        clickLinkWithText( "Result" );
+        assertTextPresent( "BUILD SUCCESSFUL" );
+        clickLinkWithText( "Project Group Summary" );
+    }
+
+    public void assertReleaseSuccess()
+    {
+        assertTextPresent( "Choose Release Goal for " );
+        assertTextPresent( "Prepare project for release " );
+        assertTextPresent( "Perform project release" );
+        assertElementPresent( "goal" );
+        assertElementPresent( "preparedReleaseId" );
+        assertButtonWithValuePresent( "Submit" );
+    }
+
+    public void addValidM2ProjectFromProjectGroup(String projectGroupName,String groupId,String description,
+                                                  String m2PomUrl )
+        throws Exception
+    {
+        showProjectGroup( projectGroupName, groupId, description );
+        selectValue( "projectTypes", "Add M2 Project" );
+        clickButtonWithValue( "Add" );
+        assertAddMavenTwoProjectPage();
+        setFieldValue( "m2PomUrl", m2PomUrl );
+        clickButtonWithValue( "Add" );
+        // if success redirect to summary page
+        assertProjectGroupsSummaryPage();
+    }
+
+    public void goToGroupBuildDefinitionPage(String projectGroupName,String groupId,String description )
+        throws Exception
+    {
+        showProjectGroup( projectGroupName, groupId, description );
+        clickLinkWithText( "Build Definitions" );
+        assertGroupBuildDefinitionPage( projectGroupName );
+    }
+
+    public void assertGroupBuildDefinitionPage(String projectGroupName )
+    {
+        assertTextPresent( "Project Group Build Definitions of " + projectGroupName + " group" );
+    }
+
+    public void assertDeleteBuildDefinitionPage(String description,String goals )
+    {
+        assertTextPresent( "Are you sure you want to delete the build definition with description \"" + description
+            + "\", goals \"" + goals + "\" and id" );
+        isButtonWithValuePresent( "Cancel" );
+        isButtonWithValuePresent( "Delete" );
+    }
+
+    public void assertAddEditBuildDefinitionPage()
+    {
+        assertTextPresent( "Add/Edit Build Definition" );
+        assertTextPresent( "POM filename*:" );
+        assertElementPresent( "buildFile" );
+        assertTextPresent( "Goals:" );
+        assertElementPresent( "goals" );
+        assertTextPresent( "Arguments:" );
+        assertElementPresent( "arguments" );
+        assertTextPresent( "Build Fresh" );
+        assertElementPresent( "buildFresh" );
+        assertTextPresent( "Always Build" );
+        assertElementPresent( "alwaysBuild" );
+        assertTextPresent( "Is it default?" );
+        assertTextPresent( "Schedule:" );
+        assertElementPresent( "scheduleId" );
+        assertTextPresent( "Description" );
+        assertElementPresent( "description" );
+        assertTextPresent( "Type" );
+        assertElementPresent( "buildDefinitionType" );
+        assertTextPresent( "Build Environment" );
+        assertElementPresent( "profileId" );
+    }
+
+    public void addEditGroupBuildDefinition(String groupName,String buildFile,String goals,String arguments,
+                                            String description,boolean buildFresh,boolean alwaysBuild,
+                                            boolean isDefault )
+    {
+        assertAddEditBuildDefinitionPage();
+        // Enter values into Add Build Definition fields, and submit
+        setFieldValue( "buildFile", buildFile );
+        setFieldValue( "goals", goals );
+        setFieldValue( "arguments", arguments );
+        setFieldValue( "description", description );
+
+        if ( buildFresh )
+        {
+            checkField( "buildFresh" );
+        }
+        else
+        {
+            uncheckField( "buildFresh" );
+        }
+        if ( isElementPresent( "defaultBuildDefinition" ) )
+        {
+            if ( isDefault )
+            {
+                checkField( "defaultBuildDefinition" );
+            }
+            else
+            {
+                uncheckField( "defaultBuildDefinition" );
+            }
+        }
+        if ( alwaysBuild )
+        {
+            checkField( "alwaysBuild" );
+        }
+        else
+        {
+            uncheckField( "alwaysBuild" );
+        }
+
+        submit();
+        if ( groupName != null )
+        {
+            assertGroupBuildDefinitionPage( groupName );
+        }
+        else
+        {
+            assertProjectInformationPage();
+        }
+    }
+
+    // ////////////////////////////////////
+    // General Project Pages
+    // ////////////////////////////////////
+    public void goToEditProjectPage(String projectGroupName,String projectName )
+    {
+        clickLinkWithText( "Show Project Groups" );
+        clickLinkWithText( projectGroupName );
+        clickLinkWithText( projectName );
+        clickButtonWithValue( "Edit" );
+
+        assertEditProjectPage();
+    }
+
+    public void assertEditProjectPage()
+    {
+        assertTextPresent( "Update Continuum Project" );
+        assertTextPresent( "Project Name*:" );
+        assertElementPresent( "name" );
+        assertTextPresent( "Version*:" );
+        assertElementPresent( "version" );
+        assertTextPresent( "SCM Url*:" );
+        assertElementPresent( "scmUrl" );
+        assertTextPresent( "Use SCM Credentials Cache, if available" );
+        assertElementPresent( "scmUseCache" );
+        assertTextPresent( "SCM Username:" );
+        assertElementPresent( "scmUsername" );
+        assertTextPresent( "SCM Password:" );
+        assertElementPresent( "scmPassword" );
+        assertTextPresent( "SCM Branch/Tag:" );
+        assertElementPresent( "scmTag" );
+    }
+
+    public void goToProjectInformationPage(String projectGroupName,String projectName )
+    {
+        clickLinkWithText( "Show Project Groups" );
+        clickLinkWithText( projectGroupName );
+        clickLinkWithText( projectName );
+
+        assertProjectInformationPage();
+    }
+
+    public void assertProjectInformationPage()
+    {
+        assertTextPresent( "Project Group Summary" );
+        assertTextPresent( "Project Information" );
+        assertTextPresent( "Builds" );
+        assertTextPresent( "Working Copy" );
+        assertTextPresent( "Build Definitions" );
+        assertTextPresent( "Notifiers" );
+        assertTextPresent( "Dependencies" );
+        assertTextPresent( "Developers" );
+    }
+
+    public void moveProjectToProjectGroup(String groupName,String groupId,String groupDescription,
+                                          String projectName,String newProjectGroup )
+        throws Exception
+    {
+        showProjectGroup( groupName, groupId, groupDescription );
+        clickButtonWithValue( "Edit" );
+
+        assertTextPresent( "Move to Group" );
+        String xPath = "//preceding::th/label[contains(text(),'" + projectName + "')]//following::select";
+        selectValue( xPath, newProjectGroup );
+        clickButtonWithValue( "Save" );
+        assertProjectGroupSummaryPage( groupName, groupId, groupDescription );
+    }
+
+    // ////////////////////////////////////
+    // Maven 2.0.x Project
+    // ////////////////////////////////////
+    public void goToAddMavenTwoProjectPage()
+    {
+        clickLinkWithText( "Maven 2.0.x Project" );
+
+        assertAddMavenTwoProjectPage();
+    }
+
+    public void assertAddMavenTwoProjectPage()
+    {
+        assertTextPresent( "POM Url" );
+        assertElementPresent( "m2PomUrl" );
+        assertTextPresent( "Username" );
+        assertElementPresent( "scmUsername" );
+        assertTextPresent( "Password" );
+        assertElementPresent( "scmPassword" );
+        assertTextPresent( "Upload POM" );
+        assertElementPresent( "m2PomFile" );
+        assertTextPresent( "Project Group" );
+        assertElementPresent( "selectedProjectGroup" );
+    }
+
+    public void addMavenTwoProject(String pomUrl,String username,String password,String projectGroup,
+                                   boolean success )
+        throws Exception
+    {
+        goToAddMavenTwoProjectPage();
+
+        // Enter values into Add Maven Two Project fields, and submit
+        setFieldValue( "m2PomUrl", pomUrl );
+        setFieldValue( "scmUsername", username );
+        setFieldValue( "scmPassword", password );
+
+        if ( projectGroup != null )
+        {
+            selectValue( "addMavenTwoProject_selectedProjectGroup", projectGroup );
+        }
+        submit();
+        String title;
+        if ( success )
+        {
+            title = "Continuum - Project Group";
+        }
+        else
+        {
+            title = "Continuum - Add Maven 2 Project";
+        }
+        waitAddProject( title );
+    }
+
+    /**
+     * submit the page
+     *
+     * @param m2PomUrl
+     * @param validPom
+     */
+    public void submitAddMavenTwoProjectPage(String m2PomUrl,boolean validPom )
+        throws Exception
+    {
+        addMavenTwoProject( m2PomUrl, "", "", null, validPom );
+
+        if ( validPom )
+        {
+            assertTextPresent( "Default Project Group" );
+        }
+    }
+
+    // ////////////////////////////////////
+    // Maven 1.x Project
+    // ////////////////////////////////////
+    public void goToAddMavenOneProjectPage()
+    {
+        clickLinkWithText( "Maven 1.x Project" );
+        assertAddMavenOneProjectPage();
+    }
+
+    public void assertAddMavenOneProjectPage()
+    {
+        assertPage( "Continuum - Add Maven 1 Project" );
+        assertTextPresent( "Add Maven 1.x Project" );
+        assertTextPresent( "M1 POM Url" );
+        assertElementPresent( "m1PomUrl" );
+        assertTextPresent( "Username" );
+        assertElementPresent( "scmUsername" );
+        assertTextPresent( "Password" );
+        assertElementPresent( "scmPassword" );
+        assertTextPresent( "OR" );
+        assertTextPresent( "Upload POM" );
+        assertElementPresent( "m1PomFile" );
+        assertTextPresent( "Project Group" );
+        assertElementPresent( "selectedProjectGroup" );
+        assertOptionPresent( "selectedProjectGroup", new String[] { "Defined by POM", "Default Project Group" } );
+        assertTextPresent( "Build Definition Template" );
+        assertElementPresent( "buildDefinitionTemplateId" );
+        assertOptionPresent( "buildDefinitionTemplateId", new String[] { "Default", "Default Ant Template",
+            "Default Maven 1 Template", "Default Maven 2 Template", "Default Shell Template" } );
+        assertButtonWithValuePresent( "Add" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addMavenOneProject(String pomUrl,String username,String password,String projectGroup,
+                                   String buildTemplate,boolean success )
+        throws Exception
+    {
+        setFieldValue( "m1PomUrl", pomUrl );
+        setFieldValue( "scmUsername", username );
+        setFieldValue( "scmPassword", password );
+
+        if ( buildTemplate != null )
+        {
+            selectValue( "buildDefinitionTemplateId", buildTemplate );
+        }
+        if ( projectGroup != null )
+        {
+            selectValue( "selectedProjectGroup", projectGroup );
+        }
+        submit();
+        String title;
+        if ( success )
+        {
+            title = "Continuum - Project Group";
+        }
+        else
+        {
+            title = "Continuum - Add Maven 1 Project";
+        }
+        waitAddProject( title );
+    }
+
+    // ////////////////////////////////////
+    // ANT/SHELL Projects
+    // ////////////////////////////////////
+
+    public void goToAddAntProjectPage()
+    {
+        clickLinkWithText( "Ant Project" );
+        assertAddProjectPage( "ant" );
+    }
+
+    public void goToAddShellProjectPage()
+    {
+        clickLinkWithText( "Shell Project" );
+        assertAddProjectPage( "shell" );
+    }
+
+    public void assertAddProjectPage(String type )
+    {
+        String title = type.substring( 0, 1 ).toUpperCase() + type.substring( 1 ).toLowerCase();
+        assertPage( "Continuum - Add " + title + " Project" );
+        assertTextPresent( "Add " + title + " Project" );
+        assertTextPresent( "Project Name" );
+        assertElementPresent( "projectName" );
+        assertTextPresent( "Description" );
+        assertElementPresent( "projectDescription" );
+        assertTextPresent( "Version" );
+        assertElementPresent( "projectVersion" );
+        assertTextPresent( "Scm Url" );
+        assertElementPresent( "projectScmUrl" );
+        assertLinkPresent( "Maven SCM URL" );
+        assertTextPresent( "Scm Username" );
+        assertElementPresent( "projectScmUsername" );
+        assertTextPresent( "Scm Password" );
+        assertElementPresent( "projectScmPassword" );
+        assertTextPresent( "Scm Branch/Tag" );
+        assertElementPresent( "projectScmTag" );
+        assertTextPresent( "Use SCM Credentials Cache, if available" );
+        assertElementPresent( "projectScmUseCache" );
+        assertTextPresent( "Project Group" );
+        assertElementPresent( "selectedProjectGroup" );
+        assertOptionPresent( "selectedProjectGroup", new String[] { "Default Project Group" } );
+        assertTextPresent( "Build Definition Template" );
+        assertElementPresent( "buildDefinitionTemplateId" );
+        assertOptionPresent( "buildDefinitionTemplateId", new String[] { "Default", "Default Ant Template",
+            "Default Maven 1 Template", "Default Maven 2 Template", "Default Shell Template" } );
+        assertButtonWithValuePresent( "Add" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addProject(String name,String description,String version,String scmUrl,String scmUser,
+                           String scmPassword,String scmTag,boolean useCache,String projectGroup,
+                           String buildTemplate,boolean success )
+        throws Exception
+    {
+        setFieldValue( "projectName", name );
+        setFieldValue( "projectDescription", description );
+        setFieldValue( "projectVersion", version );
+        setFieldValue( "projectScmUrl", scmUrl );
+        setFieldValue( "projectScmUsername", scmUser );
+        setFieldValue( "projectScmPassword", scmPassword );
+        setFieldValue( "projectScmTag", scmTag );
+        if ( useCache )
+        {
+            checkField( "projectScmUseCache" );
+        }
+        if ( buildTemplate != null )
+        {
+            selectValue( "buildDefinitionTemplateId", buildTemplate );
+        }
+        if ( projectGroup != null )
+        {
+            selectValue( "selectedProjectGroup", projectGroup );
+        }
+        submit();
+        String title;
+        if ( success )
+        {
+            title = "Continuum - Project Group";
+        }
+        else
+        {
+            title = "Continuum - Add ";
+        }
+        waitAddProject( title );
+    }
+
+    public void waitAddProject(String title )
+        throws Exception
+    {
+
+    	Thread.sleep( 4000 );
+        String condition = "selenium.browserbot.getCurrentWindow().document.title != ''";
+        getSelenium().waitForCondition( condition, maxWaitTimeInMs );
+        Thread.sleep( 1000 );
+        String t = getTitle();
+        Assert.assertTrue( t.contains( title ) );
+    }
+
+    public void createAndAddUserAsDeveloperToGroup( String username, String name, String email, String password, String groupName )
+    {
+        clickLinkWithText( "Users" );
+        assertPage( "[Admin] User List" );
+        assertTextNotPresent( username );
+        clickButtonWithValue( "Create New User" );
+        assertPage( "[Admin] User Create" );
+        setFieldValue( "user.fullName", name );
+        setFieldValue( "user.username", username );
+        setFieldValue( "user.email", email );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", password );
+        clickButtonWithValue( "Create User" );
+        assertPage( "[Admin] User Edit" );
+        assignContinuumResourceRoleToUser( "Project Developer", groupName );
+        clickButtonWithValue( "Submit" );
+        assertPage( "[Admin] User List" );
+        assertTextPresent( username );
+        assertTextPresent( name );
+        assertTextPresent( email );
+    }
+
+    public void showMembers( String name, String groupId, String description )
+        throws Exception
+    {
+        showProjectGroup( name, groupId, description );
+        clickLinkWithText( "Members" );
+        assertTextPresent( "Member Projects of " + name + " group" );
+        assertTextPresent( "Users" );
+    }
+
+    public void assertUserPresent( String username, String name, String email )
+    {
+        assertTextPresent( username );
+        assertTextPresent( name );
+        assertTextPresent( email );
+    }
+
+    public void assertUserNotPresent( String username, String name, String email )
+    {
+        assertTextNotPresent( username );
+        assertTextNotPresent( name );
+        assertTextNotPresent( email );
+    }
+
+    public void waitForProjectCheckout()
+        throws Exception
+    {
+        int currentIt = 1;
+        int maxIt = 10;
+        while ( isElementPresent( "//img[@alt='Checking Out']" ) )
+        {
+            Thread.sleep( 10000 );
+            getSelenium().refresh();
+            waitPage();
+            if ( currentIt &gt; maxIt )
+            {
+                Assert.fail( "Timeout, Can't check out projects" );
+            }
+            currentIt++;
+        }
+    }
+
+    public void createNewUser( String username, String name, String email, String password )
+    {
+        clickLinkWithText( "Users" );
+        assertPage( "[Admin] User List" );
+        assertTextNotPresent( username );
+        clickButtonWithValue( "Create New User" );
+        assertPage( "[Admin] User Create" );
+        setFieldValue( "user.fullName", name );
+        setFieldValue( "user.username", username );
+        setFieldValue( "user.email", email );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", password );
+        clickButtonWithValue( "Create User" );
+        assertPage( "[Admin] User Edit" );
+    }
+
+    public void assignContinuumRoleToUser( String role )
+    {
+        clickLinkWithXPath( "//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='" + role + "']", false );
+    }
+
+    public void assignContinuumResourceRoleToUser( String resourceRole, String groupName )
+    {
+        clickLinkWithXPath( "//input[@name='addDSelectedRoles' and @value='" + resourceRole + " - " + groupName + "']", false );
+    }
+
+    public void assertUserCreatedPage()
+    {
+        assertPage( "[Admin] User List" );
+        assertTextPresent( "[Admin] List of Users in Role: Any" );
+        assertLinkPresent( "admin" );
+        assertLinkPresent( "guest" );
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,186 @@
+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.
+ */
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractInstallationTest
+    extends AbstractSeleniumTest
+{
+    public void goToInstallationPage()
+    {
+        clickLinkWithText( "Installations" );
+        assertInstallationPage();
+    }
+
+    public void assertInstallationPage()
+    {
+        assertPage( "Continuum - Installations" );
+        assertTextPresent( "Installations" );
+        assertButtonWithValuePresent( "Add" );
+    }
+
+    public void goToAddInstallationTool()
+    {
+        goToInstallationPage();
+        clickButtonWithValue( "Add" );
+        assertAddChoiceTypeInstallation();
+        selectValue( "installationType", "Tool" );
+        clickButtonWithValue( "Add" );
+        assertAddInstallationToolPage();
+    }
+
+    public void goToAddInstallationVariable()
+    {
+        goToInstallationPage();
+        clickButtonWithValue( "Add" );
+        assertAddChoiceTypeInstallation();
+        selectValue( "installationType", "Environment Variable" );
+        clickButtonWithValue( "Add" );
+        assertAddInstallationVariablePage();
+    }
+
+    public void assertAddChoiceTypeInstallation()
+    {
+        assertPage( "Continuum - Installation Type Choice" );
+        assertTextPresent( "Installation Type Choice" );
+        assertTextPresent( "Installation Type" );
+        assertOptionPresent( "installationType", new String[] { "Tool", "Environment Variable" } );
+        assertButtonWithValuePresent( "Add" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void assertAddInstallationToolPage()
+    {
+        assertEditInstallationToolPage();
+        assertElementPresent( "automaticProfile" );
+        assertTextPresent( "Create a Build Environment with the Installation name" );
+    }
+
+    public void assertEditInstallationToolPage()
+    {
+        assertPage( "Continuum - Installation" );
+        assertTextPresent( "Continuum - Installation" );
+        assertTextPresent( "Name" );
+        assertElementPresent( "installation.name" );
+        assertTextPresent( "Type" );
+        assertOptionPresent( "installation.type", new String[] { "JDK", "Maven 2", "Maven 1", "ANT" } );
+        assertTextPresent( "Value/Path" );
+        assertElementPresent( "installation.varValue" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void assertAddInstallationVariablePage()
+    {
+        assertEditInstallationVariablePage();
+        assertElementPresent( "automaticProfile" );
+        assertTextPresent( "Create a Build Environment with the Installation name" );
+    }
+
+    public void assertEditInstallationVariablePage()
+    {
+        assertPage( "Continuum - Installation" );
+        assertTextPresent( "Continuum - Installation" );
+        assertTextPresent( "Name" );
+        assertElementPresent( "installation.name" );
+        assertTextPresent( "Environment Variable Name" );
+        assertElementPresent( "installation.varName" );
+        assertTextPresent( "Value/Path" );
+        assertElementPresent( "installation.varValue" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void addInstallation( String name, String var, String path, boolean createBuildEnv, boolean tool,
+                                 boolean success )
+    {
+        if ( createBuildEnv )
+        {
+            checkField( "automaticProfile" );
+        }
+        else
+        {
+            uncheckField( "automaticProfile" );
+        }
+        editInstallation( name, var, path, tool, success );
+    }
+
+    public void editInstallation( String name, String var, String path, boolean tool, boolean success )
+    {
+        setFieldValue( "installation.name", name );
+        setFieldValue( "installation.varValue", path );
+        if ( tool )
+        {
+            selectValue( "installation.type", var );
+        }
+        else
+        {
+            setFieldValue( "installation.varName", var );
+        }
+        submit();
+        if ( success )
+        {
+            assertInstallationPage();
+        }
+        else if ( tool )
+        {
+            assertAddInstallationToolPage();
+        }
+        else
+        {
+            assertAddInstallationVariablePage();
+        }
+    }
+
+    public void goToEditInstallation( String name, String var, String path, boolean tool )
+    {
+        goToInstallationPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        if ( tool )
+        {
+            assertEditInstallationToolPage();
+        }
+        else
+        {
+            assertEditInstallationVariablePage();
+            assertFieldValue( var, "installation.varName" );
+        }
+        assertFieldValue( name, "installation.name" );
+        assertFieldValue( path, "installation.varValue" );
+    }
+
+    public void removeInstallation( String name )
+    {
+        goToInstallationPage();
+        clickLinkWithXPath( "(//a[contains(@href,'deleteInstallation') and contains(@href, '" + name + "')])//img" );
+        assertPage( "Continuum - Delete Installation" );
+        assertTextPresent( "Delete Installation" );
+        assertTextPresent( "Are you sure you want to delete \"" + name + "\" installation ?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertInstallationPage();
+    }
+
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractLocalRepositoryTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractLocalRepositoryTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractLocalRepositoryTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractLocalRepositoryTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,107 @@
+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.
+ */
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+public abstract class AbstractLocalRepositoryTest
+    extends AbstractSeleniumTest
+{
+    public void goToLocalRepositoryPage()
+    {
+        clickLinkWithText( "Local Repositories" );
+
+        assertLocalRepositoryPage();
+    }
+
+    public void assertLocalRepositoryPage()
+    {
+        assertPage( "Continuum - Local Repositories" );
+        assertTextPresent( "Local Repositories" );
+        assertTextPresent( "Name" );
+        assertTextPresent( "Location" );
+        assertTextPresent( "Layout" );
+        assertImgWithAlt( "Edit" );
+        assertImgWithAlt( "Purge" );
+        assertImgWithAlt( "Delete" );
+        assertButtonWithValuePresent( "Add" );
+    }
+
+    public void assertAddLocalRepositoryPage()
+    {
+        assertPage( "Continuum - Add/Edit Local Repository" );
+        assertTextPresent( "Add/Edit Local Repository" );
+        assertTextPresent( "Name" );
+        assertElementPresent( "repository.name" );
+        assertTextPresent( "Location" );
+        assertElementPresent( "repository.location" );
+        assertTextPresent( "Layout" );
+        assertElementPresent( "repository.layout" );
+        assertButtonWithValuePresent( "Save" );
+        assertButtonWithValuePresent( "Cancel" );
+    }
+
+    public void removeLocalRepository( String name )
+    {
+        goToLocalRepositoryPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Delete']";
+        clickLinkWithXPath( xPath );
+        assertTextPresent( "Delete Local Repository" );
+        assertTextPresent( "Are you sure you want to delete Local Repository \"" + name + "\" ?" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
+        assertLocalRepositoryPage();
+    }
+
+    public void goToAddLocalRepository()
+    {
+        goToLocalRepositoryPage();
+        clickButtonWithValue( "Add" );
+        assertAddLocalRepositoryPage();
+    }
+
+    public void goToEditLocalRepository( String name, String location )
+    {
+        goToLocalRepositoryPage();
+        String xPath = "//preceding::td[text()='" + name + "']//following::img[@alt='Edit']";
+        clickLinkWithXPath( xPath );
+        assertAddLocalRepositoryPage();
+        assertFieldValue( name, "repository.name" );
+        assertFieldValue( location, "repository.location" );
+    }
+
+    public void addEditLocalRepository( String name, String location, boolean success )
+    {
+        setFieldValue( "repository.name", name );
+        setFieldValue( "repository.location", location );
+        submit();
+        if ( success )
+        {
+            assertLocalRepositoryPage();
+        }
+        else
+        {
+            assertAddLocalRepositoryPage();
+        }
+    }
+}




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834357 [1/7] - in /continuum/branches/continuum-1.3.x/continuum-webapp-test: ./ src/site/ src/site/apt/ src/test/it/org/apache/continuum/web/test/ src/test/resources/ src/test/testng/config/ src/test/testng/org/apache/continuum/web/test/ s...</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110053804.38E782388998@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110053804-38E782388998@eris-apache-org%3e</id>
<updated>2009-11-10T05:38:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Tue Nov 10 05:38:01 2009
New Revision: 834357

URL: http://svn.apache.org/viewvc?rev=834357&amp;view=rev
Log:
merge -r 760765:830016 of continuum-webapp-test


Added:
    continuum/branches/continuum-1.3.x/continuum-webapp-test/junit-pom.xml
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/site/
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/site/apt/
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/site/apt/index.apt
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng-multienvironment.xml
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/XPathExpressionUtil.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildDefinitionTemplateTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildEnvironmentTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildQueueTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractConfigurationTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractInstallationTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractLocalRepositoryTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractNotifierTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractPurgeTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractScheduleTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java
Modified:
    continuum/branches/continuum-1.3.x/continuum-webapp-test/Readme.txt
    continuum/branches/continuum-1.3.x/continuum-webapp-test/it-pom.xml
    continuum/branches/continuum-1.3.x/continuum-webapp-test/pom.xml
    continuum/branches/continuum-1.3.x/continuum-webapp-test/pom2.xml
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractContinuumTestCase.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AccountSecurityTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenOneProjectTestCase.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AntTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/SchedulesPageTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/it.properties
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng.xml
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractContinuumTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AbstractSeleniumTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/tomcat5x/conf/catalina.policy
    continuum/branches/continuum-1.3.x/continuum-webapp-test/testng-pom.xml

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/Readme.txt
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/Readme.txt?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/Readme.txt (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/Readme.txt Tue Nov 10 05:38:01 2009
@@ -6,19 +6,34 @@
  * 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/java with Maven and Cargo using support for multiple data sources
- * modify src/test/resources/it.properties as needed
+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 in src/test/it with Maven and Cargo with alternate configuration
+Run Selenium tests against an existing Continuum instance
+  * mvn clean install -DbaseUrl=http://localhost:9595/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)
+
+Change the port the embedded selenium runs on
+  * mvn clean install -DseleniumPort=4444
+
+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 it-pom.xml
- 
-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
+ * 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 &lt;testSourceDirectory&gt;
+ * 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. :)
@@ -26,11 +41,6 @@
  After you have run through the lifecycle once to set up the container and webapps, you can re-start it using:
  mvn cargo:start
 
-Run Selenium teests in src/test/pom2 with Maven
- * set TOMCAT_HOME environment variable to location of Tomcat 5.5.x installation
- * modify src/test/resources/it.properties as needed
- * mvn clean install -f pom2.xml
-
 ======= OLD INSTRUCTIONS FOR src/test/it BELOW =======
 
 Test Continuum with Tomcat 5.x and firefox

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/it-pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/it-pom.xml?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/it-pom.xml (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/it-pom.xml Tue Nov 10 05:38:01 2009
@@ -1,285 +0,0 @@
-&lt;?xml version='1.0' encoding='UTF-8'?&gt;
-&lt;!--
-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.
---&gt;
-&lt;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"&gt;
-  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
-  &lt;parent&gt;
-    &lt;groupId&gt;org.apache.continuum&lt;/groupId&gt;
-    &lt;artifactId&gt;continuum&lt;/artifactId&gt;
-    &lt;version&gt;1.3.2-SNAPSHOT&lt;/version&gt;
-  &lt;/parent&gt;
-  &lt;artifactId&gt;continuum-webapp-test&lt;/artifactId&gt;
-  &lt;name&gt;Continuum Webapp Test&lt;/name&gt;
-  &lt;packaging&gt;pom&lt;/packaging&gt;
-
-  &lt;build&gt;
-    &lt;testSourceDirectory&gt;src/test/it&lt;/testSourceDirectory&gt;
-    &lt;testResources&gt;
-      &lt;testResource&gt;
-        &lt;directory&gt;src/test/it-resources&lt;/directory&gt;
-      &lt;/testResource&gt;
-    &lt;/testResources&gt;
-    &lt;plugins&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
-        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
-        &lt;configuration&gt;
-          &lt;source&gt;1.5&lt;/source&gt;
-          &lt;target&gt;1.5&lt;/target&gt;
-          &lt;verbose&gt;true&lt;/verbose&gt;
-        &lt;/configuration&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;testCompile&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;testResources&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
-        &lt;artifactId&gt;selenium-maven-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;phase&gt;pre-integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;start-server&lt;/goal&gt;
-            &lt;/goals&gt;
-            &lt;configuration&gt;
-              &lt;background&gt;true&lt;/background&gt;
-            &lt;/configuration&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
-        &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
-        &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;id&gt;start-container&lt;/id&gt;
-            &lt;phase&gt;pre-integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;start&lt;/goal&gt;
-            &lt;/goals&gt;
-            &lt;configuration&gt;
-              &lt;wait&gt;false&lt;/wait&gt;
-            &lt;/configuration&gt;
-          &lt;/execution&gt;
-          &lt;execution&gt;
-            &lt;id&gt;stop-container&lt;/id&gt;
-            &lt;phase&gt;post-integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-                &lt;goal&gt;stop&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-        &lt;configuration&gt;
-          &lt;container&gt;
-            &lt;containerId&gt;${container.name}&lt;/containerId&gt;
-            &lt;zipUrlInstaller&gt;
-              &lt;url&gt;${container.url}&lt;/url&gt;
-              &lt;installDir&gt;${project.build.directory}/installs&lt;/installDir&gt;
-            &lt;/zipUrlInstaller&gt;
-            &lt;log&gt;${project.build.directory}/logs/${container.name}.log&lt;/log&gt;
-            &lt;output&gt;${project.build.directory}/logs/${container.name}.out&lt;/output&gt;
-            &lt;timeout&gt;600000&lt;/timeout&gt;
-            &lt;systemProperties&gt;
-              &lt;appserver.base&gt;${project.build.directory}&lt;/appserver.base&gt;
-              &lt;derby.system.home&gt;${project.build.directory}&lt;/derby.system.home&gt;
-            &lt;/systemProperties&gt;
-          &lt;/container&gt;
-          &lt;configuration&gt;
-            &lt;home&gt;${project.build.directory}/${install.dir}/&lt;/home&gt;
-            &lt;type&gt;existing&lt;/type&gt;
-          &lt;/configuration&gt;
-        &lt;/configuration&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
-        &lt;artifactId&gt;dependency-maven-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;id&gt;unzip-continuum-webapp&lt;/id&gt;
-            &lt;phase&gt;generate-resources&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;unpack&lt;/goal&gt;
-            &lt;/goals&gt;
-            &lt;configuration&gt;
-              &lt;artifactItems&gt;
-                &lt;artifactItem&gt;
-                  &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
-                  &lt;artifactId&gt;continuum-webapp&lt;/artifactId&gt;
-                  &lt;version&gt;${project.version}&lt;/version&gt;
-                  &lt;type&gt;war&lt;/type&gt;
-                &lt;/artifactItem&gt;
-              &lt;/artifactItems&gt;
-              &lt;outputDirectory&gt;${project.build.directory}/${install.dir}/webapps/continuum&lt;/outputDirectory&gt;
-            &lt;/configuration&gt;
-          &lt;/execution&gt;
-          &lt;execution&gt;
-            &lt;id&gt;copy-container-dependencies&lt;/id&gt;
-            &lt;phase&gt;generate-resources&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;copy-dependencies&lt;/goal&gt;
-            &lt;/goals&gt;
-            &lt;configuration&gt;
-              &lt;overWriteReleases&gt;false&lt;/overWriteReleases&gt;
-              &lt;overWriteSnapshots&gt;true&lt;/overWriteSnapshots&gt;
-              &lt;excludeTransitive&gt;false&lt;/excludeTransitive&gt;
-              &lt;outputDirectory&gt;${project.build.directory}/${install.dir}/common/lib&lt;/outputDirectory&gt;
-            &lt;/configuration&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;artifactId&gt;maven-antrun-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;id&gt;copy-container-conf&lt;/id&gt;
-            &lt;phase&gt;package&lt;/phase&gt;
-            &lt;configuration&gt;
-              &lt;tasks&gt;
-                &lt;copy todir="${project.build.directory}/${install.dir}/webapps/continuum/META-INF/"
-                       file="src/test/${container.name}/context.xml"/&gt;
-              &lt;/tasks&gt;
-            &lt;/configuration&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;run&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
-        &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;id&gt;integration-tests&lt;/id&gt;
-            &lt;phase&gt;integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;test&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-    &lt;/plugins&gt;
-  &lt;/build&gt;
-  &lt;dependencies&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;junit&lt;/groupId&gt;
-      &lt;artifactId&gt;junit&lt;/artifactId&gt;
-      &lt;version&gt;3.8.1&lt;/version&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.openqa.selenium.client-drivers&lt;/groupId&gt;
-      &lt;artifactId&gt;selenium-java-client-driver&lt;/artifactId&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.openqa.selenium.client-drivers&lt;/groupId&gt;
-      &lt;artifactId&gt;selenium-java-client-driver&lt;/artifactId&gt;
-      &lt;version&gt;0.8.1&lt;/version&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.codehaus.plexus&lt;/groupId&gt;
-      &lt;artifactId&gt;plexus-utils&lt;/artifactId&gt;
-      &lt;version&gt;1.4&lt;/version&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.openqa.selenium.server&lt;/groupId&gt;
-      &lt;artifactId&gt;selenium-server&lt;/artifactId&gt;
-      &lt;version&gt;0.8.1&lt;/version&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-
-    &lt;!-- container dependencies --&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.apache.derby&lt;/groupId&gt;
-       &lt;artifactId&gt;derby&lt;/artifactId&gt;
-       &lt;version&gt;10.1.3.1&lt;/version&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;javax.mail&lt;/groupId&gt;
-      &lt;artifactId&gt;mail&lt;/artifactId&gt;
-      &lt;version&gt;1.4&lt;/version&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;javax.activation&lt;/groupId&gt;
-      &lt;artifactId&gt;activation&lt;/artifactId&gt;
-      &lt;version&gt;1.1&lt;/version&gt;
-    &lt;/dependency&gt;
-
-  &lt;/dependencies&gt;
-
-  &lt;profiles&gt;
-    &lt;profile&gt;
-      &lt;id&gt;tomcat5x&lt;/id&gt;
-      &lt;activation&gt;
-        &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
-      &lt;/activation&gt;
-      &lt;properties&gt;
-        &lt;container.name&gt;tomcat5x&lt;/container.name&gt;
-        &lt;container.url&gt;http://apache.mirrors.redwire.net/tomcat/tomcat-5/v5.5.27/bin/apache-tomcat-5.5.27.zip&lt;/container.url&gt;
-      &lt;/properties&gt;
-    &lt;/profile&gt;
-    &lt;profile&gt;
-      &lt;id&gt;firefox&lt;/id&gt;
-      &lt;activation&gt;
-        &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
-      &lt;/activation&gt;
-      &lt;properties&gt;
-        &lt;browser&gt;*firefox&lt;/browser&gt;
-      &lt;/properties&gt;
-    &lt;/profile&gt;
-    &lt;profile&gt;
-      &lt;id&gt;iexplore&lt;/id&gt;
-      &lt;properties&gt;
-        &lt;browser&gt;*iexplore&lt;/browser&gt;
-      &lt;/properties&gt;
-    &lt;/profile&gt;
-    &lt;profile&gt;
-      &lt;id&gt;otherbrowser&lt;/id&gt;
-      &lt;properties&gt;
-        &lt;browser&gt;*custom ${browserPath}&lt;/browser&gt;
-      &lt;/properties&gt;
-    &lt;/profile&gt;
-
-  &lt;/profiles&gt;
-  
-  &lt;properties&gt;
-    &lt;install.dir&gt;installs/apache-tomcat-5.5.27/apache-tomcat-5.5.27&lt;/install.dir&gt;
-  &lt;/properties&gt;
-
-&lt;/project&gt;

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/junit-pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/junit-pom.xml?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/junit-pom.xml (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/junit-pom.xml Tue Nov 10 05:38:01 2009
@@ -0,0 +1,324 @@
+&lt;?xml version='1.0' encoding='UTF-8'?&gt;
+&lt;!--
+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.
+--&gt;
+&lt;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"&gt;
+  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
+  &lt;parent&gt;
+    &lt;groupId&gt;org.apache.continuum&lt;/groupId&gt;
+    &lt;artifactId&gt;continuum&lt;/artifactId&gt;
+    &lt;version&gt;1.4.0-SNAPSHOT&lt;/version&gt;
+  &lt;/parent&gt;
+  &lt;artifactId&gt;continuum-webapp-test&lt;/artifactId&gt;
+  &lt;name&gt;Continuum :: Webapp Tests&lt;/name&gt;
+  &lt;packaging&gt;pom&lt;/packaging&gt;
+
+  &lt;repositories&gt;
+    &lt;repository&gt;
+      &lt;id&gt;openqa-snapshots&lt;/id&gt;
+      &lt;url&gt;http://nexus.openqa.org/content/repositories/snapshots&lt;/url&gt;
+      &lt;releases&gt;&lt;enabled&gt;false&lt;/enabled&gt;&lt;/releases&gt;
+    &lt;/repository&gt;
+  &lt;/repositories&gt;
+
+  &lt;build&gt;
+    &lt;testSourceDirectory&gt;src/test/it&lt;/testSourceDirectory&gt;
+    &lt;plugins&gt;
+      &lt;plugin&gt;
+        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
+        &lt;configuration&gt;
+          &lt;source&gt;1.5&lt;/source&gt;
+          &lt;target&gt;1.5&lt;/target&gt;
+          &lt;verbose&gt;true&lt;/verbose&gt;
+        &lt;/configuration&gt;
+        &lt;executions&gt;
+          &lt;execution&gt;
+            &lt;goals&gt;
+              &lt;goal&gt;testCompile&lt;/goal&gt;
+            &lt;/goals&gt;
+          &lt;/execution&gt;
+        &lt;/executions&gt;
+      &lt;/plugin&gt;
+      &lt;plugin&gt;
+        &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
+        &lt;executions&gt;
+          &lt;execution&gt;
+            &lt;goals&gt;
+              &lt;goal&gt;testResources&lt;/goal&gt;
+            &lt;/goals&gt;
+          &lt;/execution&gt;
+        &lt;/executions&gt;
+      &lt;/plugin&gt;
+      &lt;plugin&gt;
+        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
+        &lt;artifactId&gt;selenium-maven-plugin&lt;/artifactId&gt;
+        &lt;version&gt;1.0-rc-1&lt;/version&gt;
+        &lt;executions&gt;
+          &lt;execution&gt;
+            &lt;phase&gt;pre-integration-test&lt;/phase&gt;
+            &lt;goals&gt;
+              &lt;goal&gt;start-server&lt;/goal&gt;
+            &lt;/goals&gt;
+            &lt;configuration&gt;
+              &lt;background&gt;true&lt;/background&gt;
+            &lt;/configuration&gt;
+          &lt;/execution&gt;
+        &lt;/executions&gt;
+      &lt;/plugin&gt;
+      &lt;plugin&gt;
+        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+        &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
+        &lt;executions&gt;
+          &lt;execution&gt;
+            &lt;id&gt;integration-tests&lt;/id&gt;
+            &lt;phase&gt;integration-test&lt;/phase&gt;
+            &lt;goals&gt;
+              &lt;goal&gt;test&lt;/goal&gt;
+            &lt;/goals&gt;
+            &lt;configuration&gt;
+              &lt;systemProperties&gt;
+                &lt;property&gt;
+                  &lt;name&gt;browser&lt;/name&gt;
+                  &lt;value&gt;${browser}&lt;/value&gt;
+                &lt;/property&gt;
+              &lt;/systemProperties&gt;
+            &lt;/configuration&gt;
+          &lt;/execution&gt;
+        &lt;/executions&gt;
+      &lt;/plugin&gt;
+    &lt;/plugins&gt;
+  &lt;/build&gt;
+  &lt;dependencies&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.openqa.selenium.client-drivers&lt;/groupId&gt;
+      &lt;artifactId&gt;selenium-java-client-driver&lt;/artifactId&gt;
+      &lt;version&gt;1.0-beta-SNAPSHOT&lt;/version&gt;
+      &lt;scope&gt;test&lt;/scope&gt;
+      &lt;exclusions&gt;
+        &lt;exclusion&gt;
+          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
+          &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
+        &lt;/exclusion&gt;
+      &lt;/exclusions&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.codehaus.plexus&lt;/groupId&gt;
+      &lt;artifactId&gt;plexus-utils&lt;/artifactId&gt;
+      &lt;version&gt;1.4&lt;/version&gt;
+      &lt;scope&gt;test&lt;/scope&gt;
+    &lt;/dependency&gt;
+    
+    &lt;!-- deployables --&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.apache.continuum&lt;/groupId&gt;
+      &lt;artifactId&gt;continuum-webapp&lt;/artifactId&gt;
+      &lt;type&gt;war&lt;/type&gt;
+    &lt;/dependency&gt;
+
+    &lt;!-- container dependencies --&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.apache.derby&lt;/groupId&gt;
+      &lt;artifactId&gt;derby&lt;/artifactId&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;javax.mail&lt;/groupId&gt;
+      &lt;artifactId&gt;mail&lt;/artifactId&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;javax.activation&lt;/groupId&gt;
+      &lt;artifactId&gt;activation&lt;/artifactId&gt;
+    &lt;/dependency&gt;
+  &lt;/dependencies&gt;
+
+  &lt;profiles&gt;
+    &lt;profile&gt;
+      &lt;id&gt;create-container&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;!container&lt;/name&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;build&gt;
+        &lt;plugins&gt;
+          &lt;plugin&gt;
+            &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
+            &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
+            &lt;version&gt;1.0&lt;/version&gt;
+            &lt;executions&gt;
+              &lt;execution&gt;
+                &lt;id&gt;start-container&lt;/id&gt;
+                &lt;phase&gt;pre-integration-test&lt;/phase&gt;
+                &lt;goals&gt;
+                  &lt;goal&gt;start&lt;/goal&gt;
+                &lt;/goals&gt;
+                &lt;configuration&gt;
+                  &lt;wait&gt;false&lt;/wait&gt;
+                &lt;/configuration&gt;
+              &lt;/execution&gt;
+              &lt;execution&gt;
+                &lt;id&gt;stop-container&lt;/id&gt;
+                &lt;phase&gt;post-integration-test&lt;/phase&gt;
+                &lt;goals&gt;
+                  &lt;goal&gt;stop&lt;/goal&gt;
+                &lt;/goals&gt;
+              &lt;/execution&gt;
+            &lt;/executions&gt;
+            &lt;configuration&gt;
+              &lt;container&gt;
+                &lt;containerId&gt;${container.name}&lt;/containerId&gt;
+                &lt;zipUrlInstaller&gt;
+                  &lt;url&gt;${container.url}&lt;/url&gt;
+                  &lt;installDir&gt;${project.build.directory}/installs/${container.name}&lt;/installDir&gt;
+                &lt;/zipUrlInstaller&gt;
+                &lt;log&gt;${project.build.directory}/logs/${container.name}.log&lt;/log&gt;
+                &lt;output&gt;${project.build.directory}/logs/${container.name}.out&lt;/output&gt;
+                &lt;timeout&gt;600000&lt;/timeout&gt;
+                &lt;systemProperties&gt;
+                  &lt;appserver.base&gt;${project.build.directory}&lt;/appserver.base&gt;
+                  &lt;derby.system.home&gt;${project.build.directory}&lt;/derby.system.home&gt;
+                &lt;/systemProperties&gt;
+                &lt;dependencies&gt;
+                  &lt;dependency&gt;
+                    &lt;groupId&gt;org.apache.derby&lt;/groupId&gt;
+                    &lt;artifactId&gt;derby&lt;/artifactId&gt;
+                  &lt;/dependency&gt;
+                  &lt;dependency&gt;
+                    &lt;groupId&gt;javax.mail&lt;/groupId&gt;
+                    &lt;artifactId&gt;mail&lt;/artifactId&gt;
+                  &lt;/dependency&gt;
+                  &lt;dependency&gt;
+                    &lt;groupId&gt;javax.activation&lt;/groupId&gt;
+                    &lt;artifactId&gt;activation&lt;/artifactId&gt;
+                  &lt;/dependency&gt;
+                &lt;/dependencies&gt;
+              &lt;/container&gt;
+              &lt;configuration&gt;
+                &lt;home&gt;${project.build.directory}/${container.name}&lt;/home&gt;
+                &lt;type&gt;standalone&lt;/type&gt;
+                &lt;properties&gt;
+                  &lt;cargo.servlet.port&gt;9595&lt;/cargo.servlet.port&gt;
+                  &lt;cargo.datasource.datasource.users&gt;
+                    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
+                  &lt;/cargo.datasource.datasource.users&gt;
+                  &lt;cargo.datasource.datasource.builds&gt;
+                    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
+                  &lt;/cargo.datasource.datasource.builds&gt;
+                  &lt;cargo.resource.resource.mail&gt;
+                    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
+                  &lt;/cargo.resource.resource.mail&gt;
+                &lt;/properties&gt;
+                &lt;deployables&gt;
+                  &lt;deployable&gt;
+                    &lt;groupId&gt;${project.goupId}&lt;/groupId&gt;
+                    &lt;artifactId&gt;continuum-webapp&lt;/artifactId&gt;
+                    &lt;type&gt;war&lt;/type&gt;
+                    &lt;properties&gt;
+                      &lt;context&gt;continuum&lt;/context&gt;
+                    &lt;/properties&gt;
+                  &lt;/deployable&gt;
+                &lt;/deployables&gt;
+              &lt;/configuration&gt;
+            &lt;/configuration&gt;
+          &lt;/plugin&gt;
+        &lt;/plugins&gt;
+      &lt;/build&gt;
+    &lt;/profile&gt;
+    &lt;profile&gt;
+      &lt;id&gt;tomcat5x&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;!container&lt;/name&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;properties&gt;
+        &lt;container.name&gt;tomcat5x&lt;/container.name&gt;
+        &lt;container.url&gt;http://apache.mirrors.redwire.net/tomcat/tomcat-5/v5.5.27/bin/apache-tomcat-5.5.27.zip
+        &lt;/container.url&gt;
+      &lt;/properties&gt;
+    &lt;/profile&gt;
+    &lt;profile&gt;
+      &lt;id&gt;existing-container&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;container&lt;/name&gt;
+          &lt;value&gt;existing&lt;/value&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;!-- edit src/test/resources/it.properties as needed --&gt;
+    &lt;/profile&gt;
+    &lt;profile&gt;
+      &lt;id&gt;firefox&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;!browser&lt;/name&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;properties&gt;
+        &lt;browser&gt;*firefox&lt;/browser&gt;
+      &lt;/properties&gt;
+    &lt;/profile&gt;
+    &lt;profile&gt;
+      &lt;id&gt;iexplore&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;browser&lt;/name&gt;
+          &lt;value&gt;iexplore&lt;/value&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;properties&gt;
+        &lt;browser&gt;*iexplore&lt;/browser&gt;
+      &lt;/properties&gt;
+    &lt;/profile&gt;
+    &lt;profile&gt;
+      &lt;id&gt;safari&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;browser&lt;/name&gt;
+          &lt;value&gt;safari&lt;/value&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;properties&gt;
+        &lt;browser&gt;*safari&lt;/browser&gt;
+      &lt;/properties&gt;
+    &lt;/profile&gt;
+    &lt;profile&gt;
+      &lt;id&gt;otherbrowser&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;browser&lt;/name&gt;
+          &lt;value&gt;other&lt;/value&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;properties&gt;
+        &lt;browser&gt;*custom ${browserPath}&lt;/browser&gt;
+      &lt;/properties&gt;
+    &lt;/profile&gt;
+
+  &lt;/profiles&gt;
+
+&lt;/project&gt;

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/pom.xml?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/pom.xml (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/pom.xml Tue Nov 10 05:38:01 2009
@@ -22,13 +22,23 @@
   &lt;parent&gt;
     &lt;groupId&gt;org.apache.continuum&lt;/groupId&gt;
     &lt;artifactId&gt;continuum&lt;/artifactId&gt;
-    &lt;version&gt;1.3.3-SNAPSHOT&lt;/version&gt;
+    &lt;version&gt;1.3.5-SNAPSHOT&lt;/version&gt;
   &lt;/parent&gt;
   &lt;artifactId&gt;continuum-webapp-test&lt;/artifactId&gt;
   &lt;name&gt;Continuum :: Webapp Tests&lt;/name&gt;
   &lt;packaging&gt;pom&lt;/packaging&gt;
 
   &lt;build&gt;
+    &lt;testSourceDirectory&gt;src/test/testng&lt;/testSourceDirectory&gt;
+    &lt;testResources&gt;
+      &lt;testResource&gt;
+        &lt;directory&gt;src/test/resources&lt;/directory&gt;
+        &lt;filtering&gt;true&lt;/filtering&gt;
+        &lt;includes&gt;
+          &lt;include&gt;**/*&lt;/include&gt;
+        &lt;/includes&gt;
+      &lt;/testResource&gt;
+    &lt;/testResources&gt;
     &lt;plugins&gt;
       &lt;plugin&gt;
         &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
@@ -57,112 +67,13 @@
         &lt;/executions&gt;
       &lt;/plugin&gt;
       &lt;plugin&gt;
-        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
-        &lt;artifactId&gt;selenium-maven-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;phase&gt;pre-integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;start-server&lt;/goal&gt;
-            &lt;/goals&gt;
-            &lt;configuration&gt;
-              &lt;background&gt;true&lt;/background&gt;
-            &lt;/configuration&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
-        &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
-        &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;id&gt;start-container&lt;/id&gt;
-            &lt;phase&gt;pre-integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;start&lt;/goal&gt;
-            &lt;/goals&gt;
-            &lt;configuration&gt;
-              &lt;wait&gt;false&lt;/wait&gt;
-            &lt;/configuration&gt;
-          &lt;/execution&gt;
-          &lt;execution&gt;
-            &lt;id&gt;stop-container&lt;/id&gt;
-            &lt;phase&gt;post-integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;stop&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-        &lt;configuration&gt;
-          &lt;container&gt;
-            &lt;containerId&gt;${container.name}&lt;/containerId&gt;
-            &lt;zipUrlInstaller&gt;
-              &lt;url&gt;${container.url}&lt;/url&gt;
-              &lt;installDir&gt;${project.build.directory}/installs/${container.name}&lt;/installDir&gt;
-            &lt;/zipUrlInstaller&gt;
-            &lt;log&gt;${project.build.directory}/logs/${container.name}.log&lt;/log&gt;
-            &lt;output&gt;${project.build.directory}/logs/${container.name}.out&lt;/output&gt;
-            &lt;timeout&gt;600000&lt;/timeout&gt;
-            &lt;systemProperties&gt;
-              &lt;appserver.base&gt;${project.build.directory}&lt;/appserver.base&gt;
-              &lt;derby.system.home&gt;${project.build.directory}&lt;/derby.system.home&gt;
-            &lt;/systemProperties&gt;
-            &lt;dependencies&gt;
-              &lt;dependency&gt;
-                &lt;groupId&gt;org.apache.derby&lt;/groupId&gt;
-                &lt;artifactId&gt;derby&lt;/artifactId&gt;
-              &lt;/dependency&gt;
-              &lt;dependency&gt;
-                &lt;groupId&gt;javax.mail&lt;/groupId&gt;
-                &lt;artifactId&gt;mail&lt;/artifactId&gt;
-              &lt;/dependency&gt;
-              &lt;dependency&gt;
-                &lt;groupId&gt;javax.activation&lt;/groupId&gt;
-                &lt;artifactId&gt;activation&lt;/artifactId&gt;
-              &lt;/dependency&gt;
-            &lt;/dependencies&gt;
-          &lt;/container&gt;
-          &lt;configuration&gt;
-            &lt;home&gt;${project.build.directory}/${container.name}&lt;/home&gt;
-            &lt;type&gt;standalone&lt;/type&gt;
-            &lt;properties&gt;
-              &lt;cargo.servlet.port&gt;9595&lt;/cargo.servlet.port&gt;
-              &lt;cargo.datasource.datasource.users&gt;
-                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
-              &lt;/cargo.datasource.datasource.users&gt;
-              &lt;cargo.datasource.datasource.builds&gt;
-                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
-              &lt;/cargo.datasource.datasource.builds&gt;
-              &lt;cargo.resource.resource.mail&gt;
-                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
-              &lt;/cargo.resource.resource.mail&gt;
-            &lt;/properties&gt;
-            &lt;deployables&gt;
-              &lt;deployable&gt;
-                &lt;groupId&gt;${project.goupId}&lt;/groupId&gt;
-                &lt;artifactId&gt;continuum-webapp&lt;/artifactId&gt;
-                &lt;type&gt;war&lt;/type&gt;
-                &lt;properties&gt;
-                  &lt;context&gt;continuum&lt;/context&gt;
-                &lt;/properties&gt;
-              &lt;/deployable&gt;
-            &lt;/deployables&gt;
-          &lt;/configuration&gt;
-        &lt;/configuration&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
         &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
         &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
+        &lt;configuration&gt;
+          &lt;suiteXmlFiles&gt;
+            &lt;suiteXmlFile&gt;src/test/testng/config/testng.xml&lt;/suiteXmlFile&gt;
+          &lt;/suiteXmlFiles&gt;
+        &lt;/configuration&gt;
         &lt;executions&gt;
           &lt;execution&gt;
             &lt;id&gt;integration-tests&lt;/id&gt;
@@ -170,28 +81,52 @@
             &lt;goals&gt;
               &lt;goal&gt;test&lt;/goal&gt;
             &lt;/goals&gt;
+            &lt;configuration&gt;
+              &lt;systemProperties&gt;
+                &lt;property&gt;
+                  &lt;name&gt;baseUrl&lt;/name&gt;
+                  &lt;value&gt;${baseUrl}&lt;/value&gt;
+                &lt;/property&gt;
+                &lt;property&gt;
+                  &lt;name&gt;browser&lt;/name&gt;
+                  &lt;value&gt;${browser}&lt;/value&gt;
+                &lt;/property&gt;
+                &lt;property&gt;
+                  &lt;name&gt;seleniumHost&lt;/name&gt;
+                  &lt;value&gt;${seleniumHost}&lt;/value&gt;
+                &lt;/property&gt;
+                &lt;property&gt;
+                  &lt;name&gt;seleniumPort&lt;/name&gt;
+                  &lt;value&gt;${seleniumPort}&lt;/value&gt;
+                &lt;/property&gt;
+              &lt;/systemProperties&gt;
+            &lt;/configuration&gt;
           &lt;/execution&gt;
         &lt;/executions&gt;
       &lt;/plugin&gt;
     &lt;/plugins&gt;
   &lt;/build&gt;
+
   &lt;dependencies&gt;
     &lt;dependency&gt;
-      &lt;groupId&gt;org.openqa.selenium.client-drivers&lt;/groupId&gt;
-      &lt;artifactId&gt;selenium-java-client-driver&lt;/artifactId&gt;
+      &lt;groupId&gt;org.testng&lt;/groupId&gt;
+      &lt;artifactId&gt;testng&lt;/artifactId&gt;
+      &lt;version&gt;5.8&lt;/version&gt;
       &lt;scope&gt;test&lt;/scope&gt;
+      &lt;classifier&gt;jdk15&lt;/classifier&gt;
     &lt;/dependency&gt;
+
     &lt;dependency&gt;
-      &lt;groupId&gt;org.openqa.selenium.client-drivers&lt;/groupId&gt;
-      &lt;artifactId&gt;selenium-java-client-driver&lt;/artifactId&gt;
-      &lt;version&gt;0.8.1&lt;/version&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
+      &lt;groupId&gt;commons-io&lt;/groupId&gt;
+      &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
+      &lt;version&gt;1.4&lt;/version&gt;
     &lt;/dependency&gt;
     
     &lt;!-- deployables --&gt;
     &lt;dependency&gt;
       &lt;groupId&gt;org.apache.continuum&lt;/groupId&gt;
       &lt;artifactId&gt;continuum-webapp&lt;/artifactId&gt;
+      &lt;version&gt;${project.version}&lt;/version&gt;
       &lt;type&gt;war&lt;/type&gt;
     &lt;/dependency&gt;
 
@@ -199,33 +134,215 @@
     &lt;dependency&gt;
       &lt;groupId&gt;org.apache.derby&lt;/groupId&gt;
       &lt;artifactId&gt;derby&lt;/artifactId&gt;
+      &lt;version&gt;10.1.3.1&lt;/version&gt;
     &lt;/dependency&gt;
     &lt;dependency&gt;
       &lt;groupId&gt;javax.mail&lt;/groupId&gt;
       &lt;artifactId&gt;mail&lt;/artifactId&gt;
+      &lt;version&gt;1.4&lt;/version&gt;
     &lt;/dependency&gt;
     &lt;dependency&gt;
       &lt;groupId&gt;javax.activation&lt;/groupId&gt;
       &lt;artifactId&gt;activation&lt;/artifactId&gt;
+      &lt;version&gt;1.1&lt;/version&gt;
+    &lt;/dependency&gt;
+
+    &lt;!-- dependencies below are for code in src/test/it --&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.codehaus.plexus&lt;/groupId&gt;
+      &lt;artifactId&gt;plexus-utils&lt;/artifactId&gt;
+      &lt;version&gt;1.4&lt;/version&gt;
+    &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.seleniumhq.selenium.server&lt;/groupId&gt;
+      &lt;artifactId&gt;selenium-server&lt;/artifactId&gt;
+      &lt;version&gt;1.0.1&lt;/version&gt;
+      &lt;exclusions&gt;
+        &lt;exclusion&gt;
+          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
+          &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
+        &lt;/exclusion&gt;
+      &lt;/exclusions&gt;
     &lt;/dependency&gt;
+    &lt;dependency&gt;
+      &lt;groupId&gt;org.seleniumhq.selenium.client-drivers&lt;/groupId&gt;
+      &lt;artifactId&gt;selenium-java-client-driver&lt;/artifactId&gt;
+      &lt;version&gt;1.0.1&lt;/version&gt;
+      &lt;scope&gt;test&lt;/scope&gt;
+      &lt;exclusions&gt;
+        &lt;exclusion&gt;
+          &lt;groupId&gt;commons-logging&lt;/groupId&gt;
+          &lt;artifactId&gt;commons-logging&lt;/artifactId&gt;
+        &lt;/exclusion&gt;
+      &lt;/exclusions&gt;
+    &lt;/dependency&gt;
+
   &lt;/dependencies&gt;
 
   &lt;profiles&gt;
     &lt;profile&gt;
+      &lt;id&gt;create-container&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;!container&lt;/name&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;build&gt;
+        &lt;plugins&gt;
+          &lt;plugin&gt;
+            &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
+            &lt;artifactId&gt;cargo-maven2-plugin&lt;/artifactId&gt;
+            &lt;version&gt;1.0&lt;/version&gt;
+            &lt;executions&gt;
+              &lt;execution&gt;
+                &lt;id&gt;start-container&lt;/id&gt;
+                &lt;phase&gt;pre-integration-test&lt;/phase&gt;
+                &lt;goals&gt;
+                  &lt;goal&gt;start&lt;/goal&gt;
+                &lt;/goals&gt;
+                &lt;configuration&gt;
+                  &lt;wait&gt;false&lt;/wait&gt;
+                &lt;/configuration&gt;
+              &lt;/execution&gt;
+              &lt;execution&gt;
+                &lt;id&gt;stop-container&lt;/id&gt;
+                &lt;phase&gt;post-integration-test&lt;/phase&gt;
+                &lt;goals&gt;
+                  &lt;goal&gt;stop&lt;/goal&gt;
+                &lt;/goals&gt;
+              &lt;/execution&gt;
+            &lt;/executions&gt;
+            &lt;configuration&gt;
+              &lt;container&gt;
+                &lt;containerId&gt;${container.name}&lt;/containerId&gt;
+                &lt;zipUrlInstaller&gt;
+                  &lt;url&gt;${container.url}&lt;/url&gt;
+                  &lt;installDir&gt;${cargo.installs.directory}/${container.name}&lt;/installDir&gt;
+                &lt;/zipUrlInstaller&gt;
+                &lt;log&gt;${project.build.directory}/logs/${container.name}.log&lt;/log&gt;
+                &lt;output&gt;${project.build.directory}/logs/${container.name}.out&lt;/output&gt;
+                &lt;timeout&gt;600000&lt;/timeout&gt;
+                &lt;systemProperties&gt;
+                  &lt;appserver.base&gt;${project.build.directory}&lt;/appserver.base&gt;
+                  &lt;derby.system.home&gt;${project.build.directory}&lt;/derby.system.home&gt;
+                &lt;/systemProperties&gt;
+                &lt;dependencies&gt;
+                  &lt;dependency&gt;
+                    &lt;groupId&gt;org.apache.derby&lt;/groupId&gt;
+                    &lt;artifactId&gt;derby&lt;/artifactId&gt;
+                  &lt;/dependency&gt;
+                  &lt;dependency&gt;
+                    &lt;groupId&gt;javax.mail&lt;/groupId&gt;
+                    &lt;artifactId&gt;mail&lt;/artifactId&gt;
+                  &lt;/dependency&gt;
+                  &lt;dependency&gt;
+                    &lt;groupId&gt;javax.activation&lt;/groupId&gt;
+                    &lt;artifactId&gt;activation&lt;/artifactId&gt;
+                  &lt;/dependency&gt;
+                &lt;/dependencies&gt;
+              &lt;/container&gt;
+              &lt;configuration&gt;
+                &lt;home&gt;${project.build.directory}/${container.name}&lt;/home&gt;
+                &lt;type&gt;standalone&lt;/type&gt;
+                &lt;properties&gt;
+                  &lt;cargo.servlet.port&gt;9595&lt;/cargo.servlet.port&gt;
+                  &lt;cargo.datasource.datasource.users&gt;
+                    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
+                  &lt;/cargo.datasource.datasource.users&gt;
+                  &lt;cargo.datasource.datasource.builds&gt;
+                    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
+                  &lt;/cargo.datasource.datasource.builds&gt;
+                  &lt;cargo.resource.resource.mail&gt;
+                    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
+                  &lt;/cargo.resource.resource.mail&gt;
+                &lt;/properties&gt;
+                &lt;deployables&gt;
+                  &lt;deployable&gt;
+                    &lt;groupId&gt;${project.goupId}&lt;/groupId&gt;
+                    &lt;artifactId&gt;continuum-webapp&lt;/artifactId&gt;
+                    &lt;type&gt;war&lt;/type&gt;
+                    &lt;properties&gt;
+                      &lt;context&gt;continuum&lt;/context&gt;
+                    &lt;/properties&gt;
+                  &lt;/deployable&gt;
+                &lt;/deployables&gt;
+              &lt;/configuration&gt;
+            &lt;/configuration&gt;
+          &lt;/plugin&gt;
+        &lt;/plugins&gt;
+      &lt;/build&gt;
+    &lt;/profile&gt;
+    &lt;profile&gt;
+      &lt;id&gt;start-selenium&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;!seleniumHost&lt;/name&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;properties&gt;
+        &lt;seleniumHost&gt;localhost&lt;/seleniumHost&gt;
+        &lt;seleniumPort&gt;4444&lt;/seleniumPort&gt;
+      &lt;/properties&gt;
+      &lt;build&gt;
+        &lt;plugins&gt;
+          &lt;plugin&gt;
+            &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
+            &lt;artifactId&gt;selenium-maven-plugin&lt;/artifactId&gt;
+            &lt;executions&gt;
+              &lt;execution&gt;
+                &lt;phase&gt;pre-integration-test&lt;/phase&gt;
+                &lt;goals&gt;
+                  &lt;goal&gt;start-server&lt;/goal&gt;
+                &lt;/goals&gt;
+                &lt;configuration&gt;
+                  &lt;background&gt;true&lt;/background&gt;
+                  &lt;port&gt;${seleniumPort}&lt;/port&gt;
+                  &lt;logOutput&gt;true&lt;/logOutput&gt;      
+                &lt;/configuration&gt;
+              &lt;/execution&gt;
+            &lt;/executions&gt;
+          &lt;/plugin&gt;
+        &lt;/plugins&gt;
+      &lt;/build&gt;
+    &lt;/profile&gt;
+    &lt;profile&gt;
       &lt;id&gt;tomcat5x&lt;/id&gt;
       &lt;activation&gt;
-        &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
+        &lt;property&gt;
+          &lt;name&gt;!container&lt;/name&gt;
+        &lt;/property&gt;
       &lt;/activation&gt;
       &lt;properties&gt;
         &lt;container.name&gt;tomcat5x&lt;/container.name&gt;
-        &lt;container.url&gt;http://apache.mirrors.redwire.net/tomcat/tomcat-5/v5.5.27/bin/apache-tomcat-5.5.27.zip
-        &lt;/container.url&gt;
+        &lt;container.url&gt;http://apache.mirrors.redwire.net/tomcat/tomcat-5/v5.5.27/bin/apache-tomcat-5.5.27.zip&lt;/container.url&gt;
+      &lt;/properties&gt;
+    &lt;/profile&gt;
+    &lt;profile&gt;
+      &lt;id&gt;existing-container&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;!baseUrl&lt;/name&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;properties&gt;
+        &lt;baseUrl&gt;http://localhost:9595/continuum/&lt;/baseUrl&gt;
       &lt;/properties&gt;
     &lt;/profile&gt;
     &lt;profile&gt;
       &lt;id&gt;firefox&lt;/id&gt;
       &lt;activation&gt;
-        &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
+        &lt;property&gt;
+          &lt;name&gt;!browser&lt;/name&gt;
+        &lt;/property&gt;
       &lt;/activation&gt;
       &lt;properties&gt;
         &lt;browser&gt;*firefox&lt;/browser&gt;
@@ -233,17 +350,88 @@
     &lt;/profile&gt;
     &lt;profile&gt;
       &lt;id&gt;iexplore&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;browser&lt;/name&gt;
+          &lt;value&gt;iexplore&lt;/value&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
       &lt;properties&gt;
         &lt;browser&gt;*iexplore&lt;/browser&gt;
       &lt;/properties&gt;
     &lt;/profile&gt;
     &lt;profile&gt;
+      &lt;id&gt;safari&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;browser&lt;/name&gt;
+          &lt;value&gt;safari&lt;/value&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
+      &lt;properties&gt;
+        &lt;browser&gt;*safari&lt;/browser&gt;
+      &lt;/properties&gt;
+    &lt;/profile&gt;
+    &lt;profile&gt;
       &lt;id&gt;otherbrowser&lt;/id&gt;
+      &lt;activation&gt;
+        &lt;property&gt;
+          &lt;name&gt;browser&lt;/name&gt;
+          &lt;value&gt;other&lt;/value&gt;
+        &lt;/property&gt;
+      &lt;/activation&gt;
       &lt;properties&gt;
         &lt;browser&gt;*custom ${browserPath}&lt;/browser&gt;
       &lt;/properties&gt;
     &lt;/profile&gt;
-
+    &lt;profile&gt;
+      &lt;id&gt;headless&lt;/id&gt;
+      &lt;build&gt;
+        &lt;plugins&gt;
+          &lt;plugin&gt;
+            &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
+            &lt;artifactId&gt;selenium-maven-plugin&lt;/artifactId&gt;
+            &lt;executions&gt;
+              &lt;execution&gt;
+                &lt;id&gt;xvfb&lt;/id&gt;
+                &lt;phase&gt;validate&lt;/phase&gt;
+                &lt;goals&gt;
+                  &lt;goal&gt;xvfb&lt;/goal&gt;
+                &lt;/goals&gt;
+              &lt;/execution&gt;
+            &lt;/executions&gt;
+          &lt;/plugin&gt;
+        &lt;/plugins&gt;
+      &lt;/build&gt;
+    &lt;/profile&gt;
+  &lt;profile&gt;
+    &lt;id&gt;reporting&lt;/id&gt;
+      &lt;build&gt;
+        &lt;plugins&gt;
+          &lt;plugin&gt;
+            &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+            &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
+            &lt;configuration&gt;
+              &lt;testFailureIgnore&gt;true&lt;/testFailureIgnore&gt;
+            &lt;/configuration&gt;
+          &lt;/plugin&gt;
+        &lt;plugin&gt;
+          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
+          &lt;artifactId&gt;maven-surefire-report-plugin&lt;/artifactId&gt;
+          &lt;executions&gt;
+            &lt;execution&gt;
+              &lt;id&gt;report-only&lt;/id&gt;
+              &lt;goals&gt;
+                &lt;goal&gt;report-only&lt;/goal&gt;
+              &lt;/goals&gt;
+            &lt;/execution&gt;
+          &lt;/executions&gt;
+        &lt;/plugin&gt;
+      &lt;/plugins&gt;
+    &lt;/build&gt;
+  &lt;/profile&gt;
   &lt;/profiles&gt;
-
+  &lt;properties&gt;
+    &lt;cargo.installs.directory&gt;${basedir}/target/installs&lt;/cargo.installs.directory&gt;
+  &lt;/properties&gt;
 &lt;/project&gt;

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/pom2.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/pom2.xml?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/pom2.xml (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/pom2.xml Tue Nov 10 05:38:01 2009
@@ -1,160 +0,0 @@
-&lt;?xml version='1.0' encoding='UTF-8'?&gt;
-&lt;!--
-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.
---&gt;
-&lt;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"&gt;
-  &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
-  &lt;parent&gt;
-    &lt;groupId&gt;org.apache.continuum&lt;/groupId&gt;
-    &lt;artifactId&gt;continuum&lt;/artifactId&gt;
-    &lt;version&gt;1.3.2-SNAPSHOT&lt;/version&gt;
-  &lt;/parent&gt;
-  &lt;artifactId&gt;continuum-webapp-test&lt;/artifactId&gt;
-  &lt;name&gt;Continuum Webapp Test&lt;/name&gt;
-  &lt;packaging&gt;pom&lt;/packaging&gt;
-
-  &lt;description&gt;Selenium tests for Continuum Webapp using JUnit TestSetup class&lt;/description&gt;
-
-  &lt;build&gt;
-    &lt;testSourceDirectory&gt;src/test/pom2&lt;/testSourceDirectory&gt;
-    &lt;plugins&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
-        &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
-        &lt;configuration&gt;
-          &lt;source&gt;1.5&lt;/source&gt;
-          &lt;target&gt;1.5&lt;/target&gt;
-          &lt;verbose&gt;true&lt;/verbose&gt;
-        &lt;/configuration&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;testCompile&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;artifactId&gt;maven-resources-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;testResources&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
-        &lt;artifactId&gt;selenium-maven-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;phase&gt;pre-integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;start-server&lt;/goal&gt;
-            &lt;/goals&gt;
-            &lt;configuration&gt;
-              &lt;background&gt;true&lt;/background&gt;
-            &lt;/configuration&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-      &lt;/plugin&gt;
-      &lt;plugin&gt;
-        &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
-        &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
-        &lt;executions&gt;
-          &lt;execution&gt;
-            &lt;id&gt;integration-tests&lt;/id&gt;
-            &lt;phase&gt;integration-test&lt;/phase&gt;
-            &lt;goals&gt;
-              &lt;goal&gt;test&lt;/goal&gt;
-            &lt;/goals&gt;
-          &lt;/execution&gt;
-        &lt;/executions&gt;
-        &lt;configuration&gt;
-          &lt;systemProperties&gt;
-            &lt;property&gt;
-              &lt;name&gt;url&lt;/name&gt;
-              &lt;value&gt;http://localhost:8080/continuum-webapp-${project.version}&lt;/value&gt;
-            &lt;/property&gt;
-            &lt;property&gt;
-              &lt;name&gt;cargo.container.home&lt;/name&gt;
-              &lt;value&gt;${cargo.container.home}&lt;/value&gt;
-            &lt;/property&gt;
-            &lt;property&gt;
-              &lt;name&gt;cargo.container.output&lt;/name&gt;
-              &lt;value&gt;${basedir}/target/container.output&lt;/value&gt;
-            &lt;/property&gt;
-            &lt;property&gt;
-              &lt;name&gt;cargo.container.log&lt;/name&gt;
-              &lt;value&gt;${basedir}/target/container.log&lt;/value&gt;
-            &lt;/property&gt;
-            &lt;property&gt;
-              &lt;name&gt;cargo.deployable&lt;/name&gt;
-              &lt;value&gt;${basedir}/../continuum-webapp/target/continuum-webapp-1.3.2-SNAPSHOT.war&lt;/value&gt;
-              &lt;!--value&gt;${settings.localRepository}/org/apache/continuum/continuum-webapp/1.3.2-SNAPSHOT/continuum-webapp-1.3.2-SNAPSHOT.war&lt;/value--&gt;
-            &lt;/property&gt;
-          &lt;/systemProperties&gt;
-        &lt;/configuration&gt;
-      &lt;/plugin&gt;
-    &lt;/plugins&gt;
-  &lt;/build&gt;
-  &lt;dependencies&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;junit&lt;/groupId&gt;
-      &lt;artifactId&gt;junit&lt;/artifactId&gt;
-      &lt;version&gt;3.8.1&lt;/version&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.openqa.selenium.client-drivers&lt;/groupId&gt;
-      &lt;artifactId&gt;selenium-java-client-driver&lt;/artifactId&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.openqa.selenium.client-drivers&lt;/groupId&gt;
-      &lt;artifactId&gt;selenium-java-client-driver&lt;/artifactId&gt;
-      &lt;version&gt;0.8.1&lt;/version&gt;
-      &lt;scope&gt;test&lt;/scope&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.apache.continuum&lt;/groupId&gt;
-      &lt;artifactId&gt;continuum-webapp&lt;/artifactId&gt;
-      &lt;version&gt;${project.version}&lt;/version&gt;
-      &lt;type&gt;war&lt;/type&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-      &lt;groupId&gt;org.openqa.selenium.server&lt;/groupId&gt;
-      &lt;artifactId&gt;selenium-server&lt;/artifactId&gt;
-      &lt;version&gt;0.8.1&lt;/version&gt;
-    &lt;/dependency&gt;
-
-    &lt;dependency&gt;
-        &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
-        &lt;artifactId&gt;cargo-core-uberjar&lt;/artifactId&gt;
-        &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
-        &lt;optional&gt;true&lt;/optional&gt;
-    &lt;/dependency&gt;
-    &lt;dependency&gt;
-        &lt;groupId&gt;org.codehaus.cargo&lt;/groupId&gt;
-        &lt;artifactId&gt;cargo-ant&lt;/artifactId&gt;
-        &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
-        &lt;optional&gt;true&lt;/optional&gt;
-    &lt;/dependency&gt;
-  &lt;/dependencies&gt;
-&lt;/project&gt;

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/site/apt/index.apt
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/site/apt/index.apt?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/site/apt/index.apt (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/site/apt/index.apt Tue Nov 10 05:38:01 2009
@@ -0,0 +1,503 @@
+  ----
+  Continuum Webapp Test
+  ----
+
+~~ 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.
+
+~~ NOTE: For help with the syntax of this file, see:
+~~ http://maven.apache.org/doxia/references/apt-format.html
+
+
+Continuum Webapp Test
+ 
+* Contents
+
+	* {{{About_the_Continuum_Webapp_Tests}About the Continuum Webapp Tests}}
+	
+	* {{Pre-requisites}}
+	
+	* {{{Getting_the_Source_from_the_Repository} Getting the Source from the Repository}}
+	
+	* {{{Running_the_Tests} Running the Tests}}
+	
+	* {{{Viewing_the_Test_Results} Viewing the Test Results}}
+	
+	* {{{Test_Coverage}Test Coverage}}
+	
+	* {{{Adding_New_Tests} Adding New Tests}}
+	
+	* {{{Improving_the_Existing_Tests} Improving the Existing Tests}}
+	
+	* {{{Creating_Patches} Creating Patches}}
+	
+	* {{{Submitting_Patches} Submitting Patches}}	
+	
+
+* {About the Continuum Webapp Tests}
+
+	{{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test}Continuum web app tests}} depends on {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp} continuum-webapp}} module of Continuum. It depends on a successful build result in {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x} continuum-1.3.x}}. 
+
+** Automation Tool
+	
+	The module makes use of the latest {{{http://seleniumhq.org/projects/remote-control/} Selenium Remote Control}} release (1.0.1)
+	
+		* {{{http://release.seleniumhq.org/selenium-remote-control/1.0-beta-2/doc/java/} selenium-java-client-driver}}
+		
+		* {{{http://release.seleniumhq.org/selenium-remote-control/1.0-beta-2/doc/server/} selenium-server}}
+		
+		&lt;Note: Documents for 1.0.1 are not yet available for both selenium java client driver and selenium server. The above links direct to 1.0-beta-2 docs.&gt;
+		
+** Maven Plugins
+	
+	The module makes use of the following maven plugins:
+	
+		* {{{http://cargo.codehaus.org/Maven2+plugin} cargo-maven2-plugin}} who is in-charge on the start-up of the container {{{http://apache.mirrors.redwire.net/tomcat/tomcat-5/v5.5.27/bin/apache-tomcat-5.5.27.zip]} tomcat5x}}, deployment of the application to the container and stopping the container. 
+		
+		* {{{http://mojo.codehaus.org/selenium-maven-plugin/} selenium-maven-plugin}} who is in-charge on starting/stopping the selenium server, running a suite of HTML Selenese tests and starting an Xvfb instance suitable for handling X11 displays for headless systems.
+		
+		*{{{http://maven.apache.org/plugins/maven-surefire-plugin/} maven-surefire-plugin}} and {{{http://maven.apache.org/plugins/maven-surefire-report-plugin/} maven-surefire-report-plugin}} for reporting.
+		
+** Testing Framework
+
+	Continuum web app tests module uses TestNG for the following reasons:
+
+		* flexibility (coding convention), 
+		
+		* dependency testing (skipping not failing), 
+		
+		* fail and rerun (handy in large test suite) and 
+		
+		* parametric testing ( reusing generic test) features. 
+		
+		More on TestNG {{{http://testng.org/doc/documentation-main.html}here}}.
+
+	View the module's pom.xml {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/pom.xml}here}}
+
+* {Pre-requisites}
+
+		* {{{http://java.sun.com/javase/downloads/index.jsp}JDK 1.5 or higher}}
+
+		* {{{http://maven.apache.org/download.html}Maven 2.0.9 or higher}}
+
+		* {{{http://subversion.tigris.org/}Subversion}}
+
+	Installation instructions for Windows and Unix-based systems can be found {{{http://maven.apache.org/download.html}here}}
+
+* {Getting the Source from the Repository}
+
+	Checkout continuum 1.3.x branch {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x}here}}.
+
++-----------------------------------------------------------------------------+
+svn co https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x continuum-1.3.x
+or
+svn co http://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x continuum-1.3.x
++-----------------------------------------------------------------------------+
+
+* {Running the Tests}
+
+	Getting started with the tests:
+
+	After getting the source from the repository, execute the following:
+	
++-----------------------------------------------------------------------------+
+cd /path/to/continuum-1.3.x/
+mvn clean install
++-----------------------------------------------------------------------------+
+
+
+	&lt;&lt;Reminder: continuum-1.3.x must have a successful build or else there's no way to run continuum-webapp-test successfully.&gt;&gt;	
+
+	
++-----------------------------------------------------------------------------+
+cd /path/to/continuum-1.3.x/continuum-webapp-test/
++-----------------------------------------------------------------------------+
+
+	Default configuration (i.e. App's Base URL, Selenium Host, Selenium Port's values, etc.) are stored in a property file that can be found in &lt;&lt;/path/to/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties&gt;&gt; (or {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties}here}}). You may change the values in it before executing the next command.
+
++-----------------------------------------------------------------------------+
+mvn clean install
++-----------------------------------------------------------------------------+
+
+	This command will:
+
+		* build the application from source
+	
+		* deploy the packaged application to a container and start it
+	
+		*  start the selenium server
+
+		*  start the selenium tests by launching the selenium test runner and the application under test (AUT)
+		
+		For every test failure encountered, {{{http://testng.org/doc/documentation-main.html#logging-listeners}TestNG Listeners}} will call selenium's windowMaximize and captureEntirePageScreenshot commands. This will maximize the application-under-test (AUT) browser then do a screen capture of the page and saves it as an image file with .png extension.
+		
+		View the code {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java}here}} 
+		
+		* kill the selenium server after the tests are done
+		
+		* stop the app server (container)
+		
+		* return the results of the build (summary, reports, screen shots)
+
+[]
+
+** {Running selected tests by editing testng.xml}
+
+	Continuum web app tests is invoked with a {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng.xml}testng.xml}} file. The contents of that xml file is displayed below and/or this could be found in &lt;&lt;/path/to/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/&gt;&gt; directory.
+
++---------------------------------------------------------+
+&lt;suite name="ContinuumTest" verbose="1"&gt;
+   &lt;test name="BasicTest" enabled="true"&gt;
+     &lt;groups&gt;
+	&lt;run&gt;
+	   &lt;include name="about" /&gt;
+	&lt;/run&gt;
+     &lt;/groups&gt;
+     &lt;packages&gt;
+	&lt;package name="org.apache.continuum.web.test" /&gt;
+     &lt;/packages&gt;
+   &lt;/test&gt;
+   &lt;test name="AdminTest" enabled="true"&gt;
+     &lt;groups&gt;
+	&lt;run&gt;
+	   &lt;include name="login" /&gt;
+	   &lt;include name="mavenTwoProject"/&gt;								
+	   &lt;include name="projectGroup" /&gt;				
+      	   &lt;include name="mavenOneProject" /&gt;
+      	   &lt;include name="antProject" /&gt;
+      	   &lt;include name="shellProject" /&gt;
+           &lt;include name="buildDefinition" /&gt;
+           &lt;include name="notifier" /&gt;
+	   &lt;include name="schedule" /&gt;
+	   &lt;include name="myAccount" /&gt;
+	   &lt;include name="queue" /&gt;
+	   &lt;include name="purge" /&gt;
+	   &lt;include name="repository" /&gt;
+	   &lt;include name="configuration" /&gt;
+	   &lt;include name="installation" /&gt;
+	   &lt;include name="buildEnvironment" /&gt;
+	   &lt;include name="buildDefinitionTemplate" /&gt;
+	   &lt;include name="userroles"/&gt;
+	   &lt;include name="agent"/&gt;
+	&lt;/run&gt;
+     &lt;/groups&gt;
+     &lt;packages&gt;
+	&lt;package name="org.apache.continuum.web.test" /&gt;
+     &lt;/packages&gt;
+   &lt;/test&gt;
+&lt;/suite&gt;
++---------------------------------------------------------+
+
+	The order of the build when running the tests is defined in the annotations of each test. Groups are divided into unit tests. If want to run a specific test, you may edit the testng.xml file and exclude the undesired tests to be ran.
+
++---------------------------------------------------------+
+Example:
+
+&lt;test name="AdminTest" enabled="true"&gt;
+     &lt;groups&gt;
+	&lt;run&gt;
+	   &lt;include name="login" /&gt;
+	   &lt;exclude name="mavenTwoProject"/&gt;								
+	   &lt;exclude name="projectGroup" /&gt;				
+      	   &lt;exclude name="mavenOneProject" /&gt;
+      	   &lt;include name="antProject" /&gt;
+      	   &lt;exclude name="shellProject" /&gt;
+           ...
+           ...
+           ...
+	&lt;/run&gt;
+     &lt;/groups&gt;
+     &lt;packages&gt;
+	&lt;package name="org.apache.continuum.web.test" /&gt;
+     &lt;/packages&gt;
+   &lt;/test&gt;
++---------------------------------------------------------+
+
+	More information about testng.xml {{{http://testng.org/doc/documentation-main.html#testng-xml}here}}.
+
+
+** Running the tests with different container and/or browsers
+
+*** Running Selenium tests in an alternate browser
+
+	Modify src/test/resources/testng.properties as needed then execute:
+	
++---------------------------------------------------------+
+mvn clean install -Dbrowser=iexplore  (or -Dbrowser=safari or -Dbrowser=other -DbrowserPath=/path/to/browser)
++---------------------------------------------------------+
+
+*** Running Selenium tests against an existing Continuum instance
+
+	Modify src/test/resources/testng.properties as needed, then execute:
+	
++---------------------------------------------------------+
+mvn clean install -Dexisting-container
++---------------------------------------------------------+
+
+	(This skips the Cargo plugin configuration that starts a container with the Continuum webapp deployed)
+
+*** Test with Firefox and Selenium IDE
+
+	continuum-webapp-test also has Selenium IDE scripts. Here's how you should run it:
+
+		* Start Continuum
+		
+		* Open Firefox and navigate to Continuum (it should be on the "Create Admin User" page.)
+		
+		* in Firefox, Tools -&gt; Selenium IDE 
+		
+		* in Selenium IDE, File -&gt; Open Test Suite and choose src/test/selenium-ide/continuum_test_suite.html
+		
+		* 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
+
+* {Viewing the Test Results}
+
+** Surefire-reports
+
+	After running the continuum webapp tests, cd to &lt;&lt;/path/to/continuum-1.3.x/continuum-webapp-test/target/surefire-reports/&gt;&gt; and open the index.html file.
+	
+	Click the 'ContinuumTest' suite link
+	
+	Click the 'Results' link to view the summary of the tests. (Passed/Failed/Skipped)
+	
+** Screenshots
+
+	If there are test failures, cd to &lt;&lt;/path/to/continuum-1.3.x/continuum-webapp-test/target/screenshots/&gt;&gt; to view the captured image files.
+	
+	Screen shots are saved with the format "methodName(className.java_lineNumber)-time.png" in order to easily debug the error encountered.
+
+* {Test Coverage}
+
+	Test scripts available {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/}here}} automate the various {{{http://continuum.apache.org/features.html}features}} of Continuum. Listed below are the existing scripts with which you can help improve the testing process or you may contribute on any areas you see not covered.
+
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java}About}}
+
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java}Login}}
+
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java}My Account}}
+
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java}Project Groups}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java}Maven 1.0.X Projects}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java}Maven 2.0.X Projects}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java}Ant Projects}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java}Shell Projects}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java}Local Repository}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java}Installation}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java}Purge Configurations}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java}Schedules}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java}Configurations}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java}User Roles Management}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java}Build Environments}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java}Queues}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java}Build Definition}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java}Build Definition Templates}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java}Distributed Builds}}
+	
+	* {{{https://svn.apache.org/repos/asf/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java}Build Notification}}
+	
+	[]
+
+** Continuum Feature/s for development:
+
+	* Release Projects
+	
+[]
+	
+	If you would like to be involved, start by reading the Continuum {{{http://continuum.apache.org/docs/}documentation}} to familiarize yourself with the features of the application. 
+
+
+* {Adding New Tests}
+
+	This section will guide you on how to contribute new script/s to run with the existing ones.
+
+	You can find out what features already have tests by looking at the source code of the scripts on the {{{Test_Coverage} Test Coverage}} section. If you look at the scripts, you can see which features have lots of tests and which need more. But note that even if the coverage looks good, there may be more interesting tests to write.
+
+** Directory where to add new tests
+
+	Once you have written a good test scenario, the script must be placed in this directory:
+
++---------------------------------------------------------+
+/path/to/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/
++---------------------------------------------------------+
+
+	Put your abstract classes in this directory:
+	
++---------------------------------------------------------+
+/path/to/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/
++---------------------------------------------------------+
+
+~~** Order where to put the new class
+** Editing the testng.xml file to include the new class / group
+
+	* Edit the testng.xml (refer to {{{Running_selected_tests_by_editing_testng.xml} Editing testng.xml}}) to include the newly created script. 
+	
+	* Run the test suite (refer to {{{Running_the_Tests} Running the Tests}}) to check if it will build successfully. 
+
+	[]
+	Once you have a successful build in continuum-webapp-test, you are now ready to create a patch and submit your work to the community. Just follow the guidelines on the {{{Creating_Patches} Creating Patches}} and {{{Submitting_Patches} Submitting Patches}} section.
+
+* {Improving the Existing Tests}
+
+	The listed items on continuum-webapp-test Test Coverage are not yet complete. Releasing Projects is one of the features listed for development but basically, the existing scripts still have missing scenarios that need to be completed, such as:
+
+	[[1]] Functions of Continuum Features to Projects
+	
+	* Wide use of Continuum features to different projects (i.e. the use of different build definitions, schedules, queues, agent, etc. ) --ant, shell, maven1, maven2.
+	
+	
+	[]
+	
+	[[2]] User Roles Test
+	
+	* User roles tests only have scripts for assertion of elements on the specific roles. Tests for user roles should include its specific function on Continuum.
+	
+	[]
+	
+	[[3]]Logo / Headers / Footers
+	
+	* Assertion of Logo / Headers / Footers on each page (or scenarios) are not yet implemented.
+	
+	[]
+	
+	[[4]]Optimization of the Automation Tool and Test Framework
+	
+	* Selenium and TestNG have lots of capabilities that will help improve the existing tests. Discussed below are the items that are not yet implemented on the existing tests:
+For reporting, the generated report of surefire for TestNG has a text and html file. Improving the html file that would link to the screenshots of the failed tests would help a lot.
+	
+	* The wide use of TestNG, i.e. The use or @Parameters for values to be used on that specific test class. It will help developers not to be confused with regards to values that are placed in the property files (lots of values on that file) and those values will also be placed on the TestNG report. 
+
+[]
+
+	As listed above, those are just examples on how to improve Continuum's existing tests. As you go along with the scripts, you may encounter scenarios that need to be modified so that it will be easily read by fellow developers. Tests contributions are welcome in this community. See {{{Adding_New_Tests} Adding New Tests}} section on how.
+
+
+
+* {Creating Patches}
+
+	After adding new tests or improving existing tests, the next step is to create a patch.
+
+	Below are the steps needed for creating patches:
+
+	* Update the version of the project's source. 
+	
++---------------------------------------------------------+
+svn up
++---------------------------------------------------------+
+
+	* Ensure that the project will build successfully (from 1.3.x branch) and that your modification will not break anything
+	
++---------------------------------------------------------+
+mvn clean install
++---------------------------------------------------------+
+	
+	* Go to the directory where the modifications are done. Verify if the module's build is working. (i.e. /path/to/continuum-1.3.x/continuum-webapp-test/)
+	
++---------------------------------------------------------+
+mvn clean install
++---------------------------------------------------------+
+
+	* After a successful build, add the new tests to version control.
+	
+
+		Directory:
+	
++---------------------------------------------------------+
+svn add /path/to/the/new_module/
++---------------------------------------------------------+
+
+		
+		File:
+	
++---------------------------------------------------------+
+svn add /path/to/the/new_module/file.extension
++---------------------------------------------------------+
+
+	Note: If the modifications are made to the existing files which are already under version control, there is no need to do "svn add".
+	
+	* Create the patch from the 1.3.x branch
+	
++---------------------------------------------------------+
+cd /path/to/continuum-1.3.x/
++---------------------------------------------------------+
+
++---------------------------------------------------------+
+svn diff &gt; PatchName.patch
++---------------------------------------------------------+
+
+	* Verify the content of the generated patch by viewing the file using any text editor. It should display all the intended changes.
+
+* {Submitting Patches}
+
+	After creating the patch, the next step is to contribute by sending the patch to the community!
+	
+	* If you don't have a codehaus jira account yet, sign up {{{http://jira.codehaus.org/secure/Signup!default.jspa} here}}
+	
+	* Login using your account
+	
+	* Go to {{{http://jira.codehaus.org/browse/CONTINUUM}Continuum}} project
+	
+	* Create a new issue with the appropriate issue type (bug, improvement, feature, test, etc)
+	
+	* Provide a good summary
+	
++---------------------------------------------------------+
+New Tests for X Feature
+or 
+Improve Tests for an Existing X Feature
++---------------------------------------------------------+
+
+	* Provide the environment details
+	
++---------------------------------------------------------+
+Windows/Linux/Mac
+Maven version
+Java version
++---------------------------------------------------------+
+
+	* Provide the description
+	
++---------------------------------------------------------+
+Describe what the patch is for. (changes made to the existing version)
+Post the results of the build (test runs, failures, errors etc)
++---------------------------------------------------------+
+
+	* Don't forget to add your patch as an attachment. Tick the 'Patch Submitted' box then click the 'Create' button.
+
+
+	&lt;&lt;If nothing happens in a few days, write to the {{{mailto:dev@continuum.apache.org}dev list}} and nudge the developers to review your patch.&gt;&gt;
+
+		
+
+
+

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractContinuumTestCase.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractContinuumTestCase.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractContinuumTestCase.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractContinuumTestCase.java Tue Nov 10 05:38:01 2009
@@ -64,7 +64,7 @@
 
     public void assertHeader()
     {
-        assertElementPresent( "xpath=//img[@alt='Continuum']" );
+        assertImgWithAlt( "Continuum" );
         assertLinkPresent( "Continuum" );
         assertLinkPresent( "Maven" );
         assertLinkPresent( "Apache" );
@@ -90,7 +90,7 @@
         assertPage( "Continuum - About" );
         assertTextPresent( "About Continuum" );
         assertTextPresent( "Version:" );
-        assertTextPresent( "1.3.2-SNAPSHOT" );
+        assertTextPresent( "1.4.0-SNAPSHOT" );
         assertTextPresent( "Build Number:" );
     }
 
@@ -123,9 +123,8 @@
     //////////////////////////////////////
     public void assertAddProjectPage( String type )
     {
-        String title = type.substring( 0, 1 ).toUpperCase() + type.substring( 1 ).toLowerCase();
-        assertPage( "Continuum - Add" + title + " Project" );
-        assertTextPresent( "Add " + title + " Project" );
+        assertPage( "Continuum - Add " + type + " Project" );
+        assertTextPresent( "Add " + type + " Project" );
         assertTextPresent( "Project Name*:" );
         assertElementPresent( "projectName" );
         assertTextPresent( "Description:" );
@@ -149,12 +148,12 @@
 
     public void assertAddAntProjectPage()
     {
-        assertAddProjectPage( "ant" );
+        assertAddProjectPage( "Ant" );
     }
 
     public void assertAddShellProjectPage()
     {
-        assertAddProjectPage( "shell" );
+        assertAddProjectPage( "Shell" );
     }
     
     //////////////////////////////////////
@@ -659,15 +658,15 @@
         	assertCellValueFromTable( "", tableElement, 0, 6 );
         	assertCellValueFromTable( "", tableElement, 0, 7 );
         	assertCellValueFromTable( "Total", tableElement, 0, 8 );
-        	assertCellValueFromTable( "Default Project Group", tableElement, 1, 0 );
-        	assertCellValueFromTable( "default", tableElement, 1, 1 );
+        	/*assertCellValueFromTable( "Default Project Group", tableElement, 1, 0 );
+        	assertCellValueFromTable( "default", tableElement, 1, 1 );*/
         	assertImgWithAlt( "Build all projects" );
         	assertImgWithAlt( "Release Group" );
         	assertImgWithAlt( "Delete Group" );
-        	assertCellValueFromTable( "0", tableElement, 1, 5 );
+        	/*assertCellValueFromTable( "0", tableElement, 1, 5 );
         	assertCellValueFromTable( "0", tableElement, 1, 6 );
         	assertCellValueFromTable( "0", tableElement, 1, 7 );
-        	assertCellValueFromTable( "0", tableElement, 1, 8 );
+        	assertCellValueFromTable( "0", tableElement, 1, 8 );*/
             
         }
     }
@@ -710,8 +709,8 @@
         assertElementPresent( "release" );
         assertElementPresent( "preferredExecutor" );
         assertButtonWithValuePresent("Add");
-        assertElementPresent( "remove" );
-        assertElementPresent( "cancel" );
+        assertButtonWithValuePresent("Delete Group");
+        assertButtonWithValuePresent("Cancel Group Build");
 
         if ( isTextPresent( "Member Projects" ) )
         {
@@ -940,7 +939,7 @@
         assertTextPresent( "Send on Failure" );
         assertTextPresent( "Send on Error" );
         assertTextPresent( "Send on Warning" );
-        assertTextPresent( "Send On SCM Failure" ); 
+        assertTextPresent( "Send on SCM Failure" ); 
         assertElementPresent( "Cancel" );
     }
 
@@ -1348,18 +1347,18 @@
 
     public void assertAddMavenTwoProjectPage()
     {
-        assertTextPresent( "POM Url*:" );
+        assertTextPresent( "POM Url" );
         assertElementPresent( "m2PomUrl" );
-        assertTextPresent( "Username:" );
+        assertTextPresent( "Username" );
         assertElementPresent( "scmUsername" );
-        assertTextPresent( "Password:" );
+        assertTextPresent( "Password" );
         assertElementPresent( "scmPassword" );
         assertElementPresent( "scmUseCache" );
-        assertTextPresent( "Upload POM:" );
+        assertTextPresent( "Upload POM" );
         assertElementPresent( "m2PomFile" );
-        assertTextPresent( "Project Group:" );
+        assertTextPresent( "Project Group" );
         assertElementPresent( "selectedProjectGroup" );
-        assertTextPresent( "Build Definition Template:" );
+        assertTextPresent( "Build Definition Template" );
         assertElementPresent( "buildDefinitionTemplateId" );
     }
 
@@ -1431,18 +1430,19 @@
 
     public void assertAddMavenOneProjectPage()
     {
-        assertTextPresent( "M1 POM Url:" );
+	assertPage( "Continuum - Add Maven 1 Project" );
+        assertTextPresent( "M1 POM Url" );
         assertElementPresent( "m1PomUrl" );
-        assertTextPresent( "Username:" );
+        assertTextPresent( "Username" );
         assertElementPresent( "scmUsername" );
-        assertTextPresent( "Password:" );
+        assertTextPresent( "Password" );
         assertElementPresent( "scmPassword" );
         assertElementPresent( "scmUseCache" );
-        assertTextPresent( "Upload POM:" );
+        assertTextPresent( "Upload POM" );
         assertElementPresent( "m1PomFile" );
-        assertTextPresent( "Project Group:" );
+        assertTextPresent( "Project Group" );
         assertElementPresent( "selectedProjectGroup" );
-        assertTextPresent( "Build Definition Template:" );
+        assertTextPresent( "Build Definition Template" );
         assertElementPresent( "buildDefinitionTemplateId" );
     }
 
@@ -1461,8 +1461,9 @@
             selectValue( "addMavenOneProject_selectedProjectGroup", projectGroup );
         }
 
-        //submit();
         clickButtonWithValue( "Add" );
+	assertTextPresent( "Adding your project is in progress. Please wait .." );
+	waitPage( 100000 );        
 
         if ( validProject )
         {
@@ -1471,7 +1472,7 @@
         else
         {
             assertAddMavenOneProjectPage();
-        }
+	}
     }
 
     //TODO: problem with input type="file", selenium.type(..) does not work,
@@ -1511,7 +1512,7 @@
         assertElementPresent( "edit" );
         clickButtonWithValue( "Edit" );
 
-        assertTextPresent( "Move to Group" );
+        //assertTextPresent( "Move to Group" );
         selectValue( "//select", newProjectGroup );
 
         assertElementPresent( "saveProjectGroup_" );
@@ -1521,32 +1522,6 @@
     public void tearDown()
         throws Exception
     {
-        /* TODO: This causes the browser not closing after each tests. Will repair this one too.
-         * 
-         * login( adminUsername, adminPassword );
-
-        goToProjectGroupsSummaryPage();
-
-        if ( isLinkPresent( TEST_PROJ_GRP_NAME ) )
-        {
-            removeProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
-        }
-        // TODO: clean this up
-        if ( isLinkPresent( "Apache Maven" ) )
-        {
-            removeProjectGroup( "Apache Maven", "org.apache.maven", "Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information." );
-        }
-        if ( isLinkPresent( "Maven One Project" ) )
-        {
-            removeProjectGroup( "Maven One Project", "maven-one-project", "This is a sample Maven One Project." );
-        }
-        if ( isLinkPresent( DEFAULT_PROJ_GRP_NAME ) &amp;&amp;
-            "0".equals( getCellValueFromTable( "ec_table", 1, 2 ) ) == false )
-        {
-            removeProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
-            addProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
-        }*/
-
         super.tearDown();
     }
 




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834357 [4/7] - in /continuum/branches/continuum-1.3.x/continuum-webapp-test: ./ src/site/ src/site/apt/ src/test/it/org/apache/continuum/web/test/ src/test/resources/ src/test/testng/config/ src/test/testng/org/apache/continuum/web/test/ s...</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110053804.475F223889D7@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110053804-475F223889D7@eris-apache-org%3e</id>
<updated>2009-11-10T05:38:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/InstallationTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,160 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractInstallationTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "installation" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class InstallationTest
+    extends AbstractInstallationTest
+{
+    public void testAddJdkToolWithoutBuildEnvirotment()
+    {
+        String INSTALL_TOOL_JDK_NAME = getProperty( "INSTALL_TOOL_JDK_NAME" );
+        String INSTALL_TOOL_JDK_PATH = getEscapeProperty( "INSTALL_TOOL_JDK_PATH" );
+        goToAddInstallationTool();
+        addInstallation( INSTALL_TOOL_JDK_NAME, "JDK", INSTALL_TOOL_JDK_PATH, false, true, true );
+    }
+
+    public void testAddMavenToolWithBuildEnvirotment()
+    {
+        String INTALL_TOOL_MAVEN_NAME = getProperty( "INTALL_TOOL_MAVEN_NAME" );
+        String INTALL_TOOL_MAVEN_PATH = getEscapeProperty( "INTALL_TOOL_MAVEN_PATH" );
+        goToAddInstallationTool();
+        addInstallation( INTALL_TOOL_MAVEN_NAME, "Maven 2", INTALL_TOOL_MAVEN_PATH, true, true, true );
+        // TODO: Validate build envirotment
+    }
+
+    public void testAddInstallationVariableWithBuildEnvirotment()
+    {
+        String INSTALL_VAR_NAME = getProperty( "INSTALL_VAR_NAME" );
+        String INSTALL_VAR_VARIABLE_NAME = getProperty( "INSTALL_VAR_VARIABLE_NAME" );
+        String INSTALL_VAR_PATH = getProperty( "INSTALL_VAR_PATH" );
+        goToAddInstallationVariable();
+        addInstallation( INSTALL_VAR_NAME, INSTALL_VAR_VARIABLE_NAME, INSTALL_VAR_PATH, true, false, true );
+        // TODO: Validate build envirotment
+    }
+
+    public void testAddInstallationVariableWithoutBuildEnvirotment()
+    {
+        String INSTALL_VAR_NAME = "var_without_build_envirotment";
+        String INSTALL_VAR_VARIABLE_NAME = "var_name";
+        String INSTALL_VAR_PATH = "path";
+        goToAddInstallationVariable();
+        addInstallation( INSTALL_VAR_NAME, INSTALL_VAR_VARIABLE_NAME, INSTALL_VAR_PATH, false, false, true );
+    }
+
+    public void testAddInvalidInstallationTool()
+    {
+        goToAddInstallationTool();
+        addInstallation( "", "JDK", "", false, true, false );
+        assertTextPresent( "You must define a name" );
+        assertTextPresent( "You must define a value" );
+    }
+
+    public void testAddInvalidPathInstallationTool()
+    {
+        goToAddInstallationTool();
+        addInstallation( "name", "JDK", "invalid_path", false, true, false );
+        assertTextPresent( "Failed to validate installation, check server log" );
+    }
+
+    public void testAddInvalidInstallationVariable()
+    {
+        goToAddInstallationVariable();
+        addInstallation( "", "", "", false, false, false );
+        assertTextPresent( "You must define a name" );
+        assertTextPresent( "You must define a value" );
+    }
+
+    public void testAddInvalidVarNameInstallationVariable()
+    {
+        goToAddInstallationVariable();
+        addInstallation( "name", "", "path", false, false, false );
+        assertTextPresent( "You must define an environment variable" );
+    }
+
+    @Test( dependsOnMethods = { "testAddJdkToolWithoutBuildEnvirotment" } )
+    public void testAddDuplicatedInstallationTool()
+    {
+        String INSTALL_TOOL_JDK_NAME = getProperty( "INSTALL_TOOL_JDK_NAME" );
+        String INSTALL_TOOL_JDK_PATH = getEscapeProperty( "INSTALL_TOOL_JDK_PATH" );
+        goToAddInstallationTool();
+        addInstallation( INSTALL_TOOL_JDK_NAME, "JDK", INSTALL_TOOL_JDK_PATH, false, true, false );
+        assertTextPresent( "Installation name already exists" );
+    }
+
+    @Test( dependsOnMethods = { "testAddInstallationVariableWithBuildEnvirotment" } )
+    public void testAddDuplicatedInstallationVariable()
+    {
+        String INSTALL_VAR_NAME = getProperty( "INSTALL_VAR_NAME" );
+        String INSTALL_VAR_VARIABLE_NAME = getProperty( "INSTALL_VAR_VARIABLE_NAME" );
+        String INSTALL_VAR_PATH = getProperty( "INSTALL_VAR_PATH" );
+        goToAddInstallationVariable();
+        addInstallation( INSTALL_VAR_NAME, INSTALL_VAR_VARIABLE_NAME, INSTALL_VAR_PATH, false, false, false );
+        assertTextPresent( "Installation name already exists" );
+    }
+
+    @Test( dependsOnMethods = { "testAddJdkToolWithoutBuildEnvirotment" } )
+    public void testEditInstallationTool()
+    {
+        String INSTALL_TOOL_JDK_NAME = getProperty( "INSTALL_TOOL_JDK_NAME" );
+        String INSTALL_TOOL_JDK_PATH = getEscapeProperty( "INSTALL_TOOL_JDK_PATH" );
+        String newName = "new_name";
+        goToEditInstallation( INSTALL_TOOL_JDK_NAME, "JDK", INSTALL_TOOL_JDK_PATH, true );
+        editInstallation( newName, "JDK", INSTALL_TOOL_JDK_PATH, true, true );
+        goToEditInstallation( newName, "JDK", INSTALL_TOOL_JDK_PATH, true );
+        editInstallation( INSTALL_TOOL_JDK_NAME, "JDK", INSTALL_TOOL_JDK_PATH, true, true );
+    }
+
+    @Test( dependsOnMethods = { "testAddInstallationVariableWithBuildEnvirotment" } )
+    public void testEditInstallationVariable()
+    {
+        String INSTALL_VAR_NAME = getProperty( "INSTALL_VAR_NAME" );
+        String INSTALL_VAR_VARIABLE_NAME = getProperty( "INSTALL_VAR_VARIABLE_NAME" );
+        String INSTALL_VAR_PATH = getProperty( "INSTALL_VAR_PATH" );
+        String newName = "new_name";
+        String newVarName = "new_var_name";
+        String newPath = "new_path";
+        goToEditInstallation( INSTALL_VAR_NAME, INSTALL_VAR_VARIABLE_NAME, INSTALL_VAR_PATH, false );
+        editInstallation( newName, newVarName, newPath, false, true );
+        goToEditInstallation( newName, newVarName, newPath, false );
+        editInstallation( INSTALL_VAR_NAME, INSTALL_VAR_VARIABLE_NAME, INSTALL_VAR_PATH, false, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditInstallationTool", "testAddDuplicatedInstallationTool" } )
+    public void testDeleteInstallationTool()
+    {
+        String INSTALL_TOOL_JDK_NAME = getProperty( "INSTALL_TOOL_JDK_NAME" );
+        removeInstallation( INSTALL_TOOL_JDK_NAME );
+    }
+
+    @Test( dependsOnMethods = { "testEditInstallationVariable", "testAddDuplicatedInstallationVariable" } )
+    public void testDeleteInstallationVariable()
+    {
+        String INSTALL_VAR_NAME = getProperty( "INSTALL_VAR_NAME" );
+        removeInstallation( INSTALL_VAR_NAME );
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LocalRepositoriesTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,79 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractLocalRepositoryTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "repository" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class LocalRepositoriesTest
+    extends AbstractLocalRepositoryTest
+{
+    public void testAddLocalRepository()
+    {
+        String LOCAL_REPOSITORY_NAME = getProperty( "LOCAL_REPOSITORY_NAME" );
+        String LOCAL_REPOSITORY_LOCATION = getProperty( "LOCAL_REPOSITORY_LOCATION" );
+        goToAddLocalRepository();
+        addEditLocalRepository( LOCAL_REPOSITORY_NAME, LOCAL_REPOSITORY_LOCATION, true );
+    }
+
+    public void testAddInvalidLocalRepository()
+    {
+        goToAddLocalRepository();
+        addEditLocalRepository( "", "", false );
+        assertTextPresent( "You must define a name." );
+        assertTextPresent( "You must define a local repository directory." );
+    }
+
+    @Test( dependsOnMethods = { "testAddLocalRepository" } )
+    public void testAddDuplicatedLocalRepository()
+    {
+        String LOCAL_REPOSITORY_NAME = getProperty( "LOCAL_REPOSITORY_NAME" );
+        String LOCAL_REPOSITORY_LOCATION = getProperty( "LOCAL_REPOSITORY_LOCATION" );
+        goToAddLocalRepository();
+        addEditLocalRepository( LOCAL_REPOSITORY_NAME, LOCAL_REPOSITORY_LOCATION, false );
+        assertTextPresent( "Local repository name must be unique" );
+        assertTextPresent( "Local repository location must be unique" );
+    }
+
+    @Test( dependsOnMethods = { "testAddDuplicatedLocalRepository" } )
+    public void testEditLocalRepository()
+    {
+        String LOCAL_REPOSITORY_NAME = getProperty( "LOCAL_REPOSITORY_NAME" );
+        String LOCAL_REPOSITORY_LOCATION = getProperty( "LOCAL_REPOSITORY_LOCATION" );
+        String newName = "new_name";
+        String newLocation = "new_location";
+        goToEditLocalRepository( LOCAL_REPOSITORY_NAME, LOCAL_REPOSITORY_LOCATION );
+        addEditLocalRepository( newName, newLocation, true );
+        goToEditLocalRepository( newName, newLocation );
+        addEditLocalRepository( LOCAL_REPOSITORY_NAME, LOCAL_REPOSITORY_LOCATION, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditLocalRepository" } )
+    public void testDeleteLocalRepository()
+    {
+        String LOCAL_REPOSITORY_NAME = getProperty( "LOCAL_REPOSITORY_NAME" );
+        removeLocalRepository( LOCAL_REPOSITORY_NAME );
+    }
+}

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java Tue Nov 10 05:38:01 2009
@@ -19,8 +19,7 @@
  * under the License.
  */
 
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
 /*
@@ -36,81 +35,59 @@
  */
 @Test( groups = { "login" } )
 public class LoginTest
-    extends AbstractSeleniumTest
+    extends AbstractContinuumTest
 {
     public void testWithBadUsername()
     {
-        diplayLoginPage();
-        geSelenium().type( "loginForm_username", "badUsername" );
-        geSelenium().type( "loginForm_username", p.getProperty( "ADMIN_PASSWORD" ) );
-        geSelenium().click( "loginForm__login" );
-        geSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", "badUsername" );
+        getSelenium().type( "loginForm_username", getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
     @Test( dependsOnMethods = { "testWithBadUsername" }, alwaysRun = true )
     public void testWithBadPassword()
     {
-        diplayLoginPage();
-        geSelenium().type( "loginForm_username", p.getProperty( "ADMIN_USERNAME" ) );
-        geSelenium().type( "loginForm_password", "badPassword" );
-        geSelenium().click( "loginForm__login" );
-        geSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        getSelenium().type( "loginForm_password", "badPassword" );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
     @Test( dependsOnMethods = { "testWithBadPassword" }, alwaysRun = true )
     public void testWithEmptyUsername()
     {
-        diplayLoginPage();
-        geSelenium().type( "loginForm_password", "password" );
-        geSelenium().click( "loginForm__login" );
-        geSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        goToLoginPage();
+        getSelenium().type( "loginForm_password", "password" );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
         assertTextPresent( "User Name is required" );
     }
 
     @Test( dependsOnMethods = { "testWithEmptyUsername" }, alwaysRun = true )
     public void testWithEmptyPassword()
     {
-        diplayLoginPage();
-        geSelenium().type( "loginForm_username", p.getProperty( "ADMIN_USERNAME" ) );
-        geSelenium().click( "loginForm__login" );
-        geSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
     @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithEmptyPassword" }, alwaysRun = true )
     public void testWithCorrectUsernamePassword()
     {
-        diplayLoginPage();
-        geSelenium().type( "loginForm_username", p.getProperty( "ADMIN_USERNAME" ) );
-        geSelenium().type( "loginForm_password", p.getProperty( "ADMIN_PASSWORD" ) );
-        geSelenium().click( "loginForm__login" );
-        geSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
         assertTextPresent( "Edit Details" );
         assertTextPresent( "Logout" );
-        assertTextPresent( p.getProperty( "ADMIN_USERNAME" ) );
-    }
-
-
-    @BeforeTest
-    public void open()
-        throws Exception
-    {
-        super.open(2);
-    }
-
-    @Override
-    @AfterTest
-    public void close()
-        throws Exception
-    {
-        super.close();
-    }
-
-    private void diplayLoginPage()
-    {
-        geSelenium().open( baseUrl + "/security/login.action" );
-        waitPage();
+        assertTextPresent( getProperty( "ADMIN_USERNAME" ) );
     }
 }

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenOneProjectTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,215 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractContinuumTest;
+import org.testng.annotations.Test;
+
+/**
+ * Based on AddMavenOneProjectTestCase of Emmanuel Venisse.
+ *
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "mavenOneProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class MavenOneProjectTest
+    extends AbstractContinuumTest
+{
+    /**
+     * test with valid pom url
+     */
+    public void testValidPomUrl()
+        throws Exception
+    {
+        String M1_POM_URL = getProperty( "M1_POM_URL" );
+        String M1_POM_USERNAME = getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = getProperty( "M1_POM_PASSWORD" );
+        String M1_PROJ_GRP_NAME = getProperty( "M1_PROJ_GRP_NAME" );
+        String M1_PROJ_GRP_ID = getProperty( "M1_PROJ_GRP_ID" );
+        String M1_PROJ_GRP_DESCRIPTION = getProperty( "M1_PROJ_GRP_DESCRIPTION" );
+        // Enter values into Add Maven Two Project fields, and submit
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( M1_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, null, null, true );
+        assertProjectGroupSummaryPage( M1_PROJ_GRP_NAME, M1_PROJ_GRP_ID, M1_PROJ_GRP_DESCRIPTION );
+    }
+
+    @Test( dependsOnMethods = { "testAddProjectGroup" } )
+    public void testAddMavenOneProjectFromRemoteSourceToNonDefaultProjectGroup()
+        throws Exception
+    {
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String M1_POM_URL = getProperty( "M1_POM_URL" );
+        String M1_POM_USERNAME = getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = getProperty( "M1_POM_PASSWORD" );
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( M1_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, TEST_PROJ_GRP_NAME, null, true );
+        assertProjectGroupSummaryPage( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+    }
+
+    /**
+     * test with no pom file or pom url specified
+     */
+    public void testNoPomSpecified()
+        throws Exception
+    {
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( "", "", "", null, null, false );
+        assertTextPresent( "Either POM URL or Upload POM is required." );
+    }
+
+    /**
+     * test with missing &lt;repository&gt; element in the pom file
+     */
+    public void testMissingElementInPom()
+        throws Exception
+    {
+        String M1_MISS_REPO_POM_URL = getProperty( "M1_MISS_REPO_POM_URL" );
+        String M1_POM_USERNAME = getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = getProperty( "M1_POM_PASSWORD" );
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( M1_MISS_REPO_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, null, null, false );
+        assertTextPresent( "Missing 'repository' element in the POM." );
+    }
+
+    /**
+     * test with &lt;extend&gt; element present in pom file
+     */
+    public void testWithExtendElementPom()
+        throws Exception
+    {
+        String M1_EXTENDED_POM_URL = getProperty( "M1_EXTENDED_POM_URL" );
+        String M1_POM_USERNAME = getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = getProperty( "M1_POM_PASSWORD" );
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( M1_EXTENDED_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, null, null, false );
+        assertTextPresent( "Cannot use a POM with an 'extend' element" );
+    }
+
+    /**
+     * test with unparseable xml content for pom file
+     */
+    public void testUnparseableXmlContent()
+        throws Exception
+    {
+        String M1_UNPARSEABLE_POM_URL = getProperty( "M1_UNPARSEABLE_POM_URL" );
+        String M1_POM_USERNAME = getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = getProperty( "M1_POM_PASSWORD" );
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( M1_UNPARSEABLE_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, null, null, false );
+        assertTextPresent( "The XML content of the POM can not be parsed." );
+    }
+
+    /**
+     * test with a malformed pom url
+     */
+    public void testMalformedPomUrl()
+        throws Exception
+    {
+        String pomUrl = "aaa";
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( pomUrl, "", "", null, null, false );
+        assertTextPresent( "The specified resource cannot be accessed. Please try again later or contact your administrator." );
+    }
+
+    /**
+     * test with an inaccessible pom url
+     */
+    public void testInaccessiblePomUrl()
+        throws Exception
+    {
+        String pomUrl = "http://www.google.com";
+        goToAddMavenOneProjectPage();
+        addMavenOneProject( pomUrl, "", "", null, null, false );
+        assertTextPresent( "POM file does not exist. Either the POM you specified or one of its modules does not exist." );
+    }
+
+    /**
+     * test cancel button
+     */
+    public void testCancelButton()
+    {
+        goToAboutPage();
+        goToAddMavenOneProjectPage();
+        clickButtonWithValue( "Cancel" );
+        assertAboutPage();
+    }
+
+    @Test( dependsOnMethods = { "testValidPomUrl" } )
+    public void testDeleteMavenOneProject()
+        throws Exception
+    {
+        boolean isExisting = false;
+        String M1_PROJ_GRP_NAME = getProperty( "M1_DELETE_PROJ_GRP_NAME" );
+        goToProjectGroupsSummaryPage();
+        
+        if ( isLinkPresent( M1_PROJ_GRP_NAME ) )
+        {
+            isExisting = true;
+        }
+        else
+        {
+            addMaven1Project( M1_PROJ_GRP_NAME );
+        }
+        
+        // delete project - delete icon
+        clickLinkWithText( M1_PROJ_GRP_NAME );
+        clickLinkWithXPath( "//tbody/tr['0']/td['10']/a/img[@alt='Delete']" );
+        assertTextPresent( "Delete Continuum Project" );
+        clickButtonWithValue( "Delete" );
+        assertPage( "Continuum - Project Group" );
+        assertLinkNotPresent( M1_PROJ_GRP_NAME );
+        
+        // remove group for next test
+        removeProjectGroup( M1_PROJ_GRP_NAME );
+        
+        // delete project - "Delete Project(s)" button
+        addMaven1Project( M1_PROJ_GRP_NAME );
+        clickLinkWithText( M1_PROJ_GRP_NAME );
+        checkField( "//tbody/tr['0']/td['0']/input[@name='selectedProjects']" );
+        clickButtonWithValue( "Delete Project(s)" );
+        assertTextPresent( "Delete Continuum Projects" );
+        clickButtonWithValue( "Delete" );
+        assertPage( "Continuum - Project Group" );
+        assertLinkNotPresent( M1_PROJ_GRP_NAME );
+        
+        if ( !isExisting )
+        {
+            removeProjectGroup( M1_PROJ_GRP_NAME );
+        }
+    }
+    
+    private void addMaven1Project( String groupName )
+        throws Exception
+    {
+        String M1_POM_URL = getProperty( "M1_DELETE_POM_URL" );
+        String M1_POM_USERNAME = getProperty( "M1_POM_USERNAME" );
+        String M1_POM_PASSWORD = getProperty( "M1_POM_PASSWORD" );
+        String M1_PROJ_GRP_ID = getProperty( "M1_DELETE_PROJ_GRP_ID" );
+        String M1_PROJ_GRP_DESCRIPTION = getProperty( "M1_DELETE_PROJ_GRP_DESCRIPTION" );
+        
+        goToAddMavenOneProjectPage();
+        assertLinkNotPresent( groupName );
+        addMavenOneProject( M1_POM_URL, M1_POM_USERNAME, M1_POM_PASSWORD, null, null, true );
+        goToProjectGroupsSummaryPage();
+        assertLinkPresent( groupName );
+    }
+}

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MavenTwoProjectTest.java Tue Nov 10 05:38:01 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
 /**
@@ -27,7 +28,7 @@
  * @author JosÃ© Morales MartÃ­nez
  * @version $Id$
  */
-@Test( groups = { "mavenTwoProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" })
+@Test( groups = { "mavenTwoProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
 public class MavenTwoProjectTest
     extends AbstractContinuumTest
 {
@@ -35,32 +36,64 @@
     public void testAddMavenTwoProject()
         throws Exception
     {
-        String M2_POM_URL = p.getProperty( "M2_POM_URL" );
-        String M2_POM_USERNAME = p.getProperty( "M2_POM_USERNAME" );
-        String M2_POM_PASSWORD = p.getProperty( "M2_POM_PASSWORD" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_ID = p.getProperty( "M2_PROJ_GRP_ID" );
-        String M2_PROJ_GRP_DESCRIPTION = p.getProperty( "M2_PROJ_GRP_DESCRIPTION" );
+        String M2_POM_URL = getProperty( "M2_POM_URL" );
+        String M2_POM_USERNAME = getProperty( "M2_POM_USERNAME" );
+        String M2_POM_PASSWORD = getProperty( "M2_POM_PASSWORD" );
+
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_ID = getProperty( "M2_PROJ_GRP_ID" );
+        String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_PROJ_GRP_DESCRIPTION" );
+        String M2_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_PROJ_GRP_SCM_ROOT_URL" );
+        
         // Enter values into Add Maven Two Project fields, and submit
         addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true );
         // Wait Struct Listener
         assertProjectGroupSummaryPage( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION );
+
+        assertTextPresent( M2_PROJ_GRP_SCM_ROOT_URL );
     }
 
-    @Test( dependsOnMethods = { "testAddProjectGroup" })
+    /**
+     * Test flat multi module project with names that start with the same letter
+     */
+    public void testAddMavenTwoProjectModuleNameWithSameLetter()
+        throws Exception
+    {
+        String M2_POM_URL = getProperty( "M2_SAME_LETTER_POM_URL" );
+        String M2_POM_USERNAME = getProperty( "M2_POM_USERNAME" );
+        String M2_POM_PASSWORD = getProperty( "M2_POM_PASSWORD" );
+
+        String M2_PROJ_GRP_NAME = getProperty( "M2_SAME_LETTER_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_ID = getProperty( "M2_SAME_LETTER_PROJ_GRP_ID" );
+        String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_SAME_LETTER_PROJ_GRP_DESCRIPTION" );
+
+        String M2_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_SAME_LETTER_PROJ_GRP_SCM_ROOT_URL" );
+
+        addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true );
+
+        assertProjectGroupSummaryPage( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION );
+
+        assertTextPresent( M2_PROJ_GRP_SCM_ROOT_URL );
+    }
+
+    @Test( dependsOnMethods = { "testAddProjectGroup" } )
     public void testAddMavenTwoProjectFromRemoteSourceToNonDefaultProjectGroup()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-
-        String M2_POM_URL = p.getProperty( "M2_POM_URL" );
-        String M2_POM_USERNAME = p.getProperty( "M2_POM_USERNAME" );
-        String M2_POM_PASSWORD = p.getProperty( "M2_POM_PASSWORD" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String TEST_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_PROJ_GRP_SCM_ROOT_URL" );
+
+        String M2_POM_URL = getProperty( "M2_POM_URL" );
+        String M2_POM_USERNAME = getProperty( "M2_POM_USERNAME" );
+        String M2_POM_PASSWORD = getProperty( "M2_POM_PASSWORD" );
+        
         addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, TEST_PROJ_GRP_NAME, true );
 
         assertProjectGroupSummaryPage( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+
+        assertTextPresent( TEST_PROJ_GRP_SCM_ROOT_URL );
     }
 
     /**
@@ -79,7 +112,7 @@
     public void testMissingScmElementPom()
         throws Exception
     {
-        String pomUrl = p.getProperty( "NOT_SCM_POM_URL" );
+        String pomUrl = getProperty( "NOT_SCM_POM_URL" );
         submitAddMavenTwoProjectPage( pomUrl, false );
         assertTextPresent( "Missing ''scm'' element in the POM, project Maven Two Project" );
     }
@@ -91,7 +124,7 @@
         throws Exception
     {
         String pomUrl = "aaa";
-        submitAddMavenTwoProjectPage( pomUrl, false);
+        submitAddMavenTwoProjectPage( pomUrl, false );
         assertTextPresent( "The specified resource cannot be accessed. Please try again later or contact your administrator." );
     }
 
@@ -101,7 +134,7 @@
     public void testMissingConnectionElement()
         throws Exception
     {
-        String pomUrl = p.getProperty( "MISS_CONECT_POM_URL" );
+        String pomUrl = getProperty( "MISS_CONECT_POM_URL" );
         submitAddMavenTwoProjectPage( pomUrl, false );
         assertTextPresent( "Missing 'connection' sub-element in the 'scm' element in the POM." );
     }
@@ -123,7 +156,7 @@
     public void testMissingParentPom()
         throws Exception
     {
-        String pomUrl = p.getProperty( "MISS_PARENT_POM_URL" );
+        String pomUrl = getProperty( "MISS_PARENT_POM_URL" );
         submitAddMavenTwoProjectPage( pomUrl, false );
         assertTextPresent( "Missing artifact trying to build the POM. Check that its parent POM is available or add it first in Continuum." );
     }
@@ -134,7 +167,7 @@
     public void testMissingModules()
         throws Exception
     {
-        String pomUrl = p.getProperty( "MISS_SUBPRO_POM_URL" );
+        String pomUrl = getProperty( "MISS_SUBPRO_POM_URL" );
         submitAddMavenTwoProjectPage( pomUrl, false );
         assertTextPresent( "Unknown error trying to build POM." );
     }
@@ -160,4 +193,68 @@
         clickButtonWithValue( "Cancel" );
         assertAboutPage();
     }
+
+    @Test( dependsOnMethods = { "testAddMavenTwoProject" } )
+    public void testDeleteMavenTwoProject()
+        throws Exception
+    {
+        String M2_PROJ_GRP_NAME = getProperty( "M2_DELETE_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_DELETE_PROJ_GRP_SCM_ROOT_URL" );
+        goToProjectGroupsSummaryPage();
+        
+        // delete project - delete icon
+        addMaven2Project( M2_PROJ_GRP_NAME );
+        clickLinkWithText( M2_PROJ_GRP_NAME );
+
+        assertPage( "Continuum - Project Group" );
+        assertTextPresent( M2_PROJ_GRP_SCM_ROOT_URL );
+        // wait for project to finish checkout
+        waitForProjectCheckout();
+
+        clickLinkWithXPath( "//tbody/tr['0']/td['10']/a/img[@alt='Delete']" );
+        assertTextPresent( "Delete Continuum Project" );
+        clickButtonWithValue( "Delete" );
+        assertPage( "Continuum - Project Group" );
+        assertTextNotPresent( "Unable to delete project" );
+        assertLinkNotPresent( M2_PROJ_GRP_NAME );
+        assertTextNotPresent( M2_PROJ_GRP_SCM_ROOT_URL );
+
+        // remove group for next test
+        removeProjectGroup( M2_PROJ_GRP_NAME );
+        assertLinkNotPresent( M2_PROJ_GRP_NAME );
+
+        // delete project - "Delete Project(s)" button
+        addMaven2Project( M2_PROJ_GRP_NAME );
+        clickLinkWithText( M2_PROJ_GRP_NAME );
+
+        assertPage( "Continuum - Project Group" );
+        //wait for project to finish checkout
+        waitForProjectCheckout();
+
+        checkField( "//tbody/tr['0']/td['0']/input[@name='selectedProjects']" );
+        clickButtonWithValue( "Delete Project(s)" );
+        assertTextPresent( "Delete Continuum Projects" );
+        clickButtonWithValue( "Delete" );
+        assertPage( "Continuum - Project Group" );
+        assertTextNotPresent( "Unable to delete project" );
+        assertLinkNotPresent( M2_PROJ_GRP_NAME );
+        assertTextNotPresent( M2_PROJ_GRP_SCM_ROOT_URL );
+
+        // remove project group
+        removeProjectGroup( M2_PROJ_GRP_NAME );
+        assertLinkNotPresent( M2_PROJ_GRP_NAME );
+    }
+
+    private void addMaven2Project( String groupName )
+        throws Exception
+    {
+        String M2_POM_URL = getProperty( "M2_DELETE_POM_URL" );
+        String M2_POM_USERNAME = getProperty( "M2_POM_USERNAME" );
+        String M2_POM_PASSWORD = getProperty( "M2_POM_PASSWORD" );
+        String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_DELETE_PROJ_GRP_DESCRIPTION" );
+        
+        addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true );
+        goToProjectGroupsSummaryPage();
+        assertLinkPresent( groupName );
+    }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/MyAccountTest.java Tue Nov 10 05:38:01 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractSeleniumTest;
 import org.testng.Assert;
 import org.testng.annotations.Test;
 
@@ -28,7 +29,7 @@
  * @author JosÃ© Morales MartÃ­nez
  * @version $Id$
  */
-@Test( groups = { "myAccount" }, dependsOnMethods = {"testWithCorrectUsernamePassword"} )
+@Test( groups = { "myAccount" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
 public class MyAccountTest
     extends AbstractSeleniumTest
 {
@@ -40,27 +41,21 @@
     public void testMyAccountEdit()
         throws Exception
     {
-        displayEditDetail();
+        clickLinkWithText( "Edit Details" );
         String email = getFieldValue( "user.email" );
         setFieldValue( "user.fullName", newFullName );
         setFieldValue( "user.email", newEmail );
         submit();
-        geSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
         Assert.assertEquals( "Continuum - Group Summary", getTitle() );
-        displayEditDetail();
+        clickLinkWithText( "Edit Details" );
         assertFieldValue( newFullName, "user.fullName" );
         assertFieldValue( newEmail, "user.email" );
-        setFieldValue( "user.fullName", p.getProperty( "ADMIN_USERNAME" ) );
+        setFieldValue( "user.fullName", getProperty( "ADMIN_USERNAME" ) );
         setFieldValue( "user.email", email );
         submit();
-        displayEditDetail();
-        assertFieldValue( p.getProperty( "ADMIN_USERNAME" ), "user.fullName" );
+        clickLinkWithText( "Edit Details" );
+        assertFieldValue( getProperty( "ADMIN_USERNAME" ), "user.fullName" );
         assertFieldValue( email, "user.email" );
     }
-
-    private void displayEditDetail()
-    {
-        clickLinkWithText( "Edit Details", true );
-    }
-    // TODO: Validate required values
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/NotifierTest.java Tue Nov 10 05:38:01 2009
@@ -19,22 +19,23 @@
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractNotifierTest;
 import org.testng.annotations.Test;
 
 /**
  * @author JosÃ© Morales MartÃ­nez
  * @version $Id$
  */
-@Test( groups = { "notifier" }, dependsOnMethods = { "testAddMavenTwoProject" } )
+@Test( groups = { "notifier" }, dependsOnMethods = { "testAddMavenTwoProjectFromRemoteSourceToNonDefaultProjectGroup" } )
 public class NotifierTest
-    extends AbstractContinuumTest
+    extends AbstractNotifierTest
 {
     public void testAddValidMailProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String MAIL_NOTIFIER_ADDRESS = getProperty( "MAIL_NOTIFIER_ADDRESS" );
         goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         addMailNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MAIL_NOTIFIER_ADDRESS, true );
     }
@@ -43,9 +44,9 @@
     public void testEditValidMailProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String MAIL_NOTIFIER_ADDRESS = getProperty( "MAIL_NOTIFIER_ADDRESS" );
         String newMail = "newmail@mail.com";
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         editMailNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MAIL_NOTIFIER_ADDRESS, newMail, true );
@@ -56,9 +57,9 @@
     public void testEditInvalidMailProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String MAIL_NOTIFIER_ADDRESS = getProperty( "MAIL_NOTIFIER_ADDRESS" );
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         editMailNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MAIL_NOTIFIER_ADDRESS, "invalid_email_add", false );
     }
@@ -66,8 +67,8 @@
     public void testAddInvalidMailProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         addMailNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, "invalid_email_add", false );
     }
@@ -75,10 +76,10 @@
     public void testAddValidMailGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MAIL_NOTIFIER_ADDRESS = getProperty( "MAIL_NOTIFIER_ADDRESS" );
         goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         addMailNotifier( TEST_PROJ_GRP_NAME, null, MAIL_NOTIFIER_ADDRESS, true );
     }
@@ -87,10 +88,10 @@
     public void testEditValidMailGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MAIL_NOTIFIER_ADDRESS = getProperty( "MAIL_NOTIFIER_ADDRESS" );
         String newMail = "newmail@mail.com";
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         clickLinkWithText( "Notifiers" );
@@ -103,10 +104,10 @@
     public void testEditInvalidMailGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String MAIL_NOTIFIER_ADDRESS = p.getProperty( "MAIL_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MAIL_NOTIFIER_ADDRESS = getProperty( "MAIL_NOTIFIER_ADDRESS" );
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         clickLinkWithText( "Notifiers" );
         assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
@@ -116,9 +117,9 @@
     public void testAddInvalidMailGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
         goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         addMailNotifier( TEST_PROJ_GRP_NAME, null, "invalid_email_add", false );
     }
@@ -126,10 +127,10 @@
     public void testAddValidIrcProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
-        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String IRC_NOTIFIER_HOST = getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = getProperty( "IRC_NOTIFIER_CHANNEL" );
         goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         addIrcNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, IRC_NOTIFIER_HOST, IRC_NOTIFIER_CHANNEL, true );
     }
@@ -138,10 +139,10 @@
     public void testEditValidIrcProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
-        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String IRC_NOTIFIER_HOST = getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = getProperty( "IRC_NOTIFIER_CHANNEL" );
         String newHost = "new.test.com";
         String newChannel = "new_test_channel";
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
@@ -155,10 +156,10 @@
     public void testEditInvalidIrcProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
-        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String IRC_NOTIFIER_HOST = getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = getProperty( "IRC_NOTIFIER_CHANNEL" );
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         editIrcNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, IRC_NOTIFIER_HOST, IRC_NOTIFIER_CHANNEL, "", "", false );
     }
@@ -166,8 +167,8 @@
     public void testAddInvalidIrcProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         addIrcNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, "", "", false );
     }
@@ -175,11 +176,11 @@
     public void testAddValidIrcGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
-        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String IRC_NOTIFIER_HOST = getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = getProperty( "IRC_NOTIFIER_CHANNEL" );
         goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         addIrcNotifier( TEST_PROJ_GRP_NAME, null, IRC_NOTIFIER_HOST, IRC_NOTIFIER_CHANNEL, true );
     }
@@ -188,11 +189,11 @@
     public void testEditValidIrcGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
-        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String IRC_NOTIFIER_HOST = getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = getProperty( "IRC_NOTIFIER_CHANNEL" );
         String newHost = "new.test.com";
         String newChannel = "new_test_channel";
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
@@ -206,11 +207,11 @@
     public void testEditInvalidIrcGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String IRC_NOTIFIER_HOST = p.getProperty( "IRC_NOTIFIER_HOST" );
-        String IRC_NOTIFIER_CHANNEL = p.getProperty( "IRC_NOTIFIER_CHANNEL" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String IRC_NOTIFIER_HOST = getProperty( "IRC_NOTIFIER_HOST" );
+        String IRC_NOTIFIER_CHANNEL = getProperty( "IRC_NOTIFIER_CHANNEL" );
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         clickLinkWithText( "Notifiers" );
         assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
@@ -220,9 +221,9 @@
     public void testAddInvalidIrcGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
         goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         addIrcNotifier( TEST_PROJ_GRP_NAME, null, "", "", false );
     }
@@ -230,12 +231,12 @@
     public void testAddValidJabberProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
-        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
-        String JABBER_NOTIFIER_PASSWORD = p.getProperty( "JABBER_NOTIFIER_PASSWORD" );
-        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String JABBER_NOTIFIER_HOST = getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_PASSWORD = getProperty( "JABBER_NOTIFIER_PASSWORD" );
+        String JABBER_NOTIFIER_ADDRESS = getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         addJabberNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, JABBER_NOTIFIER_HOST, JABBER_NOTIFIER_LOGIN,
                            JABBER_NOTIFIER_PASSWORD, JABBER_NOTIFIER_ADDRESS, true );
@@ -245,12 +246,12 @@
     public void testEditValidJabberProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
-        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
-        String JABBER_NOTIFIER_PASSWORD = p.getProperty( "JABBER_NOTIFIER_PASSWORD" );
-        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String JABBER_NOTIFIER_HOST = getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_PASSWORD = getProperty( "JABBER_NOTIFIER_PASSWORD" );
+        String JABBER_NOTIFIER_ADDRESS = getProperty( "JABBER_NOTIFIER_ADDRESS" );
         String newHost = "new_test";
         String newLogin = "new_test_login";
         String newPassword = "new_password";
@@ -266,11 +267,11 @@
     public void testEditInvalidJabberProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
-        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
-        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String JABBER_NOTIFIER_HOST = getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_ADDRESS = getProperty( "JABBER_NOTIFIER_ADDRESS" );
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         editJabberNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, JABBER_NOTIFIER_HOST, JABBER_NOTIFIER_LOGIN,
                             JABBER_NOTIFIER_ADDRESS, "", "", "", "", false );
@@ -279,8 +280,8 @@
     public void testAddInvalidJabberProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         addJabberNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, "", "", "", "", false );
     }
@@ -288,13 +289,13 @@
     public void testAddValidJabberGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
-        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
-        String JABBER_NOTIFIER_PASSWORD = p.getProperty( "JABBER_NOTIFIER_PASSWORD" );
-        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String JABBER_NOTIFIER_HOST = getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_PASSWORD = getProperty( "JABBER_NOTIFIER_PASSWORD" );
+        String JABBER_NOTIFIER_ADDRESS = getProperty( "JABBER_NOTIFIER_ADDRESS" );
         goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         addJabberNotifier( TEST_PROJ_GRP_NAME, null, JABBER_NOTIFIER_HOST, JABBER_NOTIFIER_LOGIN,
                            JABBER_NOTIFIER_PASSWORD, JABBER_NOTIFIER_ADDRESS, true );
@@ -304,13 +305,13 @@
     public void testEditValidJabberGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
-        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
-        String JABBER_NOTIFIER_PASSWORD = p.getProperty( "JABBER_NOTIFIER_PASSWORD" );
-        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String JABBER_NOTIFIER_HOST = getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_PASSWORD = getProperty( "JABBER_NOTIFIER_PASSWORD" );
+        String JABBER_NOTIFIER_ADDRESS = getProperty( "JABBER_NOTIFIER_ADDRESS" );
         String newHost = "new_test";
         String newLogin = "new_test_login";
         String newPassword = "new_password";
@@ -328,12 +329,12 @@
     public void testEditInvalidJabberGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String JABBER_NOTIFIER_HOST = p.getProperty( "JABBER_NOTIFIER_HOST" );
-        String JABBER_NOTIFIER_LOGIN = p.getProperty( "JABBER_NOTIFIER_LOGIN" );
-        String JABBER_NOTIFIER_ADDRESS = p.getProperty( "JABBER_NOTIFIER_ADDRESS" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String JABBER_NOTIFIER_HOST = getProperty( "JABBER_NOTIFIER_HOST" );
+        String JABBER_NOTIFIER_LOGIN = getProperty( "JABBER_NOTIFIER_LOGIN" );
+        String JABBER_NOTIFIER_ADDRESS = getProperty( "JABBER_NOTIFIER_ADDRESS" );
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         clickLinkWithText( "Notifiers" );
         assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
@@ -344,9 +345,9 @@
     public void testAddInvalidJabberGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
         goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         addJabberNotifier( TEST_PROJ_GRP_NAME, null, "", "", "", "", false );
     }
@@ -354,11 +355,11 @@
     public void testAddValidMsnProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
-        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
-        String MSN_NOTIFIER_PASSWORD = p.getProperty( "MSN_NOTIFIER_PASSWORD" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String MSN_NOTIFIER_ADDRESS = getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = getProperty( "MSN_NOTIFIER_LOGIN" );
+        String MSN_NOTIFIER_PASSWORD = getProperty( "MSN_NOTIFIER_PASSWORD" );
         goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         addMsnNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MSN_NOTIFIER_LOGIN, MSN_NOTIFIER_PASSWORD,
                         MSN_NOTIFIER_ADDRESS, true );
@@ -368,11 +369,11 @@
     public void testEditValidMsnProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
-        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
-        String MSN_NOTIFIER_PASSWORD = p.getProperty( "MSN_NOTIFIER_PASSWORD" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String MSN_NOTIFIER_ADDRESS = getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = getProperty( "MSN_NOTIFIER_LOGIN" );
+        String MSN_NOTIFIER_PASSWORD = getProperty( "MSN_NOTIFIER_PASSWORD" );
         String newLogin = "new_test_login";
         String newPassword = "new_password";
         String newAddress = "new.test@mail.com";
@@ -387,10 +388,10 @@
     public void testEditInvalidMsnProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
-        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String MSN_NOTIFIER_ADDRESS = getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = getProperty( "MSN_NOTIFIER_LOGIN" );
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         editMsnNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, MSN_NOTIFIER_LOGIN, MSN_NOTIFIER_ADDRESS, "", "", "",
                          false );
@@ -399,8 +400,8 @@
     public void testAddInvalidMsnProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         addMsnNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, "", "", "", false );
     }
@@ -408,12 +409,12 @@
     public void testAddValidMsnGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
-        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
-        String MSN_NOTIFIER_PASSWORD = p.getProperty( "MSN_NOTIFIER_PASSWORD" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MSN_NOTIFIER_ADDRESS = getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = getProperty( "MSN_NOTIFIER_LOGIN" );
+        String MSN_NOTIFIER_PASSWORD = getProperty( "MSN_NOTIFIER_PASSWORD" );
         goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         addMsnNotifier( TEST_PROJ_GRP_NAME, null, MSN_NOTIFIER_LOGIN, MSN_NOTIFIER_PASSWORD, MSN_NOTIFIER_ADDRESS, true );
     }
@@ -422,12 +423,12 @@
     public void testEditValidMsnGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
-        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
-        String MSN_NOTIFIER_PASSWORD = p.getProperty( "MSN_NOTIFIER_PASSWORD" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MSN_NOTIFIER_ADDRESS = getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = getProperty( "MSN_NOTIFIER_LOGIN" );
+        String MSN_NOTIFIER_PASSWORD = getProperty( "MSN_NOTIFIER_PASSWORD" );
         String newLogin = "new_test_login";
         String newPassword = "new_password";
         String newAddress = "new.test@mail.com";
@@ -444,11 +445,11 @@
     public void testEditInvalidMsnGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String MSN_NOTIFIER_ADDRESS = p.getProperty( "MSN_NOTIFIER_ADDRESS" );
-        String MSN_NOTIFIER_LOGIN = p.getProperty( "MSN_NOTIFIER_LOGIN" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String MSN_NOTIFIER_ADDRESS = getProperty( "MSN_NOTIFIER_ADDRESS" );
+        String MSN_NOTIFIER_LOGIN = getProperty( "MSN_NOTIFIER_LOGIN" );
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         clickLinkWithText( "Notifiers" );
         assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
@@ -458,9 +459,9 @@
     public void testAddInvalidMsnGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
         goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         addMsnNotifier( TEST_PROJ_GRP_NAME, null, "", "", "", false );
     }
@@ -468,10 +469,10 @@
     public void testAddValidWagonProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
-        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String WAGON_NOTIFIER_URL = getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = getProperty( "WAGON_SERVER_ID" );
         goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         addWagonNotifierPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, WAGON_NOTIFIER_URL, WAGON_SERVER_ID, true );
     }
@@ -480,10 +481,10 @@
     public void testEditValidWagonProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
-        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String WAGON_NOTIFIER_URL = getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = getProperty( "WAGON_SERVER_ID" );
         String newId = "newId";
         String newUrl = WAGON_NOTIFIER_URL;
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
@@ -497,10 +498,10 @@
     public void testEditInvalidWagonProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
-        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
-        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String WAGON_NOTIFIER_URL = getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = getProperty( "WAGON_SERVER_ID" );
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         editWagonNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, WAGON_NOTIFIER_URL, WAGON_SERVER_ID, "", "", false );
     }
@@ -508,8 +509,8 @@
     public void testAddInvalidWagonProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         goToProjectNotifier( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         addWagonNotifierPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME, "", "", false );
     }
@@ -517,11 +518,11 @@
     public void testAddValidWagonGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
-        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String WAGON_NOTIFIER_URL = getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = getProperty( "WAGON_SERVER_ID" );
         goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         addWagonNotifierPage( TEST_PROJ_GRP_NAME, null, WAGON_NOTIFIER_URL, WAGON_SERVER_ID, true );
     }
@@ -530,11 +531,11 @@
     public void testEditValidWagonGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
-        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String WAGON_NOTIFIER_URL = getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = getProperty( "WAGON_SERVER_ID" );
         String newId = "newId";
         String newUrl = WAGON_NOTIFIER_URL;
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
@@ -548,11 +549,11 @@
     public void testEditInvalidWagonGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String WAGON_NOTIFIER_URL = p.getProperty( "WAGON_NOTIFIER_URL" );
-        String WAGON_SERVER_ID = p.getProperty( "WAGON_SERVER_ID" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String WAGON_NOTIFIER_URL = getProperty( "WAGON_NOTIFIER_URL" );
+        String WAGON_SERVER_ID = getProperty( "WAGON_SERVER_ID" );
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         clickLinkWithText( "Notifiers" );
         assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
@@ -562,9 +563,9 @@
     public void testAddInvalidWagonGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
         goToGroupNotifier( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         addWagonNotifierPage( TEST_PROJ_GRP_NAME, null, "", "", false );
     }
@@ -573,9 +574,9 @@
     public void testDeleteGroupNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         clickLinkWithText( "Notifiers" );
         assertGroupNotifierPage( TEST_PROJ_GRP_NAME );
@@ -590,11 +591,14 @@
     public void testDeleteProjectNotifier()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String M2_PROJ_GRP_NAME = p.getProperty( "M2_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         goToProjectInformationPage( TEST_PROJ_GRP_NAME, M2_PROJ_GRP_NAME );
         // Delete
         clickLinkWithXPath( "(//a[contains(@href,'deleteProjectNotifier') and contains(@href,'mail')])//img" );
+        assertButtonWithValuePresent( "Delete" );
+        assertButtonWithValuePresent( "Cancel" );
+        clickButtonWithValue( "Delete" );
         assertProjectInformationPage();
     }
 }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834357 [5/7] - in /continuum/branches/continuum-1.3.x/continuum-webapp-test: ./ src/site/ src/site/apt/ src/test/it/org/apache/continuum/web/test/ src/test/resources/ src/test/testng/config/ src/test/testng/org/apache/continuum/web/test/ s...</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110053804.4C37023889EC@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110053804-4C37023889EC@eris-apache-org%3e</id>
<updated>2009-11-10T05:38:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ProjectGroupTest.java Tue Nov 10 05:38:01 2009
@@ -19,6 +19,7 @@
  * under the License.
  */
 
+import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
 /**
@@ -35,56 +36,53 @@
     public void testAddProjectGroup()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
 
-        addProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION, true);
+        addProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION, true );
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
     }
 
     public void testAddProjectGroup2()
         throws Exception
     {
-        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
-        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
-        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+        String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
 
-        addProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION, true);
-        showProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION);
+        addProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION, true );
+        showProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION );
     }
 
     @Test( dependsOnMethods = { "testAddMavenTwoProjectFromRemoteSourceToNonDefaultProjectGroup" } )
     public void testMoveProject()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-        String DEFAULT_PROJ_GRP_NAME = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
-        String DEFAULT_PROJ_GRP_ID = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
-        String DEFAULT_PROJ_GRP_DESCRIPTION = p.getProperty( "DEFAULT_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
+        String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
+        String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String DEFAULT_PROJ_GRP_NAME = getProperty( "DEFAULT_PROJ_GRP_NAME" );
+        String DEFAULT_PROJ_GRP_ID = getProperty( "DEFAULT_PROJ_GRP_NAME" );
+        String DEFAULT_PROJ_GRP_DESCRIPTION = getProperty( "DEFAULT_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
 
         // move the project of the test project group to the default project group
-        moveProjectToProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION,
+        moveProjectToProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION, M2_PROJ_GRP_NAME,
                                    DEFAULT_PROJ_GRP_NAME );
-        showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
-        assertTextNotPresent( "Member Projects" );
         showProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
         assertTextPresent( "Member Projects" );
-        // Restore project to test test project group
+        // Restore project to test project group
         moveProjectToProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION,
-                                   TEST_PROJ_GRP_NAME );
+                                   M2_PROJ_GRP_NAME, TEST_PROJ_GRP_NAME );
         showProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
         assertTextPresent( "Member Projects" );
-        showProjectGroup( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
-        assertTextNotPresent( "Member Projects" );
     }
 
     public void testAddProjectGroupWithEmptyString()
         throws Exception
     {
-        addProjectGroup( "", "", "", false);
+        addProjectGroup( "", "", "", false );
         assertTextPresent( "Project Group Name is required." );
         assertTextPresent( "Project Group ID is required." );
     }
@@ -92,7 +90,7 @@
     public void testAddProjectGroupWithWhitespaceString()
         throws Exception
     {
-        addProjectGroup( " ", " ", " ", false);
+        addProjectGroup( " ", " ", " ", false );
         assertTextPresent( "Project Group Name cannot contain spaces only." );
         assertTextPresent( "Project Group ID cannot contain spaces only." );
     }
@@ -104,15 +102,16 @@
         final String sNewProjectName = "New Project Group Name";
         final String sNewProjectDescription = "New Project Group Description";
 
-        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
-        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
-        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+        String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
 
         editProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION, sNewProjectName,
                           sNewProjectDescription );
         assertProjectGroupSummaryPage( sNewProjectName, TEST2_PROJ_GRP_ID, sNewProjectDescription );
 
-        editProjectGroup( sNewProjectName, TEST2_PROJ_GRP_ID, sNewProjectDescription, TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_DESCRIPTION);
+        editProjectGroup( sNewProjectName, TEST2_PROJ_GRP_ID, sNewProjectDescription, TEST2_PROJ_GRP_NAME,
+                          TEST2_PROJ_GRP_DESCRIPTION );
         assertProjectGroupSummaryPage( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION );
     }
 
@@ -121,26 +120,85 @@
         throws Exception
     {
 
-        String TEST2_PROJ_GRP_NAME = p.getProperty( "TEST2_PROJ_GRP_NAME" );
-        String TEST2_PROJ_GRP_ID = p.getProperty( "TEST2_PROJ_GRP_ID" );
-        String TEST2_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
-
-        // TODO: BUG: Operations Result is a blank page
-        //editProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION, "",
-        //                  TEST2_PROJ_GRP_DESCRIPTION + "_2" );
-        //assertTextPresent( "Project Group Name required." );
+        String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" );
+        String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" );
+        String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
+        editProjectGroup( TEST2_PROJ_GRP_NAME, TEST2_PROJ_GRP_ID, TEST2_PROJ_GRP_DESCRIPTION, " ",
+                          TEST2_PROJ_GRP_DESCRIPTION );
+        assertTextPresent( "Project Group Name cannot contain spaces only" );
     }
 
-    @Test( dependsOnMethods = { "testAddMavenTwoProjectFromRemoteSourceToNonDefaultProjectGroup" } )
+    @Test( dependsOnMethods = { "testAddMavenTwoProject" } )
     public void testProjectGroupAllBuildSuccess()
         throws Exception
     {
-        String TEST_PROJ_GRP_NAME = p.getProperty( "TEST_PROJ_GRP_NAME" );
-        String TEST_PROJ_GRP_ID = p.getProperty( "TEST_PROJ_GRP_ID" );
-        String TEST_PROJ_GRP_DESCRIPTION = p.getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
-
-        buildProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_ID = getProperty( "M2_PROJ_GRP_ID" );
+        String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_PROJ_GRP_DESCRIPTION" );
+        buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION, M2_PROJ_GRP_NAME );
         clickButtonWithValue( "Release" );
         assertReleaseSuccess();
     }
+
+    @Test( dependsOnMethods = { "testAddProjectGroup" } )
+    public void testDeleteProjectGroup()
+        throws Exception
+    {
+        String TEST_GRP_NAME = getProperty( "TEST_DELETE_GRP_NAME" );
+        String TEST_GRP_ID = getProperty( "TEST_DELETE_GRP_ID" );
+        String TEST_GRP_DESCRIPTION = getProperty( "TEST_DELETE_GRP_DESCRIPTION" );
+        
+        // delete group - delete icon
+        addProjectGroup( TEST_GRP_NAME, TEST_GRP_ID, TEST_GRP_DESCRIPTION, true );
+        assertLinkPresent( TEST_GRP_NAME );
+        clickLinkWithXPath( "//tbody/tr['0']/td['4']/a/img[@alt='Delete Group']" );
+        assertTextPresent( "Project Group Removal" );
+        clickButtonWithValue( "Delete" );
+        assertProjectGroupsSummaryPage();
+        assertLinkNotPresent( TEST_GRP_NAME );
+        
+        // delete group - "Delete Group" button
+        addProjectGroup( TEST_GRP_NAME, TEST_GRP_ID, TEST_GRP_DESCRIPTION, true );
+        assertLinkPresent( TEST_GRP_NAME );
+        removeProjectGroup( TEST_GRP_NAME );
+        assertLinkNotPresent( TEST_GRP_NAME );
+        assertProjectGroupsSummaryPage();
+        assertLinkNotPresent( TEST_GRP_NAME );
+    }
+
+    public void testProjectGroupMembers()
+        throws Exception
+    {
+        String GRP_NAME_ONE = getProperty( "TEST_PROJ_GRP_NAME_ONE" );
+        String GRP_ID_ONE = getProperty( "TEST_PROJ_GRP_ID_ONE" );
+        String GRP_DESCRIPTION_ONE = getProperty( "TEST_PROJ_GRP_DESCRIPTION_ONE" );
+        String GRP_NAME_TWO = getProperty( "TEST_PROJ_GRP_NAME_TWO" );
+        String GRP_ID_TWO = getProperty( "TEST_PROJ_GRP_ID_TWO" );
+        String GRP_DESCRIPTION_TWO = getProperty( "TEST_PROJ_GRP_DESCRIPTION_TWO" );
+
+        addProjectGroup( GRP_NAME_ONE, GRP_ID_ONE, GRP_DESCRIPTION_ONE, true );
+        assertLinkPresent( GRP_NAME_ONE );
+
+        addProjectGroup( GRP_NAME_TWO, GRP_ID_TWO, GRP_DESCRIPTION_TWO, true );
+        assertLinkPresent( GRP_NAME_TWO );
+
+        createAndAddUserAsDeveloperToGroup( "username1", "user1", "user1@something.com", "password123", GRP_NAME_ONE );
+        createAndAddUserAsDeveloperToGroup( "username2", "user2", "user2@something.com", "password123", GRP_NAME_ONE );
+        createAndAddUserAsDeveloperToGroup( "username3", "user3", "user3@something.com", "password123", GRP_NAME_TWO );
+
+        showMembers( GRP_NAME_ONE, GRP_ID_ONE, GRP_DESCRIPTION_ONE );
+        assertUserPresent( "username1", "user1", "user1@something.com" );
+        assertUserPresent( "username2", "user2", "user2@something.com" );
+        assertUserNotPresent( "username3", "user3", "user3@something.com" );
+
+        showMembers( GRP_NAME_TWO, GRP_ID_TWO, GRP_DESCRIPTION_TWO );
+        assertUserNotPresent( "username1", "user1", "user1@something.com" );
+        assertUserNotPresent( "username2", "user2", "user2@something.com" );
+        assertUserPresent( "username3", "user3", "user3@something.com" );
+
+        removeProjectGroup( GRP_NAME_ONE );
+        assertLinkNotPresent( GRP_NAME_ONE );
+        removeProjectGroup( GRP_NAME_TWO );
+        assertLinkNotPresent( GRP_NAME_TWO );
+    }
 }

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/PurgeTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,110 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractPurgeTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "purge" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class PurgeTest
+    extends AbstractPurgeTest
+{
+    public void testAddRepositoryPurge()
+    {
+        String PURGE_REPOSITORY_DESCRIPTION = getProperty( "PURGE_REPOSITORY_DESCRIPTION" );
+        String PURGE_REPOSITORY_DAYS = getProperty( "PURGE_REPOSITORY_DAYS" );
+        String PURGE_REPOSITORY_RETETION = getProperty( "PURGE_REPOSITORY_RETETION" );
+        goToAddRepositoryPurge();
+        addEditRepositoryPurge( PURGE_REPOSITORY_DAYS, PURGE_REPOSITORY_RETETION, PURGE_REPOSITORY_DESCRIPTION, true );
+    }
+
+    public void testAddInvalidRepositoryPurge()
+    {
+        String PURGE_REPOSITORY_DESCRIPTION = getProperty( "PURGE_REPOSITORY_DESCRIPTION" );
+        goToAddRepositoryPurge();
+        addEditRepositoryPurge( "", "", PURGE_REPOSITORY_DESCRIPTION, false );
+        assertTextPresent( "Retention Count must be greater than 0." );
+    }
+
+    @Test( dependsOnMethods = { "testAddRepositoryPurge" } )
+    public void testEditRepositoryPurge()
+    {
+        String PURGE_REPOSITORY_DESCRIPTION = getProperty( "PURGE_REPOSITORY_DESCRIPTION" );
+        String PURGE_REPOSITORY_DAYS = getProperty( "PURGE_REPOSITORY_DAYS" );
+        String PURGE_REPOSITORY_RETETION = getProperty( "PURGE_REPOSITORY_RETETION" );
+        String newDescription = "new_description";
+        String newDays = "45";
+        String newRetention = "4";
+        goToEditRepositoryPurge( PURGE_REPOSITORY_DAYS, PURGE_REPOSITORY_RETETION, PURGE_REPOSITORY_DESCRIPTION );
+        addEditRepositoryPurge( newDays, newRetention, newDescription, true );
+        goToEditRepositoryPurge( newDays, newRetention, newDescription );
+        addEditRepositoryPurge( PURGE_REPOSITORY_DAYS, PURGE_REPOSITORY_RETETION, PURGE_REPOSITORY_DESCRIPTION, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditRepositoryPurge" } )
+    public void testDeleteRepositoryPurge()
+    {
+        String PURGE_REPOSITORY_DESCRIPTION = getProperty( "PURGE_REPOSITORY_DESCRIPTION" );
+        removeRepositoryPurge( PURGE_REPOSITORY_DESCRIPTION );
+    }
+
+    public void testAddDirectoryPurge()
+    {
+        String PURGE_DIRECTORY_DESCRIPTION = getProperty( "PURGE_DIRECTORY_DESCRIPTION" );
+        String PURGE_DIRECTORY_DAYS = getProperty( "PURGE_DIRECTORY_DAYS" );
+        String PURGE_DIRECTORY_RETETION = getProperty( "PURGE_DIRECTORY_RETETION" );
+        goToAddDirectoryPurge();
+        addEditDirectoryPurge( PURGE_DIRECTORY_DAYS, PURGE_DIRECTORY_RETETION, PURGE_DIRECTORY_DESCRIPTION, true );
+    }
+
+    public void testAddInvalidDirectoryPurge()
+    {
+        String PURGE_DIRECTORY_DESCRIPTION = getProperty( "PURGE_DIRECTORY_DESCRIPTION" );
+        goToAddDirectoryPurge();
+        addEditDirectoryPurge( "", "", PURGE_DIRECTORY_DESCRIPTION, false );
+        assertTextPresent( "Retention Count must be greater than 0." );
+    }
+
+    @Test( dependsOnMethods = { "testAddDirectoryPurge" } )
+    public void testEditDirectoryPurge()
+    {
+        String PURGE_DIRECTORY_DESCRIPTION = getProperty( "PURGE_DIRECTORY_DESCRIPTION" );
+        String PURGE_DIRECTORY_DAYS = getProperty( "PURGE_DIRECTORY_DAYS" );
+        String PURGE_DIRECTORY_RETETION = getProperty( "PURGE_DIRECTORY_RETETION" );
+        String newDescription = "new_description";
+        String newDays = "45";
+        String newRetention = "4";
+        goToEditDirectoryPurge( PURGE_DIRECTORY_DAYS, PURGE_DIRECTORY_RETETION, PURGE_DIRECTORY_DESCRIPTION );
+        addEditDirectoryPurge( newDays, newRetention, newDescription, true );
+        goToEditDirectoryPurge( newDays, newRetention, newDescription );
+        addEditDirectoryPurge( PURGE_DIRECTORY_DAYS, PURGE_DIRECTORY_RETETION, PURGE_DIRECTORY_DESCRIPTION, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditDirectoryPurge" } )
+    public void testDeleteDirectoryPurge()
+    {
+        String PURGE_DIRECTORY_DESCRIPTION = getProperty( "PURGE_DIRECTORY_DESCRIPTION" );
+        removeDirectoryPurge( PURGE_DIRECTORY_DESCRIPTION );
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/QueueTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,153 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractBuildQueueTest;
+import org.testng.annotations.Test;
+import org.apache.continuum.web.test.ScheduleTest;
+
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+
+
+@Test( groups = { "queue" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class QueueTest
+    extends AbstractBuildQueueTest
+{
+
+    public void testAddBuildQueue()
+    {
+        setMaxBuildQueue( 2 );
+        String BUILD_QUEUE_NAME = getProperty( "BUILD_QUEUE_NAME" );
+        addBuildQueue( BUILD_QUEUE_NAME, true );
+    }
+
+	@Test( dependsOnMethods = { "testAddBuildQueue" } ) //"testDeleteBuildQueue" } )
+    public void testQueuePageWithoutBuild()
+    {
+        clickAndWait( "link=Queues"  );
+        assertPage( "Continuum - Build Queue" );
+        assertTextPresent( "Nothing is building" );
+        assertTextNotPresent( "Project Name* Build Definition" );
+        assertTextPresent( "Current Build" );
+	    assertTextPresent( "Build Queue" );
+	    assertTextPresent( "Current Checkout" );
+	    assertTextPresent( "Checkout Queue " );
+	    assertTextPresent( "Current Prepare Build" );
+	    assertTextPresent( "Prepare Build Queue" );
+    }
+
+	@Test( dependsOnMethods = { "testAddBuildQueue", "testAddSchedule" } )
+    public void testAddBuildQueueToSchedule()
+  {
+	    ScheduleTest sched = new ScheduleTest();
+
+	    String SCHEDULE_NAME = getProperty( "SCHEDULE_NAME" );
+        String SCHEDULE_DESCRIPTION = getProperty( "SCHEDULE_DESCRIPTION" );
+        String SCHEDULE_EXPR_SECOND = getProperty( "SCHEDULE_EXPR_SECOND" );
+        String SCHEDULE_EXPR_MINUTE = getProperty( "SCHEDULE_EXPR_MINUTE" );
+        String SCHEDULE_EXPR_HOUR = getProperty( "SCHEDULE_EXPR_HOUR" );
+        String SCHEDULE_EXPR_DAY_MONTH = getProperty( "SCHEDULE_EXPR_DAY_MONTH" );
+        String SCHEDULE_EXPR_MONTH = getProperty( "SCHEDULE_EXPR_MONTH" );
+        String SCHEDULE_EXPR_DAY_WEEK = getProperty( "SCHEDULE_EXPR_DAY_WEEK" );
+        String SCHEDULE_EXPR_YEAR = getProperty( "SCHEDULE_EXPR_YEAR" );
+        String SCHEDULE_MAX_TIME = getProperty( "SCHEDULE_MAX_TIME" );
+        String SCHEDULE_PERIOD = getProperty( "SCHEDULE_PERIOD" );
+
+        String BUILD_QUEUE_NAME = getProperty( "BUILD_QUEUE_NAME" );
+
+
+      sched.goToEditSchedule( SCHEDULE_NAME, SCHEDULE_DESCRIPTION, SCHEDULE_EXPR_SECOND, SCHEDULE_EXPR_MINUTE,
+              SCHEDULE_EXPR_HOUR, SCHEDULE_EXPR_DAY_MONTH, SCHEDULE_EXPR_MONTH, SCHEDULE_EXPR_DAY_WEEK,
+              SCHEDULE_EXPR_YEAR, SCHEDULE_MAX_TIME, SCHEDULE_PERIOD );
+	  getSelenium().addSelection("saveSchedule_availableBuildQueuesIds", "label="+BUILD_QUEUE_NAME);
+	  getSelenium().click("//input[@value='-&gt;']");
+	  submit();
+
+  }
+
+	@Test( dependsOnMethods = { "testAddBuildQueue" } )
+    public void testAddNotAllowedBuildQueue()
+    {
+        setMaxBuildQueue( 1 );
+        String secodQueue = "second_queue_name";
+        addBuildQueue( secodQueue, false );
+        assertTextPresent( "You are only allowed 1 number of builds in parallel." );
+    }
+
+    @Test( dependsOnMethods = { "testAddBuildQueue" } )
+    public void testAddAlreadyExistBuildQueue()
+    {
+        setMaxBuildQueue( 3 );
+        String BUILD_QUEUE_NAME = getProperty( "BUILD_QUEUE_NAME" );
+        addBuildQueue( BUILD_QUEUE_NAME, false );
+        assertTextPresent( "Build queue name already exists." );
+    }
+
+    @Test( dependsOnMethods = { "testAddAlreadyExistBuildQueue" } )
+    public void testAddEmptyBuildQueue()
+    {
+        setMaxBuildQueue( 3 );
+        addBuildQueue( "", false );
+        assertTextPresent( "You must define a name" );
+    }
+
+    @Test( dependsOnMethods = { "testAddBuildQueueToSchedule" } )
+    public void testDeleteBuildQueue()
+    {
+        goToBuildQueuePage();
+        String BUILD_QUEUE_NAME = getProperty( "BUILD_QUEUE_NAME" );
+        removeBuildQueue( BUILD_QUEUE_NAME );
+        assertTextNotPresent( BUILD_QUEUE_NAME );
+    }
+
+
+    @Test( dependsOnMethods = { "testAddMavenTwoProject" } )
+    public void testQueuePageWithProjectCurrentlyBuilding()
+        throws Exception
+    {
+    	//build a project
+        String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_ID = getProperty( "M2_PROJ_GRP_ID" );
+        String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_PROJ_GRP_DESCRIPTION" );
+        buildProjectForQueuePageTest( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION, M2_PROJ_GRP_NAME );
+
+        //check queue page while building
+    	clickAndWait( "link=Queues" );
+	    assertPage( "Continuum - Build Queue" );
+	    assertTextPresent( "Current Build" );
+	    assertTextPresent( "Build Queue" );
+	    assertTextPresent( "Current Checkout" );
+	    assertTextPresent( "Checkout Queue " );
+	    assertTextPresent( "Current Prepare Build" );
+	    assertTextPresent( "Prepare Build Queue" );
+	    assertElementPresent("//table[@id='ec_table']/tbody/tr/td[4]");
+	    assertTextPresent( M2_PROJ_GRP_NAME );
+	    getSelenium().goBack();
+	    getSelenium().refresh();
+        waitPage();
+	    waitForElementPresent( "//img[@alt='Success']" );
+	    Thread.sleep( 10000 );
+    }
+
+ }

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ScheduleTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,144 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractScheduleTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "schedule" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class ScheduleTest
+    extends AbstractScheduleTest
+{
+    public void testAddScheduleNoBuildQueueToBeUsed()
+    {
+        String SCHEDULE_NAME = getProperty( "SCHEDULE_NAME" );
+        String SCHEDULE_DESCRIPTION = getProperty( "SCHEDULE_DESCRIPTION" );
+        String SCHEDULE_EXPR_SECOND = getProperty( "SCHEDULE_EXPR_SECOND" );
+        String SCHEDULE_EXPR_MINUTE = getProperty( "SCHEDULE_EXPR_MINUTE" );
+        String SCHEDULE_EXPR_HOUR = getProperty( "SCHEDULE_EXPR_HOUR" );
+        String SCHEDULE_EXPR_DAY_MONTH = getProperty( "SCHEDULE_EXPR_DAY_MONTH" );
+        String SCHEDULE_EXPR_MONTH = getProperty( "SCHEDULE_EXPR_MONTH" );
+        String SCHEDULE_EXPR_DAY_WEEK = getProperty( "SCHEDULE_EXPR_DAY_WEEK" );
+        String SCHEDULE_EXPR_YEAR = getProperty( "SCHEDULE_EXPR_YEAR" );
+        String SCHEDULE_MAX_TIME = getProperty( "SCHEDULE_MAX_TIME" );
+        String SCHEDULE_PERIOD = getProperty( "SCHEDULE_PERIOD" );
+        goToAddSchedule();
+        addEditSchedule( SCHEDULE_NAME, SCHEDULE_DESCRIPTION, SCHEDULE_EXPR_SECOND, SCHEDULE_EXPR_MINUTE,
+                         SCHEDULE_EXPR_HOUR, SCHEDULE_EXPR_DAY_MONTH, SCHEDULE_EXPR_MONTH, SCHEDULE_EXPR_DAY_WEEK,
+                         SCHEDULE_EXPR_YEAR, SCHEDULE_MAX_TIME, SCHEDULE_PERIOD, false, false );
+	assertTextPresent( "Used Build Queues cannot be empty" );
+    }
+
+    @Test( dependsOnMethods = { "testAddScheduleNoBuildQueueToBeUsed" } )
+    public void testAddSchedule()
+    {
+        String SCHEDULE_NAME = getProperty( "SCHEDULE_NAME" );
+        String SCHEDULE_DESCRIPTION = getProperty( "SCHEDULE_DESCRIPTION" );
+        String SCHEDULE_EXPR_SECOND = getProperty( "SCHEDULE_EXPR_SECOND" );
+        String SCHEDULE_EXPR_MINUTE = getProperty( "SCHEDULE_EXPR_MINUTE" );
+        String SCHEDULE_EXPR_HOUR = getProperty( "SCHEDULE_EXPR_HOUR" );
+        String SCHEDULE_EXPR_DAY_MONTH = getProperty( "SCHEDULE_EXPR_DAY_MONTH" );
+        String SCHEDULE_EXPR_MONTH = getProperty( "SCHEDULE_EXPR_MONTH" );
+        String SCHEDULE_EXPR_DAY_WEEK = getProperty( "SCHEDULE_EXPR_DAY_WEEK" );
+        String SCHEDULE_EXPR_YEAR = getProperty( "SCHEDULE_EXPR_YEAR" );
+        String SCHEDULE_MAX_TIME = getProperty( "SCHEDULE_MAX_TIME" );
+        String SCHEDULE_PERIOD = getProperty( "SCHEDULE_PERIOD" );
+        goToAddSchedule();
+        addEditSchedule( SCHEDULE_NAME, SCHEDULE_DESCRIPTION, SCHEDULE_EXPR_SECOND, SCHEDULE_EXPR_MINUTE,
+                         SCHEDULE_EXPR_HOUR, SCHEDULE_EXPR_DAY_MONTH, SCHEDULE_EXPR_MONTH, SCHEDULE_EXPR_DAY_WEEK,
+                         SCHEDULE_EXPR_YEAR, SCHEDULE_MAX_TIME, SCHEDULE_PERIOD, true, true );
+    }
+
+    public void testAddInvalidSchedule()
+    {
+        goToAddSchedule();
+        addEditSchedule( "", "", "", "", "", "", "", "", "", "", "", true, false );
+        assertTextPresent( "Invalid cron expression value(s)" );
+        assertTextPresent( "Name is required and cannot contain spaces only" );
+        assertTextPresent( "Description is required and cannot contain spaces only" );
+    }
+
+    @Test( dependsOnMethods = { "testAddSchedule" } )
+    public void testAddDuplicatedSchedule()
+    {
+        String SCHEDULE_NAME = getProperty( "SCHEDULE_NAME" );
+        String SCHEDULE_DESCRIPTION = getProperty( "SCHEDULE_DESCRIPTION" );
+        String SCHEDULE_EXPR_SECOND = getProperty( "SCHEDULE_EXPR_SECOND" );
+        String SCHEDULE_EXPR_MINUTE = getProperty( "SCHEDULE_EXPR_MINUTE" );
+        String SCHEDULE_EXPR_HOUR = getProperty( "SCHEDULE_EXPR_HOUR" );
+        String SCHEDULE_EXPR_DAY_MONTH = getProperty( "SCHEDULE_EXPR_DAY_MONTH" );
+        String SCHEDULE_EXPR_MONTH = getProperty( "SCHEDULE_EXPR_MONTH" );
+        String SCHEDULE_EXPR_DAY_WEEK = getProperty( "SCHEDULE_EXPR_DAY_WEEK" );
+        String SCHEDULE_EXPR_YEAR = getProperty( "SCHEDULE_EXPR_YEAR" );
+        String SCHEDULE_MAX_TIME = getProperty( "SCHEDULE_MAX_TIME" );
+        String SCHEDULE_PERIOD = getProperty( "SCHEDULE_PERIOD" );
+        goToAddSchedule();
+        addEditSchedule( SCHEDULE_NAME, SCHEDULE_DESCRIPTION, SCHEDULE_EXPR_SECOND, SCHEDULE_EXPR_MINUTE,
+                         SCHEDULE_EXPR_HOUR, SCHEDULE_EXPR_DAY_MONTH, SCHEDULE_EXPR_MONTH, SCHEDULE_EXPR_DAY_WEEK,
+                         SCHEDULE_EXPR_YEAR, SCHEDULE_MAX_TIME, SCHEDULE_PERIOD, true, false );
+        assertTextPresent( "A Schedule with the same name already exists" );
+    }
+
+    @Test( dependsOnMethods = { "testAddDuplicatedSchedule" } )
+    public void testEditSchedule()
+    {
+        String SCHEDULE_NAME = getProperty( "SCHEDULE_NAME" );
+        String SCHEDULE_DESCRIPTION = getProperty( "SCHEDULE_DESCRIPTION" );
+        String SCHEDULE_EXPR_SECOND = getProperty( "SCHEDULE_EXPR_SECOND" );
+        String SCHEDULE_EXPR_MINUTE = getProperty( "SCHEDULE_EXPR_MINUTE" );
+        String SCHEDULE_EXPR_HOUR = getProperty( "SCHEDULE_EXPR_HOUR" );
+        String SCHEDULE_EXPR_DAY_MONTH = getProperty( "SCHEDULE_EXPR_DAY_MONTH" );
+        String SCHEDULE_EXPR_MONTH = getProperty( "SCHEDULE_EXPR_MONTH" );
+        String SCHEDULE_EXPR_DAY_WEEK = getProperty( "SCHEDULE_EXPR_DAY_WEEK" );
+        String SCHEDULE_EXPR_YEAR = getProperty( "SCHEDULE_EXPR_YEAR" );
+        String SCHEDULE_MAX_TIME = getProperty( "SCHEDULE_MAX_TIME" );
+        String SCHEDULE_PERIOD = getProperty( "SCHEDULE_PERIOD" );
+        String name = "new_name";
+        String description = "new_description";
+        String second = "1";
+        String minute = "20";
+        String hour = "15";
+        String dayMonth = "20";
+        String month = "9";
+        String dayWeek = "?";
+        String year = "";
+        String maxTime = "9000";
+        String period = "0";
+        goToEditSchedule( SCHEDULE_NAME, SCHEDULE_DESCRIPTION, SCHEDULE_EXPR_SECOND, SCHEDULE_EXPR_MINUTE,
+                          SCHEDULE_EXPR_HOUR, SCHEDULE_EXPR_DAY_MONTH, SCHEDULE_EXPR_MONTH, SCHEDULE_EXPR_DAY_WEEK,
+                          SCHEDULE_EXPR_YEAR, SCHEDULE_MAX_TIME, SCHEDULE_PERIOD );
+        addEditSchedule( name, description, second, minute, hour, dayMonth, month, dayWeek, year, maxTime, period, false, true );
+        goToEditSchedule( name, description, second, minute, hour, dayMonth, month, dayWeek, year, maxTime, period );
+        addEditSchedule( SCHEDULE_NAME, SCHEDULE_DESCRIPTION, SCHEDULE_EXPR_SECOND, SCHEDULE_EXPR_MINUTE,
+                         SCHEDULE_EXPR_HOUR, SCHEDULE_EXPR_DAY_MONTH, SCHEDULE_EXPR_MONTH, SCHEDULE_EXPR_DAY_WEEK,
+                         SCHEDULE_EXPR_YEAR, SCHEDULE_MAX_TIME, SCHEDULE_PERIOD, false, true );
+    }
+
+    @Test( dependsOnMethods = { "testEditSchedule" } )
+    public void testDeleteSchedule()
+    {
+        String SCHEDULE_NAME = getProperty( "SCHEDULE_NAME" );
+        removeSchedule( SCHEDULE_NAME );
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SetupSelenium.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,98 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractContinuumTest;
+import org.testng.Assert;
+import org.testng.annotations.AfterTest;
+import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.Optional;
+import org.testng.annotations.Parameters;
+import org.testng.annotations.Test;
+
+/**
+ * Based on SetupSelenium of Wendy Smoak test.
+ * 
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "setup" }, alwaysRun = true )
+public class SetupSelenium
+    extends AbstractContinuumTest
+{
+    @Override
+    @AfterTest
+    public void close()
+        throws Exception
+    {
+        super.close();
+    }
+
+    @Override
+    @BeforeSuite
+    public void open()
+        throws Exception
+    {
+        super.open();
+    }
+
+    @BeforeTest
+    @Parameters( { "baseUrl", "browser", "seleniumHost", "seleniumPort" } )
+    public void initializeContinuum( String baseUrl, 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();
+            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();
+        }
+    }
+}
\ No newline at end of file

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,80 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.apache.continuum.web.test.parent.AbstractContinuumTest;
+import org.testng.annotations.Test;
+
+/**
+ * Based on AddShellProjectTestCase of Emmanuel Venisse.
+ *
+ * @author JosÃ© Morales MartÃ­nez
+ * @version $Id$
+ */
+@Test( groups = { "shellProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+public class ShellProjectTest
+    extends AbstractContinuumTest
+{
+    public void testAddShellProject()
+        throws Exception
+    {
+        String SHELL_NAME = getProperty( "SHELL_NAME" );
+        String SHELL_DESCRIPTION = getProperty( "SHELL_DESCRIPTION" );
+        String SHELL_VERSION = getProperty( "SHELL_VERSION" );
+        String SHELL_TAG = getProperty( "SHELL_TAG" );
+        String SHELL_SCM_URL = getProperty( "SHELL_SCM_URL" );
+        String SHELL_SCM_USERNAME = getProperty( "SHELL_SCM_USERNAME" );
+        String SHELL_SCM_PASSWORD = getProperty( "SHELL_SCM_PASSWORD" );
+        String DEFAULT_PROJ_GRP_NAME = getProperty( "DEFAULT_PROJ_GRP_NAME" );
+        String DEFAULT_PROJ_GRP_ID = getProperty( "DEFAULT_PROJ_GRP_ID" );
+        String DEFAULT_PROJ_GRP_DESCRIPTION = getProperty( "DEFAULT_PROJ_GRP_DESCRIPTION" );
+        goToAddShellProjectPage();
+        addProject( SHELL_NAME, SHELL_DESCRIPTION, SHELL_VERSION, SHELL_SCM_URL, SHELL_SCM_USERNAME,
+                    SHELL_SCM_PASSWORD, SHELL_TAG, false, DEFAULT_PROJ_GRP_NAME, null, true );
+        assertProjectGroupSummaryPage( DEFAULT_PROJ_GRP_NAME, DEFAULT_PROJ_GRP_ID, DEFAULT_PROJ_GRP_DESCRIPTION );
+    }
+
+    public void testSubmitEmptyForm()
+    {
+        goToAddShellProjectPage();
+        submit();
+        assertAddProjectPage( "shell" );
+        assertTextPresent( "Name is required and cannot contain null or spaces only" );
+        assertTextPresent( "Version is required and cannot contain null or spaces only" );
+        assertTextPresent( "SCM Url is required and cannot contain null or spaces only" );
+    }
+
+    @Test( dependsOnMethods = { "testAddShellProject" } )
+    public void testAddDupliedShellProject()
+        throws Exception
+    {
+        String SHELL_NAME = getProperty( "SHELL_NAME" );
+        String SHELL_DESCRIPTION = getProperty( "SHELL_DESCRIPTION" );
+        String SHELL_VERSION = getProperty( "SHELL_VERSION" );
+        String SHELL_TAG = getProperty( "SHELL_TAG" );
+        String SHELL_SCM_URL = getProperty( "SHELL_SCM_URL" );
+        String SHELL_SCM_USERNAME = getProperty( "SHELL_SCM_USERNAME" );
+        String SHELL_SCM_PASSWORD = getProperty( "SHELL_SCM_PASSWORD" );
+        goToAddShellProjectPage();
+        addProject( SHELL_NAME, SHELL_DESCRIPTION, SHELL_VERSION, SHELL_SCM_URL, SHELL_SCM_USERNAME,
+                    SHELL_SCM_PASSWORD, SHELL_TAG, false, null, null, false );
+        assertTextPresent( "Project name already exist" );
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/UserRolesManagementTest.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,627 @@
+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 )
+public class UserRolesManagementTest
+    extends AbstractUserRolesManagementTest
+{
+    public void testBasicAddDeleteUser()
+    {
+        username = getProperty( "GUEST_USERNAME" );
+        fullname = getProperty( "GUEST_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        deleteUser( username, fullname, getUserEmail() );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+    
+    /*
+     * GUEST USER ROLE
+     * Guest Role could only view the About Page. Project Groups should not be shown when clicking
+     * Show Project Group link.
+    */
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" } )
+    public void testAddUserWithGuestRole()
+    {
+        username = getProperty( "GUEST_USERNAME" );
+        fullname = getProperty( "GUEST_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        //checkUserRoleWithValue( fullname );
+        clickLinkWithLocator( "addRolesToUser_addNDSelectedRoles", false );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        //assertTextPresent( "Password successfully changed" );        
+        clickLinkWithText( "Logout" );
+    }
+
+    @Test( dependsOnMethods = { "testAddUserWithGuestRole" } )
+    public void testGuestUserRoleFunction()
+    {
+        username = getProperty( "GUEST_USERNAME" );
+        fullname = getProperty( "GUEST_FULLNAME" );
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        goToAboutPage();
+        clickLinkWithText( "Show Project Groups" );
+        assertTextPresent( "Project Groups list is empty" );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+
+    /*
+     * REGISTERED USER ROLE
+     * Registered User Role could only view the About Page. Project Groups should not be shown when clicking
+     * Show Project Group link.
+    */
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" , "testGuestUserRoleFunction" } )
+    public void testAddUserWithRegisteredUserRole()
+    {
+        username = getProperty( "REGISTERED_USERNAME" );
+        fullname = getProperty( "REGISTERED_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+
+        clickLinkWithText( "Logout" );
+        // assertTextPresent("You are already logged in.");
+    }
+
+    @Test( dependsOnMethods = { "testAddUserWithRegisteredUserRole" } )
+    public void testRegisteredRoleFunction()
+    {
+        username = getProperty( "REGISTERED_USERNAME" );
+        fullname = getProperty( "REGISTERED_FULLNAME" );
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        goToAboutPage();
+        clickLinkWithText( "Show Project Groups" );
+        assertTextPresent( "Project Groups list is empty." );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    /*
+     * SYSTEM ADMINISTRATOR ROLE
+     * Has access to all functions in the application.
+     *
+     * The following tests only asserts elements that could be shown 
+     * when system admin user is logged in since the user that is used 
+     * to test the other functionalities is a system admin user.
+     */
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" , "testRegisteredRoleFunction" } )
+    public void testAddUserWithSystemAdminRole()
+    {
+        username = getProperty( "SYSAD_USERNAME" );
+        fullname = getProperty( "SYSAD_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+
+        clickLinkWithText( "Logout" );
+    }
+
+    @Test( dependsOnMethods = { "testAddUserWithSystemAdminRole" } )
+    public void testSystemAdminRoleFunction()
+    {
+	    username = getProperty( "SYSAD_USERNAME" );
+        fullname = getProperty( "SYSAD_FULLNAME" );
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Show Project Groups" );
+        assertTextNotPresent( "Project Groups list is empty." );
+        assertLinkPresent( "Default Project Group" );
+	
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    /* 
+     * USER ADMIN ROLE
+     * User Admin role could only add/edit/delete users and can view user Roles. Cannot view Project Groups
+     * but can assign a User to a project.
+     *
+     */
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" , "testSystemAdminRoleFunction" } )
+    public void testAddUserWithUserAdminRole()
+    {
+        username = getProperty( "USERADMIN_USERNAME" );
+        fullname = getProperty( "USERADMIN_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+		clickButtonWithValue( "Submit" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+
+        clickLinkWithText( "Logout" );
+    }
+    
+    @Test( dependsOnMethods = { "testAddUserWithUserAdminRole" } )
+    public void testUserAdminFunction()
+    {
+        username = getProperty( "USERADMIN_USERNAME" );
+        fullname = getProperty( "USERADMIN_FULLNAME" );
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Show Project Groups" );
+        assertTextPresent( "Project Groups list is empty." );
+        // add user
+        clickLinkWithText( "Users" );
+        clickButtonWithValue( "Create New User" );
+	    assertCreateUserPage();
+	    setFieldValue( "user.username", "guest0" );
+        setFieldValue( "user.fullName", "guest0" );
+        setFieldValue( "user.email", "guest0@guest0.com" );
+        setFieldValue( "user.password", "pass" );
+        setFieldValue( "user.confirmPassword", "pass" );
+        submit();
+        assertUserRolesPage( );
+        clickButtonWithValue( "Submit" );
+        selectValue( "name=ec_rd", "50" );
+        waitPage();
+        // delete user	
+        deleteUser( "guest0", "guest0", "guest0@guest0.com" );	
+        // TODO edit user
+
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    /*
+     * CONTINUUM GROUP PROJECT ADMIN
+     * - Can Add/Edit/Delete Project Group, can Add/Edit/Delete projects, can assign Users
+     *    roles to existing projects, can add/edit/delete schedules, can view existing roles for the
+     *    projects, can build/release projects
+     * - Cannot add users, --- --- ---
+     */
+    @Test( dependsOnMethods = { "testBasicAddDeleteUser" , "testUserAdminFunction" } )
+    public void testAddUserWithContinuumGroupProjectAdminRole()
+    {
+        username = getProperty( "GROUPPROJECTADMIN_USERNAME" );
+        fullname = getProperty( "GROUPPROJECTADMIN_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+
+        // enable distributed build
+        clickLinkWithText( "Configuration" );
+        clickLinkWithLocator( "configuration_distributedBuildEnabled", false );
+        clickButtonWithValue( "Save" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+
+	    assertProjectAdministratorAccess();
+
+        clickLinkWithText( "Logout" );
+
+        login( getAdminUsername(), getAdminPassword() );
+        // disable distributed build
+        clickLinkWithText( "Configuration" );
+        clickLinkWithLocator( "configuration_distributedBuildEnabled", false );
+        clickButtonWithValue( "Save" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertProjectAdministratorAccess();
+
+        clickLinkWithText( "Logout" );
+    }
+
+    @Test( dependsOnMethods = { "testAddUserWithContinuumGroupProjectAdminRole" } )
+    public void testContinuumGroupProjectAdmin_AddProjectGroup() throws Exception
+    {
+        username = getProperty( "GROUPPROJECTADMIN_USERNAME" );
+        fullname = getProperty( "GROUPPROJECTADMIN_FULLNAME" );
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Show Project Groups" );
+        assertTextNotPresent( "Project Groups list is empty." );
+        // test add project group
+        clickButtonWithValue( "Add Project Group" );
+        setFieldValue( "name", "Test Group" );
+        setFieldValue( "groupId", "Test Group" );
+        setFieldValue( "description", "testing project group" );
+        submit();
+    }
+
+    @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_AddProjectGroup" } )
+    public void testContinuumGroupProjectAdmin_AddProjectToProjectGroup() throws Exception
+    {
+        clickLinkWithText( "Test Group" );
+        clickButtonWithValue( "Add" );	
+        assertAddMavenTwoProjectPage();
+        setFieldValue( "m2PomUrl", "https://svn.apache.org/repos/asf/continuum/sandbox/continuum-build-queue-test-data/pom.xml" );
+        clickButtonWithValue( "Add" );
+        String title;
+        boolean success = true;
+        if ( success )
+        {
+            title = "Continuum - Project Group";
+        }
+        else
+        {
+            title = "Continuum - Add Maven 2 Project";
+        }
+        waitAddProject( title );
+        assertTextPresent( "ContinuumBuildQueueTestData" );
+    }
+    
+    @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_AddProjectToProjectGroup" } )
+    public void testContinuumGroupProjectAdmin_BuildProject() throws Exception
+    {
+        buildProjectGroup( "Test Group", "Test Group", "testing project group", "ContinuumBuildQueueTestData" );
+    }
+
+    @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_BuildProject" } )
+    public void testContinuumGroupProjectAdmin_AssignUserToAGroup()
+    {
+        clickLinkWithText( "Users" );
+        clickLinkWithText( "guest1" );
+        clickLinkWithText( "Edit Roles" );
+        checkUserRoleWithValue( "Guest" );
+        checkResourceRoleWithValue( "Project Developer - Test Group" );
+        submit();
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    /*
+     * Uncomment the lines below to release a Project provided that you add
+     * the values under RELEASE A PROJECT in testng.properties file (project's pom url, access to project to be released.)
+    	
+    @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_AssignUserToAGroup" } )
+    public void testContinuumGroupProjectAdmin_ReleaseProject() throws Exception
+    {
+	String projectUrl = getProperty( "PROJECT_URL_TO_BE_RELEASED" );
+	String projectName = getProperty( "PROJECT_NAME_TO_BE_RELEASED" );
+	String projectUsername = getProperty( "PROJECT_USERNAME" );
+	String projectPassword = getProperty( "PROJECT_USERNAME" );
+	// add a project group
+	clickLinkWithText( "Show Project Groups" );
+	clickButtonWithValue( "Add Project Group" );
+	setFieldValue( "name", "Project Group" );
+        setFieldValue( "groupId", "Project Group" );
+        setFieldValue( "description", "project group for projects to be released" );
+	submit();
+	// add a project to a project group
+	clickLinkWithText( "Project Group" );
+	clickButtonWithValue( "Add" );
+	assertAddMavenTwoProjectPage();
+	setFieldValue( "m2PomUrl", projectUrl );
+	// set username and password here
+	setFieldValue( "scmUsername", projectUsername );
+	setFieldValue( "scmPassword", projectPassword );
+	clickButtonWithValue( "Add" );
+	String title;
+	boolean success = true;
+	if ( success )
+        {
+            title = "Continuum - Project Group";
+        }
+        else
+        {
+            title = "Continuum - Add Maven 2 Project";
+        }
+        waitAddProject( title );
+	// build the project added in the project group
+	buildProjectGroup( "Project Group", "Project Group", "project group for projects to be released", projectName );
+	// release the project
+	clickButtonWithValue( "Release" );
+	clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+    */
+
+    @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_BuildProject" } )
+    public void testUserWithContinuumGroupProjectDeveloperRole()
+    {
+        username = getProperty( "GROUPPROJECTDEVELOPER_USERNAME" );
+        fullname = getProperty( "GROUPPROJECTDEVELOPER_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithContinuumGroupProjectDeveloperRole" } )
+    public void testUserWithContinuumGroupProjectUserRole()
+    {
+        username = getProperty( "GROUPPROJECTUSER_USERNAME" );
+        fullname = getProperty( "GROUPPROJECTUSER_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithContinuumGroupProjectUserRole" } )
+    public void testUserWithContinuumManageBuildEnvironmentRole()
+    {
+        username = getProperty( "MANAGEBUILDENVIRONMENT_USERNAME" );
+        fullname = getProperty( "MANAGEBUILDENVIRONMENT_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );	
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithContinuumManageBuildEnvironmentRole" } )
+    public void testUserWithContinuumManageBuildTemplatesRole()
+    {
+        username = getProperty( "MANAGEBUILDTEMPLATES_USERNAME" );
+        fullname = getProperty( "MANAGEBUILDTEMPLATES_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithContinuumManageBuildTemplatesRole" } )
+    public void testUserWithContinuumManageInstallationsRole()
+    {
+        username = getProperty( "MANAGEINSTALLATIONS_USERNAME" );
+        fullname = getProperty( "MANAGEINSTALLATIONS_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithContinuumManageInstallationsRole" } )
+    public void testUserWithContinuumManageLocalRepoRole()
+    {
+        username = getProperty( "MANAGELOCALREPOS_USERNAME" );
+        fullname = getProperty( "MANAGELOCALREPOS_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithContinuumManageLocalRepoRole" } )
+    public void testUserWithContinuumManagePurgingRole()
+    {
+        username = getProperty( "MANAGEPURGING_USERNAME" );
+        fullname = getProperty( "MANAGEPURGING_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithContinuumManagePurgingRole" } )
+    public void testUserWithContinuumManageQueuesRole()
+    {
+        username = getProperty( "MANAGEQUEUES_USERNAME" );
+        fullname = getProperty( "MANAGEQUEUES_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+	    clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithContinuumManageQueuesRole" } )
+    public void testUserWithContinuumManageSchedulingRole()
+    {
+        username = getProperty( "MANAGESCHEDULING_USERNAME" );
+        fullname = getProperty( "MANAGESCHEDULING_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkUserRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithContinuumManageSchedulingRole" } )
+    public void testUserWithProjectAdminDefaultProjectGroup()
+    {
+        username = getProperty( "PROJECTADMINISTRATOR_DEFAULTPROJECTGROUP_USERNAME" );
+        fullname = getProperty( "PROJECTADMINISTRATOR_DEFAULTPROJECTGROUP_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkResourceRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithProjectAdminDefaultProjectGroup" } )
+    public void testUserWithProjectDevDefaultProjectGroup()
+    {
+        username = getProperty( "PROJECTDEVELOPER_DEFAULTPROJECTGROUP_USERNAME" );
+        fullname = getProperty( "PROJECTDEVELOPER_DEFAULTPROJECTGROUP_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkResourceRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+    @Test( dependsOnMethods = { "testUserWithProjectDevDefaultProjectGroup" } )
+    public void testUserWithProjectUserDefaultProjectGroup()
+    {
+        username = getProperty( "PROJECTUSER_DEFAULTPROJECTGROUP_USERNAME" );
+        fullname = getProperty( "PROJECTUSER_DEFAULTPROJECTGROUP_FULLNAME" );
+
+        createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
+        assertCreatedUserInfo( username );
+        checkResourceRoleWithValue( fullname );
+        clickButtonWithValue( "Submit" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRolePassword() );
+        changePassword( getUserRolePassword(), getUserRoleNewPassword() );
+        assertTextPresent( "Password successfully changed" );
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
+    }
+
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/XPathExpressionUtil.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/XPathExpressionUtil.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/XPathExpressionUtil.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/XPathExpressionUtil.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,245 @@
+package org.apache.continuum.web.test;
+
+/*
+ * 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.
+ */
+
+/**
+ * Utility class for creating xpath expressions
+ */
+public class XPathExpressionUtil
+{
+    public static final String CONTAINS = "contains";
+
+    public static final String AND = " and ";
+
+    public static final String CURRENT_NODE = "./";
+
+    public static final String PARENT_NODE = "../";
+
+    public static final String GRANDPARENT_NODE = "../../";
+
+    public static final String ELEMENT_ANY_LEVEL = "//";
+
+    public static final String TABLE_COLUMN = "td";
+
+    public static final String TABLE_ROW = "tr";
+
+    public static final String START_NODE_TEST = "[";
+
+    public static final String END_NODE_TEST = "]";
+
+    public static final String ANCHOR = "a";
+
+    public static final String IMG = "img";
+
+    public static final String LIST = "ul";
+
+    public static final String LINE = "li";
+
+    public static String getList( String[] values )
+    {
+        String xpathExpression = "";
+
+        if ( values.length &gt; 0 )
+        {
+            xpathExpression += ELEMENT_ANY_LEVEL;
+            xpathExpression += LIST;
+            xpathExpression += START_NODE_TEST;
+
+            for (int nIndex = 0; nIndex &lt; values.length; nIndex++ )
+            {
+                xpathExpression += ( ( nIndex &gt; 0 ) ? AND : "" );
+                xpathExpression += contains( LINE + position( nIndex + 1 ), values[nIndex] );
+            }
+
+            xpathExpression += END_NODE_TEST;
+        }
+
+        return xpathExpression;
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     *
+     * @param element      the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    public static String getColumnElement( String element, int elementIndex, String[] columnValues )
+    {
+        return getColumnElement( element, elementIndex, null, columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     *
+     * @param element      the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param elementValue the matched element value
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    public static String getColumnElement( String element, int elementIndex, String elementValue,
+                                           String[] columnValues )
+    {
+        return getColumnElement( element, elementIndex, elementValue, "TEXT", columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     *
+     * @param element      the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param imageName the matched image name
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    public static String getImgColumnElement( String element, int elementIndex, String imageName,
+                                           String[] columnValues )
+    {
+        return getColumnElement( element, elementIndex, imageName, IMG, columnValues );
+    }
+
+    /**
+     * expression for acquiring an element in one of the table columns
+     *
+     * @param element      the node element
+     * @param elementIndex column index of the element, used for skipping
+     * @param imageName the matched image name
+     * @param columnValues the values to be matched in each column, element column is included
+     * @return
+     */
+    private static String getColumnElement( String element, int elementIndex, String elementValue,
+                                            String elementValueType, String[] columnValues )
+    {
+        String xpathExpression = null;
+
+        if ( ( columnValues != null ) &amp;&amp; ( columnValues.length &gt; 0 ) )
+        {
+            xpathExpression = ELEMENT_ANY_LEVEL + element;
+            xpathExpression += START_NODE_TEST;
+
+            if ( elementValue != null )
+            {
+                if ( "TEXT".equals( elementValueType ) )
+                {
+                    xpathExpression += contains( elementValue );
+                    xpathExpression += ( columnValues.length &gt; 0 ) ? AND : "";
+                }
+            }
+
+            // we are two levels below the table row element ( tr/td/&lt;element&gt; )
+            xpathExpression += matchColumns( GRANDPARENT_NODE, columnValues, elementIndex );
+
+            xpathExpression += END_NODE_TEST;
+        }
+
+        if ( IMG.equals( elementValueType ) )
+        {
+            xpathExpression += "/img[contains(@src, '" + elementValue + "')]";
+        }
+
+        return xpathExpression;
+    }
+
+    /**
+     * expression for acquiring the table row that matches all column values with the same order
+     * as the list
+     *
+     * @param columnValues the matched list of columnValues
+     * @return
+     */
+    public static String getTableRow( String[] columnValues )
+    {
+        String xpathExpression = null;
+
+        if ( ( columnValues != null ) &amp;&amp; ( columnValues.length &gt; 0 ) )
+        {
+            xpathExpression = new String( ELEMENT_ANY_LEVEL + TABLE_ROW + START_NODE_TEST );
+            xpathExpression += matchColumns( columnValues );
+            xpathExpression += END_NODE_TEST;
+        }
+
+        return xpathExpression;
+    }
+
+    private static String matchColumns( String[] columnValues )
+    {
+        return matchColumns( columnValues, -1 );
+    }
+
+    private static String matchColumns( String[] columnValues, int skipIndex )
+    {
+        return matchColumns( null, columnValues, skipIndex );
+    }
+
+    private static String matchColumns( String parent, String[] columnValues, int skipIndex )
+    {
+        String xpathExpression = "";
+
+        for ( int nIndex = 0; nIndex &lt; columnValues.length; nIndex++ )
+        {
+            if ( ( skipIndex != nIndex ) || ( skipIndex == -1 ) )
+            {
+                // prepend "and" if index &gt; 0
+                xpathExpression += ( ( nIndex &gt; 0 ) ? AND : "" );
+                xpathExpression += contains( parent, TABLE_COLUMN + position( nIndex + 1 ), columnValues[nIndex] );
+            }
+        }
+
+        return xpathExpression;
+    }
+
+    private static String position( int nIndex )
+    {
+        return new String( "[" + nIndex + "]" );
+    }
+
+    private static String contains( String parent, String element, String matchedString )
+    {
+        String finalElement = ( parent != null ) ? parent : "";
+        finalElement += element;
+
+        return contains( finalElement, matchedString );
+    }
+
+    private static String contains( String matchedString )
+    {
+        return contains( ".", matchedString );
+    }
+
+    private static String contains( String axis, String matchedString )
+    {
+        return new String( CONTAINS + "(" + axis + "," + "'" + matchedString + "')" );
+    }
+
+    private static String equals( String parent, String element, String matchedString )
+    {
+        String finalElement = ( parent != null ) ? parent : "";
+        finalElement += element;
+
+        return equals( finalElement, matchedString );
+    }
+
+    private static String equals( String axis, String matchedString )
+    {
+        return new String( axis + "==" + "'" + matchedString + "'" );
+    }
+}
\ No newline at end of file

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java Tue Nov 10 05:38:01 2009
@@ -0,0 +1,101 @@
+package org.apache.continuum.web.test.listener;
+
+/*
+ * 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 java.io.File;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+import java.util.regex.Pattern;
+
+import org.apache.continuum.web.test.parent.AbstractSeleniumTest;
+import org.testng.ITestResult;
+import org.testng.TestListenerAdapter;
+
+public class CaptureScreenShotsListener
+    extends TestListenerAdapter
+{
+    @Override
+    public void onTestFailure( ITestResult tr )
+    {
+        captureError( tr );
+        System.out.println( "Test " + tr.getName() + " -&gt; Failed" );
+        super.onTestFailure( tr );
+    }
+
+    @Override
+    public void onTestSuccess( ITestResult tr )
+    {
+        System.out.println( "Test " + tr.getName() + " -&gt; Success" );
+        super.onTestFailure( tr );
+    }
+
+    private void captureError( ITestResult tr )
+    {
+        try
+        {
+            captureScreenshot( tr );
+        }
+        catch ( RuntimeException e )
+        {
+            System.out.println( "Error when take screenshot for test " + tr.getName() );
+            e.printStackTrace();
+        }
+    }
+
+    // captureAssertionError() creates a 'target/screenshots' directory and saves '.png' page screenshot of the
+    // encountered error
+    private void captureScreenshot( ITestResult tr )
+    {
+        File f = new File( "" );
+        String filePath = f.getAbsolutePath();
+        Date d = new Date();
+        SimpleDateFormat sdf = new SimpleDateFormat( "yyyy.MM.dd-HH_mm_ss" );
+        String time = sdf.format( d );
+        String fs = File.separator;
+        File targetPath = new File( filePath + fs + "target" + fs + "screenshots" );
+        targetPath.mkdir();
+        String cName = tr.getTestClass().getName();
+        StackTraceElement stackTrace[] = tr.getThrowable().getStackTrace();
+        int index = getStackTraceIndexOfCallingClass( cName, stackTrace );
+        String methodName = stackTrace[index].getMethodName();
+        int lNumber = stackTrace[index].getLineNumber();
+        String lineNumber = Integer.toString( lNumber );
+        String className = cName.substring( cName.lastIndexOf( '.' ) + 1 );
+        String fileName =
+            targetPath.toString() + fs + methodName + "(" + className + ".java_" + lineNumber + ")-" + time + ".png";
+        AbstractSeleniumTest.getSelenium().windowMaximize();
+        AbstractSeleniumTest.getSelenium().captureEntirePageScreenshot( fileName, "" );
+    }
+
+    private int getStackTraceIndexOfCallingClass( String nameOfClass, StackTraceElement stackTrace[] )
+    {
+        boolean match = false;
+        int i = 0;
+        do
+        {
+            String className = stackTrace[i].getClassName();
+            match = Pattern.matches( nameOfClass, className );
+            i++;
+        }
+        while ( match == false );
+        i--;
+        return i;
+    }
+}




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r834357 [2/7] - in /continuum/branches/continuum-1.3.x/continuum-webapp-test: ./ src/site/ src/site/apt/ src/test/it/org/apache/continuum/web/test/ src/test/resources/ src/test/testng/config/ src/test/testng/org/apache/continuum/web/test/ s...</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091110053804.3DA8523889B6@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091110053804-3DA8523889B6@eris-apache-org%3e</id>
<updated>2009-11-10T05:38:03Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AbstractSeleniumTestCase.java Tue Nov 10 05:38:01 2009
@@ -26,8 +26,6 @@
 
 import java.io.File;
 import java.util.Calendar;
-import java.util.Iterator;
-import java.util.Map;
 import java.util.Properties;
 
 /**
@@ -119,7 +117,15 @@
     {
     	if ( getTitle().endsWith( "Continuum - Configuration" ) )
     	{
-    		setFieldValue("baseUrl", baseUrl);
+    		String workingDir = sel.getValue( "configuration_workingDirectory" );
+    		String buildOutputDir = sel.getValue( "configuration_buildOutputDirectory" );
+    		String releaseOutputDir = sel.getValue( "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 );
     		clickButtonWithValue( "Save" );
     	}
     }
@@ -236,7 +242,7 @@
     {
         assertEquals( getTitlePrefix() + title, getTitle() );
         assertHeader();
-        assertFooter();
+        //assertFooter();
     }
 
     public abstract void assertHeader();
@@ -353,18 +359,6 @@
         }
     }
 
-    public void setFieldValues( Map fieldMap )
-    {
-        Map.Entry entry;
-
-        for ( Iterator entries = fieldMap.entrySet().iterator(); entries.hasNext(); )
-        {
-            entry = (Map.Entry) entries.next();
-
-            sel.type( (String) entry.getKey(), (String) entry.getValue() );
-        }
-    }
-
     public void setFieldValue( String fieldName, String value )
     {
         sel.type( fieldName, value );
@@ -444,7 +438,7 @@
 
         if ( validUsernamePassword )
         {
-            //assertTextPresent( "Current User:" );
+            assertTextPresent( "Current User:" );
             assertTextPresent( username );
             assertLinkPresent( "Edit Details" );
             assertLinkPresent( "Logout" );
@@ -529,41 +523,32 @@
         setFieldValue( "user.confirmPassword", confirmNewPassword );
         clickButtonWithValue( "Submit" );
     }
-
+    
     //////////////////////////////////////
-    // Users
+    // User Roles
     //////////////////////////////////////
-    public void assertUsersListPage()
+    public void assertUserRoleCheckBoxPresent( String value )
     {
-        assertPage( "[Admin] User List" );
+    	sel.isElementPresent( "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='"+ value + "']" );
     }
-
-    public void assertCreateUserPage()
+    
+    public void assertResourceRolesCheckBoxPresent( String value ) 
     {
-        assertPage( "[Admin] User Create" );
-        assertTextPresent( "Username" );
-        assertTextPresent( "Full Name" );
-        assertTextPresent( "Email Address" );
-        assertTextPresent( "Password" );
-        assertTextPresent( "Confirm Password" );
+    	sel.isElementPresent( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
     }
-
-    public void assertUserRolesPage()
+  
+    public void checkUserRoleWithValue( String value ) 
     {
-        assertPage( "[Admin] User Edit" );
-        assertTextPresent( "[Admin] User Roles" );
-        assertTextPresent( "Assigned Roles" );
-        assertTextPresent( "Available Roles" );
+    	assertUserRoleCheckBoxPresent( value );
+    	sel.click( "xpath=//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles' and @value='"+ value + "']" );
     }
 
-    public void assertDeleteUserPage( String username )
+    public void checkResourceRoleWithValue( String value ) 
     {
-        assertPage( "[Admin] User Delete" );
-        assertTextPresent( "[Admin] User Delete" );
-        assertTextPresent( "The following user will be deleted: " + username );
-        assertButtonWithValuePresent( "Delete User" );
+    	assertResourceRolesCheckBoxPresent( value );
+    	sel.click( "xpath=//input[@name='addDSelectedRoles' and @value='" + value + "']" );
     }
-
+    
     //////////////////////////////////////
     // Create Admin User
     //////////////////////////////////////

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AccountSecurityTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AccountSecurityTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AccountSecurityTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AccountSecurityTest.java Tue Nov 10 05:38:01 2009
@@ -37,23 +37,50 @@
 
     public static final String CONFIRM_PASSWORD_FIELD = "user.confirmPassword";
 
-    // user account 1
-    public static final String CUSTOM_USERNAME = "custom1";
-
-    public static final String CUSTOM_USERNAME2 = "custom2";
-
-    public static final String CUSTOM_USERNAME3 = "custom3";
-
-    public static final String CUSTOM_USERNAME4 = "custom4";
-
-    public static final String CUSTOM_USERNAME5 = "custom5";
-
+    public static final String DUMMY_USER = "user_dummy";
+    
+    public static final String GUEST_USER = "new_guest";
+    
+    public static final String REGISTERED_USER = "reguser";
+
+    public static final String SYSTEM_ADMINISTRATOR = "sysad";
+    
+    public static final String USER_ADMINISTRATOR = "useradmin";
+    
+    public static final String GROUP_PROJECT_ADMIN = "projadmingroup";
+    
+    public static final String GROUP_PROJECT_DEVELOPER = "projdevgroup";
+    
+    public static final String GROUP_PROJECT_USER = "projusergroup";
+    
+    public static final String MANAGE_BUILD_ENV = "managebuildenv";
+    
+    public static final String MANAGE_BUILD_TEMPLATES = "managebuildtemp";
+    
+    public static final String INSTALLATION = "manageinstallation";
+    
+    public static final String LOCAL_REPOSITORIES = "managelocalrepo";
+    
+    public static final String PURGING = "managepurging";
+    
+    public static final String QUEUES = "managequeues";
+    
+    public static final String SCHEDULING = "scheduling";
+    
+    public static final String PROJECT_ADMIN = "projectadmin";
+    
+    public static final String PROJECT_DEV = "projectdev";
+    
+    public static final String PROJECT_USER = "projectuser";
+    
     public static final String CUSTOM_FULLNAME = "custom fullname";
 
     public static final String CUSTOM_EMAILADD = "custom@custom.com";
 
-    public static final String CUSTOM_PASSWORD = "custompassword";
+    public static final String CUSTOM_PASSWORD = "custompassword1";
 
+    public static final String CUSTOM_PASSWORD1 = "user1234";
+    
     public String getUsername()
     {
         return super.adminUsername;
@@ -64,203 +91,594 @@
         return super.adminPassword;
     }
 
-   /* TODO needs to be updated
-    * 
-    * public void tearDown()
-        throws Exception
-    {
-        login( adminUsername, adminPassword );
-
-        clickLinkWithText( "Users" );
-
-        String[] users = {CUSTOM_USERNAME, CUSTOM_USERNAME2, CUSTOM_USERNAME3, CUSTOM_USERNAME4, CUSTOM_USERNAME5};
-
-        for ( int i = 0; i &lt; users.length; i++ )
-        {
-            String[] columns = new String[]{users[i], CUSTOM_FULLNAME, CUSTOM_EMAILADD};
-            if ( isElementPresent( XPathExpressionUtil.getTableRow( columns ) ) )
-            {
-                if ( i == 4 )
-                {
-                    // TODO! this is due to a bug where roles are not removed with the user, so remove them by hand [CONTINUUM-1095]
-                    clickLinkWithText( CUSTOM_USERNAME5 );
-                    clickLinkWithText( "Edit Roles" );
-                    checkField( "removeRolesFromUser_removeSelectedRolesSystem Administrator" );
-                    clickButtonWithValue( "Remove Selected Roles" );
-                }
-
-                deleteUser( users[i], CUSTOM_FULLNAME, CUSTOM_EMAILADD );
-            }
-        }
-
-        logout();
-
-        super.tearDown();
-    }*/
-
     public void testBasicUserAddDelete()
     {
-        createUser( CUSTOM_USERNAME, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
+        createUser( GUEST_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
 
         // delete custom user
-        deleteUser( CUSTOM_USERNAME, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+        deleteUser( GUEST_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
     }
-
+    
     public void testPasswordConfirmation()
-        throws Exception
-    {
-        // initial user account creation ignores the password creation checks
-        createUser( CUSTOM_USERNAME2, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
-        logout();
-
-        // start password creation validation test
-        login( CUSTOM_USERNAME2, CUSTOM_PASSWORD );
-
-        // Edit user informations
-        goToMyAccount();
-
-        //TODO: verify account details page
-        assertPage( "Account Details" );
-
-        // test password confirmation
-        setFieldValue( PASSWORD_FIELD, CUSTOM_PASSWORD );
-        setFieldValue( CONFIRM_PASSWORD_FIELD, CUSTOM_PASSWORD + "error" );
-        clickButtonWithValue( "Submit" );
-
-        // we should still be in Account Details
-        assertPage( "Account Details" );
-        isTextPresent( "Password confirmation failed.  Passwords do not match" );
-
-        logout();
-
-        // house keeping
-        login( getUsername(), getPassword() );
-        deleteUser( CUSTOM_USERNAME2, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
-        logout();
-    }
-
-    public void testPasswordCreationValidation()
-        throws Exception
+    	throws Exception
     {
-        // initial user account creation ignores the password creation checks
-        createUser( CUSTOM_USERNAME3, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
-        logout();
-
-        // start password creation validation test
-        login( CUSTOM_USERNAME3, CUSTOM_PASSWORD );
-
-        // password test
-        String alphaTest = "abcdef";
-        String numericalTest = "123456";
-        String characterLengthTest = "aaaaaaa12";
-        String validPassword = "abc123";
-
-        // select profile
-        clickLinkWithText( "Edit Details" );
-
-        //TODO: verify account details page
-        assertPage( "Account Details" );
-
-        // test all alpha
-        setFieldValue( PASSWORD_FIELD, alphaTest );
-        setFieldValue( CONFIRM_PASSWORD_FIELD, alphaTest );
-        clickButtonWithValue( "Submit" );
-
-        // we should still be in Account Details
-        assertPage( "Account Details" );
-        isTextPresent( "You must provide a password containing at least 1 numeric character(s)." );
-
-        setFieldValue( PASSWORD_FIELD, numericalTest );
-        setFieldValue( CONFIRM_PASSWORD_FIELD, numericalTest );
-        clickButtonWithValue( "Submit" );
-
-        // we should still be in Account Details
-        assertPage( "Account Details" );
-        isTextPresent( "You must provide a password containing at least 1 alphabetic character(s)." );
-
-        setFieldValue( PASSWORD_FIELD, characterLengthTest );
-        setFieldValue( CONFIRM_PASSWORD_FIELD, characterLengthTest );
-        clickButtonWithValue( "Submit" );
-
-        // we should still be in Account Details
-        assertPage( "Account Details" );
-        isTextPresent( "You must provide a password between 1 and 8 characters in length." );
-
-        // we should still be in Account Details
-        assertPage( "Account Details" );
-        isTextPresent( "You must provide a password containing at least 1 alphabetic character(s)." );
-
-        setFieldValue( PASSWORD_FIELD, validPassword );
-        setFieldValue( CONFIRM_PASSWORD_FIELD, validPassword );
-        clickButtonWithValue( "Submit" );
-
-        // we should still be in Account Details
-        assertPage( "Continuum - Group Summary" );
-
-        logout();
-
-        // house keeping
-        login( getUsername(), getPassword() );
-        deleteUser( CUSTOM_USERNAME3, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
-        logout();
-    }
-
-
-    public void testThreeStrikeRule()
-        throws Exception
-    {
-        createUser( CUSTOM_USERNAME4, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
-        logout();
-
-        int numberOfTries = 3;
-
-        for ( int nIndex = 0; nIndex &lt; numberOfTries; nIndex++ )
-        {
-            if ( nIndex &lt; 2 )
-            {
-                login( this.CUSTOM_USERNAME4, this.CUSTOM_PASSWORD + "error", false, "Login Page" );
-                // login should fail
-                assertTextPresent( "You have entered an incorrect username and/or password" );
-                assertFalse( "user is authenticated using wrong password", isAuthenticated() );
-            }
-            else
-            {
-                // on the 3rd try, account is locked and we are returned to the Group Summary Page
-                login( this.CUSTOM_USERNAME4, this.CUSTOM_PASSWORD + "error", false, "Continuum - Group Summary" );
-                assertTextPresent( "Account Locked" );
-            }
-        }
-
-        // house keeping
-        login( getUsername(), getPassword() );
-        deleteUser( CUSTOM_USERNAME4, CUSTOM_FULLNAME, CUSTOM_EMAILADD, false, true );
-        logout();
-    }
+    	// initial user account creation ignores the password creation checks
+    	createUser( USER_ADMINISTRATOR, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
+    	logout();
+
+    	// start password creation validation test
+    	login( USER_ADMINISTRATOR, CUSTOM_PASSWORD );
+
+    	// Edit user informations
+    	goToMyAccount();
+
+    	//TODO: verify account details page
+    	assertPage( "Change Password" );
+
+	    // test password confirmation
+	    setFieldValue( "existingPassword" , CUSTOM_PASSWORD );
+	    setFieldValue( "newPassword", CUSTOM_PASSWORD );
+	    setFieldValue( "newPasswordConfirm", CUSTOM_PASSWORD + "error" );
+	    submit();
+	    
+	    // we should still be in Account Details
+	    assertPage( "Change Password" );
+	    isTextPresent( "Password confirmation failed. Passwords do not match." );
+	
+	    logout();
+	
+	    // house keeping
+	    login( getUsername(), getPassword() );
+	    deleteUser( USER_ADMINISTRATOR, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+	    logout();
+	}
+    
+    
+    public void testTenStrikeRule()
+    	throws Exception
+    {
+    	createUser( GROUP_PROJECT_ADMIN, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
+    	logout();
+
+    	login( GROUP_PROJECT_ADMIN, CUSTOM_PASSWORD );
+
+	assertPage( "Change Password" );
+    	setFieldValue( "existingPassword" , CUSTOM_PASSWORD );
+	setFieldValue( "newPassword", CUSTOM_PASSWORD1 );
+	setFieldValue( "newPasswordConfirm", CUSTOM_PASSWORD1 );
+	clickButtonWithValue( "Change Password" );
+	logout();
+    
+    	int numberOfTries = 10;
+
+    	for ( int nIndex = 0; nIndex &lt; numberOfTries; nIndex++ )
+    	{
+    		if ( nIndex &lt; 9 )
+    		{
+    			login( GROUP_PROJECT_ADMIN, CUSTOM_PASSWORD, false, "Login Page" );
+    			// login should fail
+    			assertTextPresent( "You have entered an incorrect username and/or password." );
+    			assertFalse( "user is authenticated using wrong password", isAuthenticated() );
+    		}
+    		else
+    		{
+    			// on the 10nth try, account is locked and we are returned to the Group Summary Page
+    			login( GROUP_PROJECT_ADMIN, CUSTOM_PASSWORD, false, "Continuum - Group Summary" );
+    			assertTextPresent( "Account Locked" );
+    		}
+    	}
+
+    	// house keeping
+    	login( getUsername(), getPassword() );
+    	deleteUser( GROUP_PROJECT_ADMIN, CUSTOM_FULLNAME, CUSTOM_EMAILADD, false, true );
+    	logout();
+	}
 
     public void testDefaultRolesOfNewSystemAdministrator()
-        throws Exception
+    	throws Exception
     {
-        // initialize
-        createUser( CUSTOM_USERNAME5, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
-
-        // upgrade the role of the user to system administrator
-        assertUserRolesPage();
-        checkField( "addRolesToUser_addSelectedRolesSystem Administrator" );
-        clickButtonWithValue( "Add Selected Roles" );
-
-        // after adding roles, we are returned to the list of users
-        //TODO: check Permanent/validated/locked columns
-        clickLinkWithText( CUSTOM_USERNAME5 );
-
-        // verify roles
-        String[] roleList = {"System Administrator", "User Administrator", 
-            "Continuum Group Project Administrator", "Project Developer - Default Project Group",
-            "Project User - Default Project Group"};
-Thread.sleep( 20000 );
-        assertElementPresent( XPathExpressionUtil.getList( roleList ) );
-        deleteUser( CUSTOM_USERNAME5, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
-    }
-
+	    // initialize
+	    createUser( SYSTEM_ADMINISTRATOR, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
+	
+	    // upgrade the role of the user to system administrator
+	    assertUsersListPage();
+	    clickLinkWithText( SYSTEM_ADMINISTRATOR );
+	    clickLinkWithText( "Edit Roles" );
+	    checkUserRoleWithValue( "System Administrator" );
+	    submit();
+	
+	    // after adding roles, we are returned to the list of users
+	    //TODO: check Permanent/validated/locked columns
+	    clickLinkWithText( SYSTEM_ADMINISTRATOR );
+	
+	    assertPage( "[Admin] User Edit" );
+	    // verify roles
+	    String sysadRoles = "Continuum Group Project Administrator,Continuum Group Project Developer,Continuum Group Project User,Continuum Manage Build Environments,Continuum Manage Build Templates,Continuum Manage Installations,Continuum Manage Local Repositories,Continuum Manage Purging,Continuum Manage Queues,Continuum Manage Scheduling,Project Administrator - Default Project Group,Project Developer - Default Project Group,Project User - Default Project Group,System Administrator,User Administrator";
+	    String[] arraySysad = sysadRoles.split( "," );
+	    for( String sysadroles : arraySysad )
+	    	assertTextPresent( sysadroles );
+	    logout();
+	    
+	    login( getUsername(), getPassword() );
+	    deleteUser( SYSTEM_ADMINISTRATOR, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+	    logout();
+	}
+   
+    public void testDefaultRolesOfUserAdmin() 
+    {
+    	createUser( USER_ADMINISTRATOR, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( USER_ADMINISTRATOR );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "User Administrator" );
+    	submit();
+    	clickLinkWithText( USER_ADMINISTRATOR );
+    	
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "User Administrator" );
+    	
+    	logout();
+    	
+    	login(USER_ADMINISTRATOR, CUSTOM_PASSWORD);
+    	changePassword();
+	    assertPagesWithUserRoles( "User Administrator" );
+    	logout();
+    	
+	    login( getUsername(), getPassword() );
+    	deleteUser( USER_ADMINISTRATOR, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfRegisteredUser()
+    {
+    	createUser( REGISTERED_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( REGISTERED_USER );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Registered User" );
+    	submit();
+    	//check registered user available roles if correct
+    	clickLinkWithText( REGISTERED_USER );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Registered User" );
+    	logout();
+    	
+    	//check registered user's access to continuum page
+    	login( REGISTERED_USER, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Registered User" );
+	    logout();
+    	
+	    //house keeping
+	    login( getUsername(), getPassword() );
+    	deleteUser( REGISTERED_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    
+    public void testDefaultRolesOfGuestUser()
+    {
+    	createUser( GUEST_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( GUEST_USER );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Guest" );
+    	submit();
+    	//check guest user's available roles if correct 
+    	clickLinkWithText( GUEST_USER );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Guest" );
+    	logout();
+    	
+    	//check access to continuum page
+    	login( GUEST_USER, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Guest" );
+	    logout();
+	    
+	    login( getUsername(), getPassword() );
+    	deleteUser( GUEST_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    
+    public void testDefaultRolesOfProjectGroupAdmin()
+    {
+    	createUser( GROUP_PROJECT_ADMIN, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( GROUP_PROJECT_ADMIN );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Continuum Group Project Administrator" );
+    	submit();
+    	//check project group admin's available roles if correct
+    	clickLinkWithText( GROUP_PROJECT_ADMIN );
+    	assertPage( "[Admin] User Edit" );
+    	String userProjectGroupAdmin = "Continuum Group Project Administrator,Continuum Group Project Developer,Continuum Group Project User,Project Administrator - Default Project Group,Project Developer - Default Project Group,Project User - Default Project Group";
+    	String[] arrayProjectGroupAdmin = userProjectGroupAdmin.split( "," );
+    	for( String projectgroupadmin : arrayProjectGroupAdmin )
+    		assertTextPresent( projectgroupadmin );
+    	logout();
+    	//check access to continuum page
+    	login( GROUP_PROJECT_ADMIN, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Continuum Group Project Administrator" );
+	    logout();
+	    
+	    login( getUsername(), getPassword() );
+    	deleteUser( GROUP_PROJECT_ADMIN, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    
+    public void testDefaultRolesOfProjectGroupDev()
+    {
+    	createUser( GROUP_PROJECT_DEVELOPER, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( GROUP_PROJECT_DEVELOPER );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Continuum Group Project Developer" );
+    	submit();
+    	//check available roles if correct
+    	clickLinkWithText( GROUP_PROJECT_DEVELOPER );
+    	assertPage( "[Admin] User Edit" );
+    	String userProjectGroupDev = "Continuum Group Project Developer,Continuum Group Project User,Project Developer - Default Project Group,Project User - Default Project Group";
+    	String[] arrayProjectGroupDev = userProjectGroupDev.split( "," );
+    	for( String projectgroupdev : arrayProjectGroupDev )
+    		assertTextPresent( projectgroupdev );
+    	logout();
+    	//check access to continuum page
+    	login( GROUP_PROJECT_DEVELOPER, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Continuum Group Project Developer" );
+	    logout();
+    	
+	    login( getUsername(), getPassword() );
+    	deleteUser( GROUP_PROJECT_DEVELOPER, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+   
+    public void testDefaultRolesOfProjectGroupUser()
+    {
+    	createUser( GROUP_PROJECT_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( GROUP_PROJECT_USER );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Continuum Group Project User" );
+    	submit();
+    	//check available roles if correct
+    	clickLinkWithText( GROUP_PROJECT_USER );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Continuum Group Project User" );
+    	assertTextPresent( "Project User - Default Project Group" );
+    	logout();
+    	//check access to continuum page
+    	login( GROUP_PROJECT_USER, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Continuum Group Project Developer" );
+	    logout();
+    	
+	    login( getUsername(), getPassword() );
+    	
+    	deleteUser( GROUP_PROJECT_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfBuildEnvironments() 
+    {
+    	createUser( MANAGE_BUILD_ENV, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( MANAGE_BUILD_ENV );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Continuum Manage Build Environments" );
+    	submit();
+    	
+    	clickLinkWithText( MANAGE_BUILD_ENV );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Continuum Manage Build Environments" );
+    	logout();
+    	
+    	//check access to continuum page
+    	login( MANAGE_BUILD_ENV, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Continuum Manage Build Environments" );
+	    logout();
+    	
+	    login( getUsername(), getPassword() );
+    	deleteUser( MANAGE_BUILD_ENV, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfBuildTemp() 
+    {
+    	createUser( MANAGE_BUILD_TEMPLATES, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( MANAGE_BUILD_TEMPLATES );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Continuum Manage Build Templates" );
+    	submit();
+    	
+    	clickLinkWithText( MANAGE_BUILD_TEMPLATES );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Continuum Manage Build Templates" );
+    	logout();
+    	
+    	//check access to continuum page
+    	login( MANAGE_BUILD_TEMPLATES, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Continuum Manage Build Templates" );
+	    logout();
+    	
+	    login( getUsername(), getPassword() );
+    	deleteUser( MANAGE_BUILD_TEMPLATES, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfInstallations() 
+    {
+    	createUser( INSTALLATION, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( INSTALLATION );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Continuum Manage Installations" );
+    	submit();
+    	
+    	clickLinkWithText( INSTALLATION );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Continuum Manage Installations" );
+    	logout();
+    	
+    	//check access to continuum page
+    	login( INSTALLATION, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Continuum Manage Installations" );
+	    logout();
+    	
+	    login( getUsername(), getPassword() );
+    	deleteUser( INSTALLATION, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfLocalRepositories()
+    {
+    	createUser( LOCAL_REPOSITORIES, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( LOCAL_REPOSITORIES );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Continuum Manage Local Repositories" );
+    	submit();
+    	
+    	clickLinkWithText( LOCAL_REPOSITORIES );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Continuum Manage Local Repositories" );
+    	logout();
+    	
+    	//check access to continuum page
+    	login( LOCAL_REPOSITORIES, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Continuum Manage Local Repositories" );
+	    logout();
+    	
+	    login( getUsername(), getPassword() );
+    	deleteUser( LOCAL_REPOSITORIES, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfPurging()
+    {
+    	createUser( PURGING, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( PURGING );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Continuum Manage Purging" );
+    	submit();
+    	
+    	clickLinkWithText( PURGING );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Continuum Manage Purging" );
+    	logout();
+    	//check access to continuum page
+    	login( PURGING, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Continuum Manage Purging" );
+	    logout();
+    	
+	    login( getUsername(), getPassword() );	
+    	deleteUser( PURGING, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfQueues()
+    {
+    	createUser( QUEUES, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( QUEUES );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Continuum Manage Queues" );
+    	submit();
+    	
+    	clickLinkWithText( QUEUES );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Continuum Manage Queues" );
+    	logout();
+    	
+    	//check access to continuum page
+    	login( QUEUES, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Continuum Manage Queues" );
+	    logout();
+	    
+	    login( getUsername(), getPassword() );
+    	deleteUser( QUEUES, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfScheduling()
+    {
+    	createUser( SCHEDULING, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( SCHEDULING );
+    	clickLinkWithText( "Edit Roles" );
+    	checkUserRoleWithValue( "Continuum Manage Scheduling" );
+    	submit();
+    	
+    	clickLinkWithText( SCHEDULING );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Continuum Manage Scheduling" );
+    	logout(); 	
+    	//check access to continuum page
+    	login( SCHEDULING, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Continuum Manage Scheduling" );
+	    logout();
+	    
+	    login( getUsername(), getPassword() );
+    	deleteUser( SCHEDULING, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfProjectAdmin() 
+    {
+    	createUser( PROJECT_ADMIN, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( PROJECT_ADMIN );
+    	clickLinkWithText( "Edit Roles" );
+    	checkResourceRoleWithValue( "Project Administrator - Default Project Group" );
+    	submit();
+    	
+    	clickLinkWithText( PROJECT_ADMIN );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Project Administrator - Default Project Group" );
+    	assertTextPresent( "Project Developer - Default Project Group" );
+    	assertTextPresent( "Project User - Default Project Group" );
+    	logout();
+    	//check access to continuum page
+    	login( PROJECT_ADMIN, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Project Administrator - Default Project Group" );
+	    logout();
+	    
+	    login( getUsername(), getPassword() );
+    	deleteUser( PROJECT_ADMIN, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfProjectDev() 
+    {
+    	createUser( PROJECT_DEV, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( PROJECT_DEV );
+    	clickLinkWithText( "Edit Roles" );
+    	checkResourceRoleWithValue( "Project Developer - Default Project Group" );
+    	submit();
+    	
+    	clickLinkWithText( PROJECT_DEV );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Project Developer - Default Project Group" );
+    	assertTextPresent( "Project User - Default Project Group" );
+    	logout();
+    	//check access to continuum page
+    	login( PROJECT_DEV, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Project Developer - Default Project Group" );
+	    logout();
+	    
+	    login( getUsername(), getPassword() );
+    	deleteUser( PROJECT_DEV, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+    public void testDefaultRolesOfProjectUser() 
+    {
+    	createUser( PROJECT_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true);
+    	assertUsersListPage();
+    	clickLinkWithText( PROJECT_USER );
+    	clickLinkWithText( "Edit Roles" );
+    	checkResourceRoleWithValue( "Project User - Default Project Group" );
+    	submit();
+    	
+    	clickLinkWithText( PROJECT_USER );
+    	assertPage( "[Admin] User Edit" );
+    	assertTextPresent( "Project User - Default Project Group" );
+    	logout();
+    	//check access to continuum page
+    	login( PROJECT_USER, CUSTOM_PASSWORD );
+    	changePassword();
+	    assertPagesWithUserRoles( "Project User - Default Project Group" );
+	    logout();
+	    
+	    login( getUsername(), getPassword() );
+    	deleteUser( PROJECT_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+    	logout();
+    }
+    
+/*    public void testPasswordCreationValidation()
+	    throws Exception
+	{
+	    // initial user account creation ignores the password creation checks
+	    createUser( DUMMY_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD, CUSTOM_PASSWORD, true );
+	    logout();
+	
+	    // start password creation validation test
+	    login( DUMMY_USER, CUSTOM_PASSWORD );
+	
+	    // password test
+	    String alphaTest = "abcdef";
+	    String numericalTest = "123456";
+	    String characterLengthTest = "aaaaaaa12";
+	    String validPassword = "abc123";
+	
+	    //TODO: verify account details page
+	    assertPage( "Change Password" );
+	
+	    // test all alpha
+	    setFieldValue( "existingPassword" , CUSTOM_PASSWORD );
+	    setFieldValue( "newPassword", alphaTest );
+	    setFieldValue( "newPasswordConfirm", alphaTest );
+	    clickButtonWithValue( "Change Password" );
+	
+	    // we should still be in Account Details
+	    assertPage( "Change Password" );
+	    isTextPresent( "You must provide a password containing at least 1 numeric character(s)." );
+	
+	    setFieldValue( "existingPassword" , CUSTOM_PASSWORD );
+	    setFieldValue( "newPassword", numericalTest );
+	    setFieldValue( "newPasswordConfirm", numericalTest );
+	    clickButtonWithValue( "Change Password" );
+	
+	    // we should still be in Account Details
+	    assertPage( "Change Password" );
+	    isTextPresent( "You must provide a password containing at least 1 alphabetic character(s)." );
+	
+	    setFieldValue( "existingPassword" , CUSTOM_PASSWORD );
+	    setFieldValue( "newPassword", characterLengthTest );
+	    setFieldValue( "newPasswordConfirm", characterLengthTest );
+	    clickButtonWithValue( "Change Password" );
+	
+	    // we should still be in Account Details
+	    assertPage( "Account Details" );
+	    isTextPresent( "You must provide a password between 1 and 8 characters in length." );
+	
+	    // we should still be in Account Details
+	    assertPage( "Account Details" );
+	    isTextPresent( "You must provide a password containing at least 1 alphabetic character(s)." );
+	
+	    setFieldValue( "existingPassword" , CUSTOM_PASSWORD );
+	    setFieldValue( "newPassword", validPassword );
+	    setFieldValue( "newPasswordConfirm", validPassword );
+	    clickButtonWithValue( "Submit" );
+	
+	    // we should still be in Account Details
+	    assertPage( "Continuum - Group Summary" );
+	
+	    logout();
+	
+	    // house keeping
+	    login( getUsername(), getPassword() );
+	    deleteUser( DUMMY_USER, CUSTOM_FULLNAME, CUSTOM_EMAILADD );
+	    logout();
+	}
+*/
+   
     private void createUser( String userName, String fullName, String emailAdd, String password, boolean valid )
     {
         createUser( userName, fullName, emailAdd, password, password, valid );
@@ -275,16 +693,16 @@
         // create user
         clickButtonWithValue( "Create New User" );
         assertCreateUserPage();
-        setFieldValue( CREATE_FORM_USERNAME_FIELD, userName );
-        setFieldValue( CREATE_FORM_FULLNAME_FIELD, fullName );
-        setFieldValue( CREATE_FORM_EMAILADD_FIELD, emailAdd );
-        setFieldValue( CREATE_FORM_PASSWORD_FIELD, password );
-        setFieldValue( CREATE_FORM_CONFIRM_PASSWORD_FIELD, confirmPassword );
+        setFieldValue( "user.username", userName );
+        setFieldValue( "user.fullName", fullName );
+        setFieldValue( "user.email", emailAdd );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", confirmPassword );
         submit();
 
         // click past second page without adding any roles
-        assertUserRolesPage();
-        clickButtonWithValue( "Add Selected Roles" );
+        assertAddUserRolesPage();
+        clickButtonWithValue( "Submit" );
 
         if ( valid )
         {
@@ -315,9 +733,8 @@
         clickLinkWithText( "Users" );
 
         // delete user
-        clickLinkWithXPath(
-            XPathExpressionUtil.getImgColumnElement( XPathExpressionUtil.ANCHOR, 7, "delete.gif", columnValues ) );
-
+        clickLinkWithXPath( "//table[@id='ec_table']/tbody[2]/tr[3]/td[7]/a/img" );
+        
         // confirm
         assertDeleteUserPage( userName );
         submit();
@@ -325,4 +742,179 @@
         // check if account is successfuly deleted
         assertElementNotPresent( XPathExpressionUtil.getTableRow( columnValues ) );
     }
+    
+    public void changePassword()
+    {
+    	assertPage( "Change Password" );
+    	setFieldValue( "existingPassword" , CUSTOM_PASSWORD );
+	    setFieldValue( "newPassword", CUSTOM_PASSWORD1 );
+	    setFieldValue( "newPasswordConfirm", CUSTOM_PASSWORD1 );
+	    clickButtonWithValue( "Change Password" );
+    }
+    
+    /*
+     * User assertions starts here...
+     * */
+    
+    public void assertUsersListPage()
+    {
+        assertPage( "[Admin] User List" );
+        assertTextPresent( "[Admin] List of Users in Role: Any" );
+        assertLinkPresent( "guest" );
+        assertLinkPresent( "admin" );
+    }
+
+    public void assertCreateUserPage()
+    {
+        assertPage( "[Admin] User Create" );
+        assertTextPresent( "[Admin] User Create" );
+        assertTextPresent( "Username*:" );
+        assertElementPresent( CREATE_FORM_USERNAME_FIELD );
+        assertTextPresent( "Full Name*:" );
+        assertElementPresent( CREATE_FORM_FULLNAME_FIELD );
+        assertTextPresent( "Email Address*:" );
+        assertElementPresent( CREATE_FORM_EMAILADD_FIELD );
+        assertTextPresent( "Password*:" );
+        assertElementPresent( CREATE_FORM_PASSWORD_FIELD );
+        assertTextPresent( "Confirm Password*:" );
+        assertElementPresent( CREATE_FORM_CONFIRM_PASSWORD_FIELD );
+        assertButtonWithValuePresent( "Create User" );
+    }
+
+    public void assertAddUserRolesPage()
+    {
+        assertPage( "[Admin] User Edit" );
+        assertTextPresent( "[Admin] User Roles" );
+        assertTextPresent( "redback-xwork-integration-core" );
+        assertTextPresent( "Redback XWork Integration Security Core" );
+        assertTextPresent( "Available Roles:" );
+        String rolesCheckbox = "Guest,Registered User,System Administrator,User Administrator,Continuum Group Project Administrator,Continuum Group Project Developer,Continuum Group Project User,Continuum Manage Build Environments,Continuum Manage Build Templates,Continuum Manage Installations,Continuum Manage Local Repositories,Continuum Manage Purging,Continuum Manage Queues,Continuum Manage Scheduling";
+        String[] arrayUserRoles = rolesCheckbox.split( "," );
+        for( String userRoles : arrayUserRoles )
+        	assertUserRoleCheckBoxPresent( userRoles );
+        assertTextPresent( "Resource Roles:" );
+        assertResourceRolesCheckBoxPresent( "Project Administrator - Default Project Group" );
+        assertResourceRolesCheckBoxPresent( "Project Developer - Default Project Group" );
+        assertResourceRolesCheckBoxPresent( "Project User - Default Project Group" );
+    }
+
+    public void assertDeleteUserPage( String username )
+    {
+        assertPage( "[Admin] User Delete" );
+        assertTextPresent( "[Admin] User Delete" );
+        assertTextPresent( "The following user will be deleted:" );
+        assertTextPresent( "Username: " + username );
+        assertButtonWithValuePresent( "Delete User" );
+    }
+    
+    public void assertPagesWithUserRoles( String role ) 
+    {
+    	if( role == "System Administrator" )
+    	{
+    		String navMenu = "About,Show Project Groups,Maven 2.0.x Project,Maven 1.x Project,Ant Project,Shell Project,Local Repositories,Purge Configurations,Schedules,Installations,Build Environments,Queues,Build Definition Templates,Configuration,Appearance,Users,Roles,Build Queue";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "User Administrator" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Users,Roles";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Group Project Administrator" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Maven 2.0.x Project,Maven 1.x Project,Ant Project,Shell Project,Schedules,Queues,Users,Roles";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Group Project Developer" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Group Project User" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Build Environments" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Build Environments";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Build Templates" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Build Definition Templates";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Installations" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Installations";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Local Repositories" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Local Repositories";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Purging" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Purge Configurations";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Queues" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else if( role == "Continuum Manage Scheduling" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Schedules";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+	else if( role == "Project Administrator - Default Project Group" )
+	{
+    		String navMenu = "About,Show Project Groups,Queues,Users,Roles";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );		
+	}
+    	else if( role == "Project Developer - Default Project Group" || role == "Project User - Default Project Group" ) 
+    	{
+    		String navMenu = "About,Show Project Groups,Queues";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    	}
+    	else
+    	{
+    		String navMenu = "About,Show Project Groups";
+    		String[] arrayNavMenu = navMenu.split( "," );
+    		for( String navmenu : arrayNavMenu )
+    			assertLinkPresent( navmenu );
+    		assertTextPresent( "Project Groups" );
+    		//assertTextPresent( "Project Groups list is empty." );
+    	}
+    }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenOneProjectTestCase.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenOneProjectTestCase.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenOneProjectTestCase.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenOneProjectTestCase.java Tue Nov 10 05:38:01 2009
@@ -61,7 +61,7 @@
     /**
      * test with valid pom url
      */
-    public void testValidPomUrl()
+/*    public void testValidPomUrl()
         throws Exception
     {
         String pomUrl = "http://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/valid-project.xml";
@@ -71,21 +71,21 @@
         //TODO: add more tests
         removeProjectGroup( "Maven One Project", "maven-one-project", "This is a sample Maven One Project." );
     }
-
+*/
     /**
      * test with no pom file or pom url specified
      */
     public void testNoPomSpecified()
     	throws Exception
     {
-        submitAddMavenOneProjectPage( "", false );
+        submitAddMavenOneProjectPage( " ", false );
         assertTextPresent( "Either POM URL or Upload POM is required." );
     }
 
     /**
      * test with missing &lt;repository&gt; element in the pom file
      */
-    public void testMissingElementInPom()
+/*    public void testMissingElementInPom()
     	throws Exception
     {
         String pomUrl = "http://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/missing-repository-element-project.xml";
@@ -93,33 +93,33 @@
         assertTextPresent( "Missing 'repository' element in the POM." );
     }
 
-
+*/
     /**
      * test with &lt;extend&gt; element present in pom file
      */
-    public void testWithExtendElementPom()
+/*    public void testWithExtendElementPom()
     	throws Exception
     {
         String pomUrl = "http://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/extend-element-project.xml";
         submitAddMavenOneProjectPage( pomUrl, false );
         assertTextPresent( "Cannot use a POM with an 'extend' element." );
     }
-
+*/
     /**
      * test with unparseable xml content for pom file
      */
-    public void testUnparseableXmlContent()
+/*    public void testUnparseableXmlContent()
     	throws Exception
     {
         String pomUrl = "http://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/unparseable-content-project.xml";
         submitAddMavenOneProjectPage( pomUrl, false );
         assertTextPresent( "The XML content of the POM can not be parsed." );
     }
-
+*/
     /**
      * test with a malformed pom url
      */
-    public void testMalformedPomUrl()
+/*    public void testMalformedPomUrl()
     	throws Exception
     {
         String pomUrl = "aaa";
@@ -127,26 +127,29 @@
         assertTextPresent(
             "The specified resource cannot be accessed. Please try again later or contact your administrator." );
     }
-
+*/
     /**
      * test with an inaccessible pom url
      */
-    public void testInaccessiblePomUrl()
+
+//TODO currently, when adding M1 project that is not accessible, no messages/prompts will be displayed.
+/*    public void testInaccessiblePomUrl()
     	throws Exception
     {
         String pomUrl = "http://www.google.com";
         submitAddMavenOneProjectPage( pomUrl, false );
         assertTextPresent( "POM file does not exist. Either the POM you specified or one of its modules does not exist." );
     }
-
+*/
     /**
      * test unallowed file protocol
      */
-    public void testNotAllowedProtocol()
+/*    public void testNotAllowedProtocol()
     	throws Exception
     {
         String pomUrl = "file:///project.xml";
         submitAddMavenOneProjectPage( pomUrl, false );
         assertTextPresent( "The specified resource isn't a file or the protocol used isn't allowed." );
     }
+*/
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AddMavenTwoProjectTest.java Tue Nov 10 05:38:01 2009
@@ -19,13 +19,13 @@
 public class AddMavenTwoProjectTest
     extends AbstractAuthenticatedAdminAccessTestCase
 {
-    public void testAddMavenTwoProjectFromRemoteSource()
+/*    public void testAddMavenTwoProjectFromRemoteSource()
         throws Exception
     {
         // Enter values into Add Maven Two Project fields, and submit
         addMavenTwoProject( TEST_POM_URL, TEST_POM_USERNAME, TEST_POM_PASSWORD, null, true );
 
-        clickLinkWithText( DEFAULT_PROJ_GRP_NAME );
+        //clickLinkWithText( DEFAULT_PROJ_GRP_NAME );
 
         removeProjectGroup( "Apache Maven", "org.apache.maven", "Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information." );
     }
@@ -43,7 +43,7 @@
 
         removeProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
     }
-
+*/
     /**
      * submit the page
      *
@@ -75,18 +75,18 @@
     /**
      * Test when scm element is missing from pom
      */
-    public void testMissingScmElementPom()
+/*    public void testMissingScmElementPom()
     	throws Exception
     {
         String pomUrl = "http://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-scm-element-pom.xml";
         submitAddMavenTwoProjectPage( pomUrl, false );
         assertTextPresent( "Missing 'scm' element in the POM." );
     }
-
+*/
     /**
      * Test when the specified pom url is invalid
      */
-    public void testCannotAccessResource()
+/*    public void testCannotAccessResource()
     	throws Exception
     {
         String pomUrl = "http://svn.apache.org/asf/maven/continuum/trunk/bad_url/pom.xml";
@@ -94,7 +94,7 @@
         assertTextPresent(
             "POM file does not exist. Either the POM you specified or one of its modules does not exist." );
     }
-
+*/
     /**
      * test with a malformed pom url
      */
@@ -110,18 +110,18 @@
     /**
      * Test when the connection element is missing from the scm tag
      */
-    public void testMissingConnectionElement()
+/*    public void testMissingConnectionElement()
     	throws Exception
     {
         String pomUrl = "http://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-connection-element-pom.xml";
         submitAddMavenTwoProjectPage( pomUrl, false );
         assertTextPresent( "Missing 'connection' sub-element in the 'scm' element in the POM." );
     }
-
+*/
     /**
      * Test when the parent pom is missing or not yet added in continuum
      */
-    public void testMissingParentPom()
+/*    public void testMissingParentPom()
     	throws Exception
     {
         String pomUrl = "http://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-parent-pom.xml";
@@ -129,21 +129,21 @@
         assertTextPresent(
             "Missing artifact trying to build the POM. Check that its parent POM is available or add it first in Continuum." );
     }
-
+*/
     /**
      * Test when the modules/subprojects specified in the pom are not found
      */
-    public void testMissingModules()
+/*    public void testMissingModules()
     	throws Exception
     {
         String pomUrl= "http://svn.apache.org/repos/asf/maven/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-modules-pom.xml";
         submitAddMavenTwoProjectPage( pomUrl, false );
         assertTextPresent( "Unknown error trying to build POM." );
     }
-
+*/
     /**
      * test with an inaccessible pom url
-     */
+     
     public void testInaccessiblePomUrl()
     	throws Exception
     {
@@ -151,7 +151,7 @@
         submitAddMavenTwoProjectPage( pomUrl, false );
         assertTextPresent( "POM file does not exist. Either the POM you specified or one of its modules does not exist." );
     }
-
+*/
     /**
      * test unallowed file protocol
      */
@@ -165,12 +165,12 @@
 
     /**
      * test cancel button
-     */
+     
     public void testCancelButton()
     {
         goToAboutPage();
         goToAddMavenTwoProjectPage();
         clickButtonWithValue( "Cancel" );
         assertAboutPage();
-    }
+    } */
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AntTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AntTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AntTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/AntTest.java Tue Nov 10 05:38:01 2009
@@ -23,7 +23,7 @@
 public class AntTest
     extends AbstractAuthenticatedAdminAccessTestCase
 {
-    public void testAddAntProject()
+/*    public void testAddAntProject()
         throws Exception
     {
         goToAddAntPage();
@@ -40,18 +40,18 @@
 
         //TODO Add more tests (values in Default Project Group, values in project view, notifiers, build defintions, delete, build,...)
     }
-
+*/
     public void testSubmitEmptyForm()
     {
         goToAddAntPage();
-        clickButtonWithValue( "Add", false );
-        assertAddAntProjectPage();
-        assertTextPresent( "Name is required" );
-        assertTextPresent( "Version is required" );
-        assertTextPresent( "SCM Url is required" );
+        clickButtonWithValue( "Add" );
+        assertTextPresent( "Name is required and cannot contain null or spaces only" );
+        assertTextPresent( "Version is required and cannot contain null or spaces only" );
+        assertTextPresent( "SCM Url is required and cannot contain null or spaces only" );
+	assertAddAntProjectPage();
     }
 
-    public void testSubmitEmptyProjectName()
+/*    public void testSubmitEmptyProjectName()
     {
         goToAddAntPage();
         clickButtonWithValue( "Add", false );
@@ -94,13 +94,14 @@
             assertFalse( "Double Error Messages", "SCM Url is required".equals( getSelenium().getText( "//tr[8]/td/span" ) ) );
         }
     }
-
+*/
     public void testCancelButton()
     {
         goToAboutPage();
         goToAddAntPage();
         clickButtonWithValue( "Cancel" );
-        assertAboutPage();
+	assertTextPresent( "Project Groups" );
+        //assertAboutPage();
     }
 
     private void goToAddAntPage()

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/MyAccountTest.java Tue Nov 10 05:38:01 2009
@@ -44,7 +44,7 @@
     	editMyUserInfo( adminFullName, adminEmail, adminPassword ,adminPassword, adminPassword );
     	assertTextPresent( "Your password cannot match any of your previous 6 password(s)." );
     	clickButtonWithValue( "Cancel" );
-    	assertPage( "Continuum - Group Summary" );
+    	assertPage( "Login Page" );
     }
 
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/ProjectGroupTest.java Tue Nov 10 05:38:01 2009
@@ -43,7 +43,7 @@
         
         assertDefaultProjectGroupBuildDefinitionPage();
     }
-
+/*
     public void testMoveProject()
         throws Exception
     {
@@ -55,7 +55,7 @@
         
         // assert that the default project group has 0 projects while the test project group has 1
         assertCellValueFromTable( "0", "ec_table", 1, 8 );
-        assertCellValueFromTable( "1", "ec_table", 2, 8 );
+        //assertCellValueFromTable( "1", "ec_table", 2, 8 );
 
         // move the project of the test project group to the default project group
         moveProjectToProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION,
@@ -68,7 +68,7 @@
 
         removeProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );
     }
-
+*/
     public void testAddBuildDefinitionWithEmptyStrings() throws Exception
     {
         addProjectGroup( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION );

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/SchedulesPageTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/SchedulesPageTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/SchedulesPageTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/it/org/apache/continuum/web/test/SchedulesPageTest.java Tue Nov 10 05:38:01 2009
@@ -111,7 +111,7 @@
         return this.adminPassword;
     }
 
-    public void testBasicScheduleAddAndDelete()
+/*    public void testBasicScheduleAddAndDelete()
         throws Exception
     {
         // add schedule
@@ -281,7 +281,7 @@
 
         assertEditSchedulePage();
     }
-
+*/
     public void testCancelAddSchedule()
     {
         clickButtonWithValue( "Add" );
@@ -340,19 +340,19 @@
     	assertElementPresent( "description" );
     	assertTextPresent( "Cron Expression:" );
     	assertTextPresent( "Second:" );
-    	assertElementPresent( "second" );
+    	assertElementPresent( "saveSchedule_second" );
     	assertTextPresent( "Minute:" );
-    	assertElementPresent( "minute" );
+    	assertElementPresent( "saveSchedule_minute" );
     	assertTextPresent( "Hour:" );
-    	assertElementPresent( "hour" );
+    	assertElementPresent( "saveSchedule_hour" );
     	assertTextPresent( "Day of Month:" );
-    	assertElementPresent( "dayOfMonth" );
+    	assertElementPresent( "saveSchedule_dayOfMonth" );
     	assertTextPresent( "Month:" );
-    	assertElementPresent( "month" );
+    	assertElementPresent( "saveSchedule_month" );
     	assertTextPresent( "Day of Week:" );
-    	assertElementPresent( "dayOfWeek" );
+    	assertElementPresent( "saveSchedule_dayOfWeek" );
     	assertTextPresent( "Year [optional]:" );
-    	assertElementPresent( "year" );
+    	assertElementPresent( "saveSchedule_year" );
     	assertTextPresent( "Maximum job execution time (seconds)*:" );
     	assertElementPresent( "maxJobExecutionTime" );
     	assertTextPresent( "Quiet Period (seconds):" );
@@ -429,7 +429,7 @@
 
     public void inputSchedule( HashMap fields, boolean wait, boolean valid )
     {
-        setFieldValues( fields );
+        //setFieldValues( fields );
 
         clickButtonWithValue( "Save", wait );
 
@@ -447,8 +447,7 @@
     public void tearDown()
         throws Exception
     {
-        logout();
-
-        super.tearDown();
+        //logout();
+	super.tearDown();
     }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/it.properties
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/it.properties?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/it.properties (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/it.properties Tue Nov 10 05:38:01 2009
@@ -10,4 +10,4 @@
 
 SELENIUM_HOST=localhost
 SELENIUM_PORT=4444
-SELENIUM_BROWSER=*firefox
+

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/resources/testng.properties Tue Nov 10 05:38:01 2009
@@ -4,68 +4,274 @@
 # General properties
 #######################
 
-BASE_URL=http://localhost:9090
 MAX_WAIT_TIME_IN_MS=60000
 
 ADMIN_USERNAME=admin
+ADMIN_FULLNAME=admin
 ADMIN_PASSWORD=admin123
+ADMIN_MAIL=admin@mail.com
 
-SELENIUM_HOST=localhost
-SELENIUM_PORT=4444
-SELENIUM_BROWSER=*firefox
-
-DEFAULT_PROJ_GRP_NAME =Default Project Group
-DEFAULT_PROJ_GRP_ID =default
-DEFAULT_PROJ_GRP_DESCRIPTION =Contains all projects that do not have a group of their own
+DEFAULT_PROJ_GRP_NAME=Default Project Group
+DEFAULT_PROJ_GRP_ID=default
+DEFAULT_PROJ_GRP_DESCRIPTION=Contains all projects that do not have a group of their own
 
 ########################
 # mavenTwoProject group 
 ########################
 
 # Properties for testAddMavenTwoProject
-M2_POM_URL =http://svn.apache.org/repos/asf/maven/pom/trunk/maven/pom.xml
-M2_PROJ_GRP_NAME=Apache Maven
-M2_PROJ_GRP_ID=org.apache.maven
-M2_PROJ_GRP_DESCRIPTION=Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project's build, reporting and documentation from a central piece of information.
-M2_POM_USERNAME =dummy
-M2_POM_PASSWORD =dummy
+M2_POM_URL=https://svn.apache.org/repos/asf/continuum/sandbox/continuum-build-queue-test-data/pom.xml
+M2_PROJ_GRP_NAME=ContinuumBuildQueueTestData
+M2_PROJ_GRP_ID=org.apache.continuum
+M2_PROJ_GRP_DESCRIPTION=Project for testing continuum build queue
+M2_PROJ_GRP_SCM_ROOT_URL=scm:svn:https://svn.apache.org/repos/asf/continuum/sandbox/continuum-build-queue-test-data
+M2_POM_USERNAME=
+M2_POM_PASSWORD=
+
+# Properties for testDeleteMavenTwoProject
+M2_DELETE_POM_URL=https://svn.apache.org/repos/asf/continuum/sandbox/simple-example/pom.xml
+M2_DELETE_PROJ_GRP_NAME=Continuum Simple Example Project
+M2_DELETE_PROJ_GRP_ID=org.apache.continuum.examples
+M2_DELETE_PROJ_GRP_DESCRIPTION=Delete test project
+M2_DELETE_PROJ_GRP_SCM_ROOT_URL=scm:svn:http://svn.apache.org/repos/asf/continuum/sandbox/simple-example
+
 # SCM element is missing from pom
-NOT_SCM_POM_URL =http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-scm-element-pom.xml
-MISS_CONECT_POM_URL =http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-connection-element-pom.xml
-MISS_PARENT_POM_URL =http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-parent-pom.xml
-MISS_SUBPRO_POM_URL =http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-modules-pom.xml
+NOT_SCM_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-scm-element-pom.xml
+MISS_CONECT_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-connection-element-pom.xml
+MISS_PARENT_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-parent-pom.xml
+MISS_SUBPRO_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-modules-pom.xml
+
+# Properties for testAddMavenTwoProjectModuleNameWithSameLetter
+M2_SAME_LETTER_POM_URL=https://svn.apache.org/repos/asf/continuum/sandbox/flat-example/flat-parent/pom.xml
+M2_SAME_LETTER_PROJ_GRP_NAME=Flat Example
+M2_SAME_LETTER_PROJ_GRP_ID=com.example.flat
+M2_SAME_LETTER_PROJ_GRP_DESCRIPTION=
+M2_SAME_LETTER_PROJ_GRP_SCM_ROOT_URL=scm:svn:http://svn.apache.org/repos/asf/continuum/sandbox/flat-example/flat-parent
+
+########################
+# mavenOneProject group 
+########################
+
+# Properties for testAddMavenOneProject
+M1_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/valid-project.xml
+M1_PROJ_GRP_NAME=Maven One Project
+M1_PROJ_GRP_ID=maven-one-project
+M1_PROJ_GRP_DESCRIPTION=This is a sample Maven One Project
+M1_POM_USERNAME=
+M1_POM_PASSWORD=
+
+# Properties for testDeleteMavenOneProject
+M1_DELETE_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/valid-project.xml
+M1_DELETE_PROJ_GRP_NAME=Maven One Project
+M1_DELETE_PROJ_GRP_ID=maven-one-project
+M1_DELETE_PROJ_GRP_DESCRIPTION=This is a sample Maven One Project.
+
+M1_MISS_REPO_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/missing-repository-element-project.xml
+M1_EXTENDED_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/extend-element-project.xml
+M1_UNPARSEABLE_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-one-projects/unparseable-content-project.xml
+
+########################
+# antProject group 
+########################
+
+ANT_NAME=Ant Project
+ANT_DESCRIPTION=This is a sample Ant Project used for testing
+ANT_VERSION=1.0.0-SNAPSHOT
+ANT_TAG=
+ANT_SCM_URL=http://svn.apache.org/repos/asf/ant/sandbox/parallelexecutor/
+ANT_SCM_USERNAME=
+ANT_SCM_PASSWORD=
+
+########################
+# shellProject group 
+########################
+
+SHELL_NAME=Shell Project
+SHELL_DESCRIPTION=This is a sample Shell Project used for testing
+SHELL_VERSION=1.0.0-SNAPSHOT
+SHELL_TAG=
+SHELL_SCM_URL=http://svn.apache.org/repos/asf/continuum/sandbox/examples/shell/
+SHELL_SCM_USERNAME=
+SHELL_SCM_PASSWORD=
 
 ########################
 # projectGroup group 
 ########################
-TEST_PROJ_GRP_NAME =Test Project Group Name
-TEST_PROJ_GRP_ID =Test Project Group Id
-TEST_PROJ_GRP_DESCRIPTION =Test Project Group Description
+TEST_PROJ_GRP_NAME=Test Project Group Name
+TEST_PROJ_GRP_ID=Test Project Group Id
+TEST_PROJ_GRP_DESCRIPTION=Test Project Group Description
 ## Second project group without projects
-TEST2_PROJ_GRP_NAME =Test Project Group 2 Name
-TEST2_PROJ_GRP_ID =Test Project Group 2 Id
-TEST2_PROJ_GRP_DESCRIPTION =Test Project Group 2 Description
+TEST2_PROJ_GRP_NAME=Test Project Group 2 Name
+TEST2_PROJ_GRP_ID=Test Project Group 2 Id
+TEST2_PROJ_GRP_DESCRIPTION=Test Project Group 2 Description
+
+# Test properties for testDeleteProjectGroup
+TEST_DELETE_GRP_NAME=Add then Delete Project Group
+TEST_DELETE_GRP_ID=test.delete.project.group
+TEST_DELETE_GRP_DESCRIPTION=Test Delete Project Group Description
+
+# Test properties for testProjectGroupMembers
+TEST_PROJ_GRP_NAME_ONE=Group
+TEST_PROJ_GRP_ID_ONE=Group Id
+TEST_PROJ_GRP_DESCRIPTION_ONE=Project group for members test
+TEST_PROJ_GRP_NAME_TWO=Group-Two
+TEST_PROJ_GRP_ID_TWO=Group Id Two
+TEST_PROJ_GRP_DESCRIPTION_TWO=Project group two for members test
 
 ########################
 # notifier group 
 ########################
-WAGON_NOTIFIER_URL =http://svn.apache.org/repos/asf/maven/pom/trunk/maven/pom.xml
-WAGON_SERVER_ID =wagoId
-MAIL_NOTIFIER_ADDRESS =test@test.com
-IRC_NOTIFIER_HOST =test.com
-IRC_NOTIFIER_CHANNEL =test_channel
-JABBER_NOTIFIER_HOST =test
-JABBER_NOTIFIER_LOGIN =test_login
-JABBER_NOTIFIER_PASSWORD =hello
-JABBER_NOTIFIER_ADDRESS =test@address.com
-MSN_NOTIFIER_ADDRESS =test@address.com
-MSN_NOTIFIER_LOGIN =test
-MSN_NOTIFIER_PASSWORD =hello
+WAGON_NOTIFIER_URL=http://svn.apache.org/repos/asf/maven/pom/trunk/maven/pom.xml
+WAGON_SERVER_ID=wagoId
+MAIL_NOTIFIER_ADDRESS=test@test.com
+IRC_NOTIFIER_HOST=test.com
+IRC_NOTIFIER_CHANNEL=test_channel
+JABBER_NOTIFIER_HOST=test
+JABBER_NOTIFIER_LOGIN=test_login
+JABBER_NOTIFIER_PASSWORD=hello
+JABBER_NOTIFIER_ADDRESS=test@address.com
+MSN_NOTIFIER_ADDRESS=test@address.com
+MSN_NOTIFIER_LOGIN=test
+MSN_NOTIFIER_PASSWORD=hello
 
 ########################
 # buildDefinition group 
 ########################
-BUILD_POM_NAME =pom.xml
-BUILD_GOALS =test
-BUILD_ARGUMENTS =--batch-mode --non-recursive
-BUILD_DESCRIPTION =Maven 2 Build Definition Description
+BUILD_POM_NAME=pom.xml
+BUILD_GOALS=test
+BUILD_ARGUMENTS=--batch-mode --non-recursive
+BUILD_DESCRIPTION=Maven 2 Build Definition Description
+
+########################
+# queue group 
+########################
+BUILD_QUEUE_NAME=name_build_queue
+
+########################
+# purge group 
+########################
+PURGE_REPOSITORY_DESCRIPTION=repository_description
+PURGE_REPOSITORY_DAYS=100
+PURGE_REPOSITORY_RETETION=3
+PURGE_DIRECTORY_DESCRIPTION=directory_description
+PURGE_DIRECTORY_DAYS=90
+PURGE_DIRECTORY_RETETION=4
+
+########################
+# local repository group 
+########################
+LOCAL_REPOSITORY_NAME=repository_name
+LOCAL_REPOSITORY_LOCATION=/usr/m2/repository
+
+########################
+# schedules group 
+########################
+SCHEDULE_NAME=schedule_name
+SCHEDULE_DESCRIPTION=schedule_description
+SCHEDULE_EXPR_SECOND=10
+SCHEDULE_EXPR_MINUTE=10
+SCHEDULE_EXPR_HOUR=20
+SCHEDULE_EXPR_DAY_MONTH=*
+SCHEDULE_EXPR_MONTH=*
+SCHEDULE_EXPR_DAY_WEEK=?
+SCHEDULE_EXPR_YEAR=2009
+SCHEDULE_MAX_TIME=60000
+SCHEDULE_PERIOD=36000
+
+########################
+# installations group 
+########################
+# Correct location for JDK
+INSTALL_TOOL_JDK_NAME=JDK6
+INSTALL_TOOL_JDK_PATH=${java.home}
+# Correct location for maven 2
+INTALL_TOOL_MAVEN_NAME=M9_HOME
+INTALL_TOOL_MAVEN_PATH=${maven.home}
+# Not neccesary correct location
+INSTALL_VAR_NAME=JDK5
+INSTALL_VAR_VARIABLE_NAME=/usr/lib/jvm/java-5-sun-1.5.0.12
+INSTALL_VAR_PATH=JAVA5_HOME
+
+########################
+# buildEnvironment group 
+########################
+BUIL_ENV_NAME=APPLICATION_JDK4
+
+########################
+# buildTemplate group 
+########################
+TEMPLATE_NAME=PROJECT_MAVEN_TEMPLATE
+TEMPLATE_BUILD_POM_NAME=pom.xml
+TEMPLATE_BUILD_GOALS=test
+TEMPLATE_BUILD_ARGUMENTS=--batch-mode --non-recursive
+TEMPLATE_BUILD_DESCRIPTION=Template Maven Test
+
+########################
+# userRoles group
+########################
+# General
+USERROLE_EMAIL=user@localhost.localdomain
+USERROLE_PASSWORD=pass123
+NEW_USERROLE_PASSWORD=pass12345
+# Guest Role
+GUEST_USERNAME=guest1
+GUEST_FULLNAME=Guest
+# Registered User Role
+REGISTERED_USERNAME=reg_user
+REGISTERED_FULLNAME=Registered User
+# System Administrator
+SYSAD_USERNAME=sys_admin
+SYSAD_FULLNAME=System Administrator
+# User Administrator
+USERADMIN_USERNAME=user_admin
+USERADMIN_FULLNAME=User Administrator
+# Continuum Group Project Administrator
+GROUPPROJECTADMIN_USERNAME=groupprojectadmin
+GROUPPROJECTADMIN_FULLNAME=Continuum Group Project Administrator
+# Continuum Group Project Developer
+GROUPPROJECTDEVELOPER_USERNAME=groupprojectdev
+GROUPPROJECTDEVELOPER_FULLNAME=Continuum Group Project Developer
+# Continuum Group Project User
+GROUPPROJECTUSER_USERNAME=groupprojectuser
+GROUPPROJECTUSER_FULLNAME=Continuum Group Project User
+# Continuum Manage Build Environment
+MANAGEBUILDENVIRONMENT_USERNAME=managebuildenv
+MANAGEBUILDENVIRONMENT_FULLNAME=Continuum Manage Build Environments
+# Continuum Manage Build Templates
+MANAGEBUILDTEMPLATES_USERNAME=managebuildtemp
+MANAGEBUILDTEMPLATES_FULLNAME=Continuum Manage Build Templates
+# Continuum Manage Installations
+MANAGEINSTALLATIONS_USERNAME=manageinstallations
+MANAGEINSTALLATIONS_FULLNAME=Continuum Manage Installations
+# Continuum Manage Local Repositories
+MANAGELOCALREPOS_USERNAME=managelocalrepo
+MANAGELOCALREPOS_FULLNAME=Continuum Manage Local Repositories
+# Continuum Manage Purging
+MANAGEPURGING_USERNAME=managepurging
+MANAGEPURGING_FULLNAME=Continuum Manage Purging
+# Continuum Manage Queues
+MANAGEQUEUES_USERNAME=managequeues
+MANAGEQUEUES_FULLNAME=Continuum Manage Queues
+# Continuum Manage Scheduling
+MANAGESCHEDULING_USERNAME=manageschedule
+MANAGESCHEDULING_FULLNAME=Continuum Manage Scheduling
+# Project Administrator
+PROJECTADMINISTRATOR_DEFAULTPROJECTGROUP_USERNAME=projectadmin
+PROJECTADMINISTRATOR_DEFAULTPROJECTGROUP_FULLNAME=Project Administrator - Default Project Group
+# Project Developer
+PROJECTDEVELOPER_DEFAULTPROJECTGROUP_USERNAME=projectdev
+PROJECTDEVELOPER_DEFAULTPROJECTGROUP_FULLNAME=Project Developer - Default Project Group
+# Project User
+PROJECTUSER_DEFAULTPROJECTGROUP_USERNAME=projectuser
+PROJECTUSER_DEFAULTPROJECTGROUP_FULLNAME=Project User - Default Project Group
+
+########################
+# buildAgents group 
+########################
+BUILD_AGENT_NAME =Agent_url_name
+BUILD_AGENT_DESCRIPTION =Agent_description
+BUILD_AGENT_NAME2 =Second_Agent
+BUILD_AGENT_DESCRIPTION2 =Agent_description2
+BUILD_AGENT_NAME3 =Third_Agent
+BUILD_AGENT_DESCRIPTION3 =Agent_description3
+BUILD_AGENT_GROUPNAME =agent_groupname

Added: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng-multienvironment.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng-multienvironment.xml?rev=834357&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng-multienvironment.xml (added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng-multienvironment.xml Tue Nov 10 05:38:01 2009
@@ -0,0 +1,50 @@
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd"&gt;
+&lt;!--
+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.
+--&gt;
+
+&lt;suite name="ContinuumTestMultiEnvironment" verbose="1" parallel="tests" thread-count="2"&gt;
+    &lt;listeners&gt;
+        &lt;listener class-name="org.apache.continuum.web.test.listener.CaptureScreenShotsListener"/&gt;
+    &lt;/listeners&gt;
+    &lt;test name="safari4Windows"&gt;
+        &lt;parameter name="browser" value="Safari 4 on Windows"/&gt;
+        &lt;groups&gt;
+            &lt;run&gt;
+                &lt;include name="setup" /&gt; &lt;!-- required to setup Selenium --&gt;
+                &lt;include name="login" /&gt;
+            &lt;/run&gt;
+        &lt;/groups&gt;
+        &lt;packages&gt;
+            &lt;package name="org.apache.continuum.web.test" /&gt;
+        &lt;/packages&gt;
+    &lt;/test&gt;
+	&lt;test name="firefox3Linux"&gt;
+        &lt;parameter name="browser" value="Firefox 3 on Linux"/&gt;
+        &lt;groups&gt;
+            &lt;run&gt;
+                &lt;include name="setup" /&gt; &lt;!-- required to setup Selenium --&gt;
+                &lt;include name="login" /&gt;
+            &lt;/run&gt;
+        &lt;/groups&gt;
+		&lt;packages&gt;
+			&lt;package name="org.apache.continuum.web.test" /&gt;
+		&lt;/packages&gt;
+	&lt;/test&gt;
+&lt;/suite&gt;

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng.xml?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng.xml (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/config/testng.xml Tue Nov 10 05:38:01 2009
@@ -20,34 +20,49 @@
 --&gt;
 
 &lt;suite name="ContinuumTest" verbose="1"&gt;
-	&lt;test name="BasicTest"&gt;
+    &lt;listeners&gt;
+        &lt;listener class-name="org.apache.continuum.web.test.listener.CaptureScreenShotsListener"/&gt;
+    &lt;/listeners&gt;
+	&lt;test name="BasicTest" enabled="true"&gt;
 		&lt;!--
 			Groups are divided into the unit tests. The order will be described
 			in the annotations of each type of test.
 		--&gt;
 		&lt;groups&gt;
 			&lt;run&gt;
+                &lt;include name="setup" /&gt; &lt;!-- required to setup Selenium --&gt;
 				&lt;include name="about" /&gt;
 			&lt;/run&gt;
 		&lt;/groups&gt;
-
 		&lt;packages&gt;
 			&lt;package name="org.apache.continuum.web.test" /&gt;
 		&lt;/packages&gt;
 	&lt;/test&gt;
-	&lt;test name="AdminTest"&gt;
-
+	&lt;test name="AdminTest" enabled="true"&gt;
 		&lt;groups&gt;
 			&lt;run&gt;
+                &lt;include name="setup" /&gt; &lt;!-- required to setup Selenium --&gt;
 				&lt;include name="login" /&gt;
+				&lt;include name="mavenTwoProject"/&gt;								
+				&lt;include name="projectGroup" /&gt;				
+                &lt;include name="mavenOneProject" /&gt;
+                &lt;include name="antProject" /&gt;
+                &lt;include name="shellProject" /&gt;
+                &lt;include name="buildDefinition" /&gt;
+                &lt;include name="notifier" /&gt;
+				&lt;include name="schedule" /&gt;
 				&lt;include name="myAccount" /&gt;
-				&lt;include name="mavenTwoProject"/&gt;
-				&lt;include name="projectGroup" /&gt;
-				&lt;include name="notifier" /&gt;
-				&lt;include name="buildDefinition" /&gt;
+				&lt;include name="queue" /&gt;
+				&lt;include name="purge" /&gt;
+				&lt;include name="repository" /&gt;
+				&lt;include name="configuration" /&gt;
+				&lt;include name="installation" /&gt;
+				&lt;include name="buildEnvironment" /&gt;
+				&lt;include name="buildDefinitionTemplate" /&gt;
+				&lt;include name="userroles"/&gt;
+				&lt;include name="agent"/&gt;
 			&lt;/run&gt;
 		&lt;/groups&gt;
-
 		&lt;packages&gt;
 			&lt;package name="org.apache.continuum.web.test" /&gt;
 		&lt;/packages&gt;

Modified: continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java?rev=834357&amp;r1=834356&amp;r2=834357&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java Tue Nov 10 05:38:01 2009
@@ -19,9 +19,7 @@
  * under the License.
  */
 
-import org.testng.Assert;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
+import org.apache.continuum.web.test.parent.AbstractContinuumTest;
 import org.testng.annotations.Test;
 
 /**
@@ -32,28 +30,11 @@
  */
 @Test( groups = { "about" }, alwaysRun = true )
 public class AboutTest
-    extends AbstractSeleniumTest
+    extends AbstractContinuumTest
 {
-
-    @BeforeTest(groups = { "about" })
-    public void open()
-        throws Exception
-    {
-        super.open(1);
-    }
-
     public void displayAboutPage()
     {
-        geSelenium().open( baseUrl + "/about.action" );
-        geSelenium().waitForPageToLoad( maxWaitTimeInMs );
-        Assert.assertEquals( "Continuum - About", geSelenium().getTitle() );
+        goToAboutPage();
     }
 
-    @Override
-    @AfterTest(groups = { "about" })
-    public void close()
-        throws Exception
-    {
-        super.close();
-    }
 }
\ No newline at end of file




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r832917 - /continuum/sandbox/continuum-ruby/README</title>
<author><name>carlos@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091104235233.03BA62388882@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091104235233-03BA62388882@eris-apache-org%3e</id>
<updated>2009-11-04T23:52:32Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: carlos
Date: Wed Nov  4 23:52:32 2009
New Revision: 832917

URL: http://svn.apache.org/viewvc?rev=832917&amp;view=rev
Log:
Add doc links

Modified:
    continuum/sandbox/continuum-ruby/README

Modified: continuum/sandbox/continuum-ruby/README
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ruby/README?rev=832917&amp;r1=832916&amp;r2=832917&amp;view=diff
==============================================================================
--- continuum/sandbox/continuum-ruby/README (original)
+++ continuum/sandbox/continuum-ruby/README Wed Nov  4 23:52:32 2009
@@ -4,6 +4,10 @@
 Ruby library to interact with Continuum, using the XML-RPC interface and enabling access
 to the working copy directories.
 
+More info on the Continuum XML-RPC interface:
+http://continuum.apache.org/docs/1.3.4/developer_guides/xmlrpc.html
+http://docs.codehaus.org/display/CONTINUUMUSER/Continuum+XMLRPC
+
 
 Example
 =======




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r832915 - in /continuum/sandbox/continuum-ruby: README lib/ lib/continuum.rb lib/continuum/ lib/continuum/working_copy.rb lib/continuum/xml_rpc.rb</title>
<author><name>carlos@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091104234936.F3E5123888CF@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091104234936-F3E5123888CF@eris-apache-org%3e</id>
<updated>2009-11-04T23:49:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: carlos
Date: Wed Nov  4 23:49:36 2009
New Revision: 832915

URL: http://svn.apache.org/viewvc?rev=832915&amp;view=rev
Log:
Add the first version of the Continuum-Ruby library

Added:
    continuum/sandbox/continuum-ruby/README   (with props)
    continuum/sandbox/continuum-ruby/lib/
    continuum/sandbox/continuum-ruby/lib/continuum/
    continuum/sandbox/continuum-ruby/lib/continuum.rb   (with props)
    continuum/sandbox/continuum-ruby/lib/continuum/working_copy.rb   (with props)
    continuum/sandbox/continuum-ruby/lib/continuum/xml_rpc.rb   (with props)

Added: continuum/sandbox/continuum-ruby/README
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ruby/README?rev=832915&amp;view=auto
==============================================================================
--- continuum/sandbox/continuum-ruby/README (added)
+++ continuum/sandbox/continuum-ruby/README Wed Nov  4 23:49:36 2009
@@ -0,0 +1,32 @@
+Continuum-Ruby
+=========
+
+Ruby library to interact with Continuum, using the XML-RPC interface and enabling access
+to the working copy directories.
+
+
+Example
+=======
+
+continuum = Continuum::Continuum.new("my.continuum.host", 8080, "admin", "password", "/continuum")
+
+# xml-rpc interface
+
+xml_rpc = Continuum::XmlRpc.new(continuum)
+
+ok, result = xml_rpc.build_project(1)
+error = Continuum.parse_error(result) if !ok
+
+# getting working copy files
+
+working_copy = Continuum::WorkingCopy.new(continuum)
+test_results = working_copy.get(1, "target/surefire-reports", "emailable-report.html")
+
+files = working_copy.dir(1, "target")
+files.each do |file|
+  file_content = working_copy.get(1, "target", file)
+end
+
+
+
+Copyright (c) 2009 Carlos Sanchez, released under the Apache License, Version 2.0

Propchange: continuum/sandbox/continuum-ruby/README
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/sandbox/continuum-ruby/README
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/sandbox/continuum-ruby/lib/continuum.rb
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ruby/lib/continuum.rb?rev=832915&amp;view=auto
==============================================================================
--- continuum/sandbox/continuum-ruby/lib/continuum.rb (added)
+++ continuum/sandbox/continuum-ruby/lib/continuum.rb Wed Nov  4 23:49:36 2009
@@ -0,0 +1,34 @@
+# 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.
+
+require 'continuum/working_copy'
+require 'continuum/xml_rpc'
+
+module Continuum
+  class Continuum
+
+    attr_accessor :username, :password, :host, :port, :path
+
+    def initialize(host = "localhost", port = "8080", username = nil, password = nil, path
= "")
+      @username = username
+      @password = password
+      @host = host
+      @port = port
+      @path = path
+    end
+  end
+end

Propchange: continuum/sandbox/continuum-ruby/lib/continuum.rb
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/sandbox/continuum-ruby/lib/continuum.rb
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/sandbox/continuum-ruby/lib/continuum/working_copy.rb
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ruby/lib/continuum/working_copy.rb?rev=832915&amp;view=auto
==============================================================================
--- continuum/sandbox/continuum-ruby/lib/continuum/working_copy.rb (added)
+++ continuum/sandbox/continuum-ruby/lib/continuum/working_copy.rb Wed Nov  4 23:49:36 2009
@@ -0,0 +1,79 @@
+# 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.
+
+require 'mechanize'
+
+# Allows getting files from a project working copy folder, by scraping the Continuum html
+module Continuum
+  class WorkingCopy
+
+    attr_accessor :continuum
+
+    def initialize(continuum)
+      @continuum = continuum
+      @username = continuum.username
+      @password = continuum.password
+      @host = continuum.host
+      @port = continuum.port
+      @path = continuum.path
+      @continuum_url = "http://#{@host}:#{@port}#{@path}"
+      @login_url = "#{@continuum_url}/security/login.action"
+    end
+
+    def dir(project_id, dir)
+      page = get_page working_copy_url(project_id, dir)
+      dir_contents = Nokogiri::HTML(page.body).search(".//table[@class='tableRegion']//a[contains(@href,'#{dir}')]")
+      file_names = []
+      dir_contents.each {|x| file_names &lt;&lt; x.text}
+      file_names = file_names[1..-1] unless file_names.empty? # first element is directory
name
+      return file_names
+    end
+
+    def get(project_id, dir, file)
+      page = get_page(working_copy_url(project_id, dir, file, "workingCopy")) # binary file
+      if (!page.instance_of? WWW::Mechanize::File)
+        # it's a text file
+        page = get_page(working_copy_url(project_id, dir, file, "workingCopyFileText"))
+      end
+      return page.body
+    end
+
+    private
+
+    def working_copy_url(project_id, dir, file = nil, action = "workingCopyFileText")
+      action = file.nil? ? "workingCopy" : action
+      url = "#{@continuum_url}/#{action}.action?projectId=#{project_id}&amp;userDirectory=#{dir}"
+      url += "&amp;file=#{file}" unless file.nil?
+      return url
+    end
+
+    def get_page(url)
+      mechanize = WWW::Mechanize.new
+      page = mechanize.get(url)
+      if page.search(".//div[@class='app']").inner_html.include? "You are not authorized
to access this page"
+        page = mechanize.get(@login_url)
+        login_form = page.form_with(:name =&gt; "login")
+        login_form.username = @username
+        login_form.password = @password
+        page = login_form.click_button
+        page = mechanize.get(url)
+      end
+      return page
+    end
+
+  end
+end

Propchange: continuum/sandbox/continuum-ruby/lib/continuum/working_copy.rb
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/sandbox/continuum-ruby/lib/continuum/working_copy.rb
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision

Added: continuum/sandbox/continuum-ruby/lib/continuum/xml_rpc.rb
URL: http://svn.apache.org/viewvc/continuum/sandbox/continuum-ruby/lib/continuum/xml_rpc.rb?rev=832915&amp;view=auto
==============================================================================
--- continuum/sandbox/continuum-ruby/lib/continuum/xml_rpc.rb (added)
+++ continuum/sandbox/continuum-ruby/lib/continuum/xml_rpc.rb Wed Nov  4 23:49:36 2009
@@ -0,0 +1,119 @@
+# 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.
+
+require 'xmlrpc/client'
+
+OpenStruct.__send__(:define_method, :id) { @table[:id] || self.object_id }
+
+# Provides methods to interact with continuum XML-RPC interface
+module Continuum
+  class XmlRpc
+
+    attr_accessor :continuum
+
+    def initialize(continuum)
+      @continuum = continuum
+      @username = continuum.username
+      @password = continuum.password
+      @host = continuum.host
+      @port = continuum.port
+      @path = continuum.path
+    end
+
+    def self.parse_error(result)
+      (result.instance_of? XMLRPC::FaultException) ? "[#{result.faultCode}] #{result.faultString}"
: ""
+    end
+
+    def build_project(project_id)
+      call_continuum("buildProject", project_id)
+    end
+
+    def get_build_results(project_id)
+      call_continuum("getBuildResultsForProjectRPC", project_id)
+    end
+
+    def get_build_output(project_id, build_id)
+      call_continuum("getBuildOutput", project_id, build_id)
+    end
+
+    def get_project_with_all_details(project_id)
+      call_continuum("getProjectWithAllDetailsRPC", project_id)
+    end
+
+    def get_all_project_groups()
+      call_continuum("getAllProjectGroupsRPC")
+    end
+    def get_all_project_groups_with_all_details()
+      call_continuum("getAllProjectGroupsWithAllDetailsRPC")
+    end
+
+    def get_projects(project_group_id)
+      call_continuum("getProjectsRPC", project_group_id)
+    end
+
+    def add_maven_two_project(url, project_group_id=nil)
+      if !project_group_id.nil?
+        call_continuum("addMavenTwoProjectRPC", url, project_group_id)
+      else
+        call_continuum("addMavenTwoProjectRPC", url)
+      end
+    end
+
+    def add_project_group(group_name, group_id, description = "")
+      call_continuum("addProjectGroupRPC", group_name, group_id, description)
+    end
+
+    def to_s
+      uri
+    end
+
+    def uri(mask_password = true)
+      if @username.nil?
+        "http://#{@host}:#{@port}#{@path}"
+      else
+        p = mask_password ? "******" : @password
+        "http://#{@username}:#{p}@#{@host}:#{@port}#{@path}"
+      end
+    end
+
+  private
+
+    def call_continuum(method, *args)
+      xml_rpc_client = XMLRPC::Client.new2("#{uri(false)}/xmlrpc")
+      ok, result = xml_rpc_client.call2("org.apache.maven.continuum.xmlrpc.ContinuumService.#{method}",*args)
+      result = parse(result) if ok
+      return ok, result
+    end
+
+    def parse(result)
+      return result.collect {|r| parse(r)} if result.instance_of?(Array)
+      return result if !is_object?(result)
+      new_hash = {}
+      result.each do |key, value|
+        parsed_value = value
+        parsed_value = parse(value) if is_object?(value) || value.instance_of?(Array)
+        new_hash[key.underscore] = parsed_value
+      end
+      OpenStruct.new new_hash
+    end
+
+    def is_object?(hash)
+      hash.instance_of?(Hash) &amp;&amp; !hash["__class"].nil?
+    end
+
+  end
+end

Propchange: continuum/sandbox/continuum-ruby/lib/continuum/xml_rpc.rb
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: continuum/sandbox/continuum-ruby/lib/continuum/xml_rpc.rb
------------------------------------------------------------------------------
    svn:keywords = Author Date Id Revision




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r832906 - /continuum/sandbox/continuum-ruby/</title>
<author><name>carlos@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200911.mbox/%3c20091104233134.1AB1E2388874@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091104233134-1AB1E2388874@eris-apache-org%3e</id>
<updated>2009-11-04T23:31:34Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: carlos
Date: Wed Nov  4 23:31:33 2009
New Revision: 832906

URL: http://svn.apache.org/viewvc?rev=832906&amp;view=rev
Log:
Creating a ruby library to interact with xmlrpc

Added:
    continuum/sandbox/continuum-ruby/



</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r827903 - in /continuum/trunk/continuum-webapp-test/src/test: resources/ testng/config/ testng/org/apache/continuum/web/test/ testng/org/apache/continuum/web/test/parent/</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091021065325.04D9423888D0@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091021065325-04D9423888D0@eris-apache-org%3e</id>
<updated>2009-10-21T06:53:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Wed Oct 21 06:53:24 2009
New Revision: 827903

URL: http://svn.apache.org/viewvc?rev=827903&amp;view=rev
Log:
- fixed testDeleteMavenTwoProject
- removed SecurityTest and moved tests to UserRolesManagementTest

Removed:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SecurityTest.java
Modified:
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
    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/MavenTwoProjectTest.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/parent/AbstractContinuumTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractUserRolesManagementTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=827903&amp;r1=827902&amp;r2=827903&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Wed Oct 21
06:53:24 2009
@@ -275,12 +275,3 @@
 BUILD_AGENT_NAME3 =Third_Agent
 BUILD_AGENT_DESCRIPTION3 =Agent_description3
 BUILD_AGENT_GROUPNAME =agent_groupname
-
-########################
-# security
-########################
-PROJECT_ADMIN_USERNAME=project_admin
-PROJECT_ADMIN_NAME=project_admin_name
-PROJECT_ADMIN_EMAIL=project_admin@something.com
-PROJECT_ADMIN_OLD_PASSWORD=password123
-PROJECT_ADMIN_NEW_PASSWORD=projectadmin123
\ No newline at end of file

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=827903&amp;r1=827902&amp;r2=827903&amp;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 Wed Oct 21 06:53:24
2009
@@ -61,7 +61,6 @@
 				&lt;include name="buildDefinitionTemplate" /&gt;
 				&lt;include name="userroles"/&gt;
 				&lt;include name="agent"/&gt;
-				&lt;include name="security" /&gt;
 			&lt;/run&gt;
 		&lt;/groups&gt;
 		&lt;packages&gt;

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=827903&amp;r1=827902&amp;r2=827903&amp;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
Wed Oct 21 06:53:24 2009
@@ -78,60 +78,7 @@
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
-    @Test( dependsOnMethods = { "testWithEmptyPassword" } )
-    public void testWithCreatedProjectAdminUser()
-    {
-        goToLoginPage();
-        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
-        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
-        getSelenium().click( "loginForm__login" );
-        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
-
-        clickLinkWithText( "Configuration" );
-        clickLinkWithLocator( "configuration_distributedBuildEnabled", false );
-
-        String username = getProperty( "PROJECT_ADMIN_USERNAME" );
-        String name = getProperty( "PROJECT_ADMIN_NAME" );
-        String email = getProperty( "PROJECT_ADMIN_EMAIL" );
-        String oldPassword = getProperty( "PROJECT_ADMIN_OLD_PASSWORD" );
-        String newPassword = getProperty( "PROJECT_ADMIN_NEW_PASSWORD" );
-
-        createNewUser( username, name, email, oldPassword );
-        assignContinuumRoleToUser( "Continuum Group Project Administrator" );
-        clickButtonWithValue( "Submit" );
-        assertUserCreatedPage();
-        assertLinkPresent( username );
-        assertTextPresent( name );
-        assertTextPresent( email );
-
-        clickLinkWithText( username );
-        assertUserEditPage( username, name, email );
-        assertTextNotPresent( "Last Login:" );
-        assertTextPresent( "Continuum Group Project User" );
-        assertTextPresent( "Continuum Group Project Developer" );
-        assertTextPresent( "Continuum Group Project Administrator" );
-        clickLinkWithText( "Logout" );
-        goToLoginPage();
-
-        getSelenium().type( "loginForm_username", username );
-        getSelenium().type( "loginForm_password", oldPassword );
-        getSelenium().click( "loginForm__login" );
-        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
-        assertChangePasswordPage();
-        
-        getSelenium().type( "passwordForm_existingPassword", oldPassword );
-        getSelenium().type( "passwordForm_newPassword", newPassword );
-        getSelenium().type( "passwordForm_newPasswordConfirm", newPassword );
-        getSelenium().click( "passwordForm__submit" );
-        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
-
-        assertLinkPresent( "Edit Details" );
-        assertLinkPresent( "Logout" );
-        
-        clickLinkWithText( "Logout" );
-    }
-
-    @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithCreatedProjectAdminUser"
}, alwaysRun = true )
+    @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithEmptyPassword" }, alwaysRun
= true )
     public void testWithCorrectUsernamePassword()
     {
         goToLoginPage();

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=827903&amp;r1=827902&amp;r2=827903&amp;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
Wed Oct 21 06:53:24 2009
@@ -215,6 +215,7 @@
         assertTextPresent( "Delete Continuum Project" );
         clickButtonWithValue( "Delete" );
         assertPage( "Continuum - Project Group" );
+        assertTextNotPresent( "Unable to delete project" );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
         assertTextNotPresent( M2_PROJ_GRP_SCM_ROOT_URL );
 
@@ -235,6 +236,7 @@
         assertTextPresent( "Delete Continuum Projects" );
         clickButtonWithValue( "Delete" );
         assertPage( "Continuum - Project Group" );
+        assertTextNotPresent( "Unable to delete project" );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
         assertTextNotPresent( M2_PROJ_GRP_SCM_ROOT_URL );
 

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=827903&amp;r1=827902&amp;r2=827903&amp;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
Wed Oct 21 06:53:24 2009
@@ -31,28 +31,29 @@
 
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
-        checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        //checkUserRoleWithValue( fullname );
+        clickLinkWithLocator( "addRolesToUser_addNDSelectedRoles", false );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );        
+        //assertTextPresent( "Password successfully changed" );        
         clickLinkWithText( "Logout" );
     }
 
     @Test( dependsOnMethods = { "testAddUserWithGuestRole" } )
     public void testGuestUserRoleFunction()
     {
-	username = getProperty( "GUEST_USERNAME" );
+        username = getProperty( "GUEST_USERNAME" );
         fullname = getProperty( "GUEST_FULLNAME" );
-	login( username, getUserRoleNewPassword() );
-	assertLeftNavMenuWithRole( fullname );
-	goToAboutPage();
-	clickLinkWithText( "Show Project Groups" );
-	assertTextPresent( "Project Groups list is empty" );
-	clickLinkWithText( "Logout" );
-	login( getAdminUsername(), getAdminPassword() );
+        login( username, getUserRoleNewPassword() );
+        assertLeftNavMenuWithRole( fullname );
+        goToAboutPage();
+        clickLinkWithText( "Show Project Groups" );
+        assertTextPresent( "Project Groups list is empty" );
+        clickLinkWithText( "Logout" );
+        login( getAdminUsername(), getAdminPassword() );
     }
 
 
@@ -70,12 +71,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
 
         clickLinkWithText( "Logout" );
         // assertTextPresent("You are already logged in.");
@@ -84,11 +85,11 @@
     @Test( dependsOnMethods = { "testAddUserWithRegisteredUserRole" } )
     public void testRegisteredRoleFunction()
     {
-	username = getProperty( "REGISTERED_USERNAME" );
+        username = getProperty( "REGISTERED_USERNAME" );
         fullname = getProperty( "REGISTERED_FULLNAME" );
-	login( username, getUserRoleNewPassword() );
+        login( username, getUserRoleNewPassword() );
         assertLeftNavMenuWithRole( fullname );
-	goToAboutPage();
+        goToAboutPage();
         clickLinkWithText( "Show Project Groups" );
         assertTextPresent( "Project Groups list is empty." );
         clickLinkWithText( "Logout" );
@@ -112,13 +113,13 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
 
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
 
         clickLinkWithText( "Logout" );
     }
@@ -126,13 +127,13 @@
     @Test( dependsOnMethods = { "testAddUserWithSystemAdminRole" } )
     public void testSystemAdminRoleFunction()
     {
-	username = getProperty( "SYSAD_USERNAME" );
+	    username = getProperty( "SYSAD_USERNAME" );
         fullname = getProperty( "SYSAD_FULLNAME" );
-	login( username, getUserRoleNewPassword() );
+        login( username, getUserRoleNewPassword() );
         assertLeftNavMenuWithRole( fullname );
         clickLinkWithText( "Show Project Groups" );
         assertTextNotPresent( "Project Groups list is empty." );
-	assertLinkPresent( "Default Project Group" );
+        assertLinkPresent( "Default Project Group" );
 	
         clickLinkWithText( "Logout" );
         login( getAdminUsername(), getAdminPassword() );
@@ -152,14 +153,14 @@
 
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
-            checkUserRoleWithValue( fullname );
+        checkUserRoleWithValue( fullname );
 		clickButtonWithValue( "Submit" );
 
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
 
         clickLinkWithText( "Logout" );
     }
@@ -167,31 +168,31 @@
     @Test( dependsOnMethods = { "testAddUserWithUserAdminRole" } )
     public void testUserAdminFunction()
     {
-	username = getProperty( "USERADMIN_USERNAME" );
+        username = getProperty( "USERADMIN_USERNAME" );
         fullname = getProperty( "USERADMIN_FULLNAME" );
-	login( username, getUserRoleNewPassword() );
+        login( username, getUserRoleNewPassword() );
         assertLeftNavMenuWithRole( fullname );
         clickLinkWithText( "Show Project Groups" );
         assertTextPresent( "Project Groups list is empty." );
-	// add user
-	clickLinkWithText( "Users" );
-	clickButtonWithValue( "Create New User" );
-	assertCreateUserPage();
-	setFieldValue( "user.username", "guest0" );
+        // add user
+        clickLinkWithText( "Users" );
+        clickButtonWithValue( "Create New User" );
+	    assertCreateUserPage();
+	    setFieldValue( "user.username", "guest0" );
         setFieldValue( "user.fullName", "guest0" );
         setFieldValue( "user.email", "guest0@guest0.com" );
         setFieldValue( "user.password", "pass" );
         setFieldValue( "user.confirmPassword", "pass" );
         submit();
-	assertUserRolesPage( );
+        assertUserRolesPage( );
         clickButtonWithValue( "Submit" );
-	selectValue( "name=ec_rd", "50" );
+        selectValue( "name=ec_rd", "50" );
         waitPage();
-	// delete user	
-	deleteUser( "guest0", "guest0", "guest0@guest0.com" );	
-	// TODO edit user
+        // delete user	
+        deleteUser( "guest0", "guest0", "guest0@guest0.com" );	
+        // TODO edit user
 
-	clickLinkWithText( "Logout" );
+        clickLinkWithText( "Logout" );
         login( getAdminUsername(), getAdminPassword() );
     }
 
@@ -212,41 +213,63 @@
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
         clickButtonWithValue( "Submit" );
-	clickLinkWithText( "Logout" );
+
+        // enable distributed build
+        clickLinkWithText( "Configuration" );
+        clickLinkWithLocator( "configuration_distributedBuildEnabled", false );
+        clickButtonWithValue( "Save" );
+
+        clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
+
+	    assertProjectAdministratorAccess();
+
+        clickLinkWithText( "Logout" );
+
+        login( getAdminUsername(), getAdminPassword() );
+        // disable distributed build
+        clickLinkWithText( "Configuration" );
+        clickLinkWithLocator( "configuration_distributedBuildEnabled", false );
+        clickButtonWithValue( "Save" );
+
+        clickLinkWithText( "Logout" );
+
+        login( username, getUserRoleNewPassword() );
+        assertProjectAdministratorAccess();
+
         clickLinkWithText( "Logout" );
     }
 
     @Test( dependsOnMethods = { "testAddUserWithContinuumGroupProjectAdminRole" } )
     public void testContinuumGroupProjectAdmin_AddProjectGroup() throws Exception
     {
-	username = getProperty( "GROUPPROJECTADMIN_USERNAME" );
+        username = getProperty( "GROUPPROJECTADMIN_USERNAME" );
         fullname = getProperty( "GROUPPROJECTADMIN_FULLNAME" );
-	login( username, getUserRoleNewPassword() );
+        login( username, getUserRoleNewPassword() );
         assertLeftNavMenuWithRole( fullname );
-	clickLinkWithText( "Show Project Groups" );
+        clickLinkWithText( "Show Project Groups" );
         assertTextNotPresent( "Project Groups list is empty." );
-	// test add project group
-	clickButtonWithValue( "Add Project Group" );
-	setFieldValue( "name", "Test Group" );
+        // test add project group
+        clickButtonWithValue( "Add Project Group" );
+        setFieldValue( "name", "Test Group" );
         setFieldValue( "groupId", "Test Group" );
         setFieldValue( "description", "testing project group" );
-	submit();
+        submit();
     }
 
     @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_AddProjectGroup" } )
     public void testContinuumGroupProjectAdmin_AddProjectToProjectGroup() throws Exception
     {
-	clickLinkWithText( "Test Group" );
-	clickButtonWithValue( "Add" );	
-	assertAddMavenTwoProjectPage();
-	setFieldValue( "m2PomUrl", "https://svn.apache.org/repos/asf/continuum/sandbox/continuum-build-queue-test-data/pom.xml"
);
+        clickLinkWithText( "Test Group" );
+        clickButtonWithValue( "Add" );	
+        assertAddMavenTwoProjectPage();
+        setFieldValue( "m2PomUrl", "https://svn.apache.org/repos/asf/continuum/sandbox/continuum-build-queue-test-data/pom.xml"
);
         clickButtonWithValue( "Add" );
-	String title;
-	boolean success = true;
+        String title;
+        boolean success = true;
         if ( success )
         {
             title = "Continuum - Project Group";
@@ -256,25 +279,25 @@
             title = "Continuum - Add Maven 2 Project";
         }
         waitAddProject( title );
-	assertTextPresent( "ContinuumBuildQueueTestData" );
+        assertTextPresent( "ContinuumBuildQueueTestData" );
     }
     
     @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_AddProjectToProjectGroup"
} )
     public void testContinuumGroupProjectAdmin_BuildProject() throws Exception
     {
-	buildProjectGroup( "Test Group", "Test Group", "testing project group", "ContinuumBuildQueueTestData"
);
+        buildProjectGroup( "Test Group", "Test Group", "testing project group", "ContinuumBuildQueueTestData"
);
     }
 
     @Test( dependsOnMethods = { "testContinuumGroupProjectAdmin_BuildProject" } )
     public void testContinuumGroupProjectAdmin_AssignUserToAGroup()
     {
-	clickLinkWithText( "Users" );
-	clickLinkWithText( "guest1" );
-	clickLinkWithText( "Edit Roles" );
-	checkUserRoleWithValue( "Guest" );
-	checkResourceRoleWithValue( "Project Developer - Test Group" );
-	submit();
-	clickLinkWithText( "Logout" );
+        clickLinkWithText( "Users" );
+        clickLinkWithText( "guest1" );
+        clickLinkWithText( "Edit Roles" );
+        checkUserRoleWithValue( "Guest" );
+        checkResourceRoleWithValue( "Project Developer - Test Group" );
+        submit();
+        clickLinkWithText( "Logout" );
         login( getAdminUsername(), getAdminPassword() );
     }
 
@@ -334,12 +357,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -357,12 +380,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -380,12 +403,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );	
+        assertTextPresent( "Password successfully changed" );	
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -403,12 +426,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -426,12 +449,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -449,12 +472,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -472,12 +495,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -495,12 +518,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+	    clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -518,12 +541,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkUserRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -541,12 +564,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkResourceRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -564,12 +587,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkResourceRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );
@@ -587,12 +610,12 @@
         createUser( username, fullname, getUserEmail(), getUserRolePassword(), true );
         assertCreatedUserInfo( username );
         checkResourceRoleWithValue( fullname );
-	clickButtonWithValue( "Submit" );
+        clickButtonWithValue( "Submit" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRolePassword() );
         changePassword( getUserRolePassword(), getUserRoleNewPassword() );
-	assertTextPresent( "Password successfully changed" );
+        assertTextPresent( "Password successfully changed" );
         clickLinkWithText( "Logout" );
 
         login( username, getUserRoleNewPassword() );

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=827903&amp;r1=827902&amp;r2=827903&amp;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
Wed Oct 21 06:53:24 2009
@@ -855,7 +855,7 @@
     {
         int currentIt = 1;
         int maxIt = 10;
-        while ( isElementPresent( "//img[@alt='Checking Out']" ) || isElementPresent( "//img[@alt='Updating']")
)
+        while ( isElementPresent( "//img[@alt='Checking Out']" ) )
         {
             Thread.sleep( 10000 );
             getSelenium().refresh();
@@ -866,7 +866,6 @@
             }
             currentIt++;
         }
-        Thread.sleep( 10000 );
     }
 
     public void createNewUser( String username, String name, String email, String password
)
@@ -902,27 +901,4 @@
         assertLinkPresent( "admin" );
         assertLinkPresent( "guest" );
     }
-
-    public void assertProjectAdministratorAccess()
-    {
-        assertLinkPresent( "About" );
-        assertLinkPresent( "Show Project Groups" );
-        assertLinkPresent( "Maven 2.0.x Project" );
-        assertLinkPresent( "Maven 1.x Project" );
-        assertLinkPresent( "Ant Project" );
-        assertLinkPresent( "Shell Project" );
-        assertLinkPresent( "Schedules" );
-        assertLinkPresent( "Queues" );
-        assertLinkPresent( "Users" );
-        assertLinkPresent( "Roles" );
-        assertLinkNotPresent( "Local Repositories" );
-        assertLinkNotPresent( "Purge Configurations" );
-        assertLinkNotPresent( "Installations" );
-        assertLinkNotPresent( "Build Environments" );
-        assertLinkNotPresent( "Build Definition Templates" );
-        assertLinkNotPresent( "Configuration" );
-        assertLinkNotPresent( "Appearance" );
-        assertLinkNotPresent( "Build Queue" );
-        assertLinkNotPresent( "Build Agent" );
-    }
 }

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=827903&amp;r1=827902&amp;r2=827903&amp;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
Wed Oct 21 06:53:24 2009
@@ -198,13 +198,13 @@
     		for( String navmenu : arrayNavMenu )
     			assertLinkPresent( navmenu );
     	}
-	else if( role == "Project Administrator - Default Project Group" )
-	{
+    	else if( role == "Project Administrator - Default Project Group" )
+    	{
     		String navMenu = "About,Show Project Groups,Queues,Users,Roles";
     		String[] arrayNavMenu = navMenu.split( "," );
     		for( String navmenu : arrayNavMenu )
     			assertLinkPresent( navmenu );
-	}
+    	}
     	else if( role == "Project Developer - Default Project Group" || role == "Project User
- Default Project Group" )
     	{
     		String navMenu = "About,Show Project Groups,Queues";
@@ -224,14 +224,37 @@
 
 	}
 
-	public void assertDeleteUserPage( String username )
-	 {
-	        assertPage( "[Admin] User Delete" ); //TODO
-	        assertTextPresent( "[Admin] User Delete" );
-	        assertTextPresent( "The following user will be deleted:" );
-	        assertTextPresent( "Username: " + username );
-	        assertButtonWithValuePresent( "Delete User" );
-	 }
+    public void assertDeleteUserPage( String username )
+    {
+        assertPage( "[Admin] User Delete" ); //TODO
+        assertTextPresent( "[Admin] User Delete" );
+        assertTextPresent( "The following user will be deleted:" );
+        assertTextPresent( "Username: " + username );
+        assertButtonWithValuePresent( "Delete User" );
+    }
+
+	public void assertProjectAdministratorAccess()
+    {
+        assertLinkPresent( "About" );
+        assertLinkPresent( "Show Project Groups" );
+        assertLinkPresent( "Maven 2.0.x Project" );
+        assertLinkPresent( "Maven 1.x Project" );
+        assertLinkPresent( "Ant Project" );
+        assertLinkPresent( "Shell Project" );
+        assertLinkPresent( "Schedules" );
+        assertLinkPresent( "Queues" );
+        assertLinkPresent( "Users" );
+        assertLinkPresent( "Roles" );
+        assertLinkNotPresent( "Local Repositories" );
+        assertLinkNotPresent( "Purge Configurations" );
+        assertLinkNotPresent( "Installations" );
+        assertLinkNotPresent( "Build Environments" );
+        assertLinkNotPresent( "Build Definition Templates" );
+        assertLinkNotPresent( "Configuration" );
+        assertLinkNotPresent( "Appearance" );
+        assertLinkNotPresent( "Build Queue" );
+        assertLinkNotPresent( "Build Agent" );
+    }
 
 	/////////////////////////////////////////
 	// User Roles Management
@@ -279,74 +302,74 @@
 	}
 
 
-	 public void login( String username, String password )
-	    {
-	        login( username, password, true, "Login Page" );
-	    }
+	public void login( String username, String password )
+	{
+	    login( username, password, true, "Login Page" );
+	}
 
-		public void login( String username, String password, boolean valid, String assertReturnPage
)
+    public void login( String username, String password, boolean valid, String assertReturnPage
)
+	{
+        if ( isLinkPresent( "Login" ) )
 	    {
-	        if ( isLinkPresent( "Login" ) )
-	        {
-	            goToLoginPage();
+            goToLoginPage();
 
-	            submitLoginPage( username, password, false, valid, assertReturnPage );
-	        }
+            submitLoginPage( username, password, false, valid, assertReturnPage );
 	    }
+    }
 
-		public void submitLoginPage( String username, String password )
-	    {
-	        submitLoginPage( username, password, false, true, "Login Page" );
-	    }
+    public void submitLoginPage( String username, String password )
+    {
+        submitLoginPage( username, password, false, true, "Login Page" );
+    }
 
-	    public void submitLoginPage( String username, String password, boolean validUsernamePassword
)
-	    {
-	        submitLoginPage( username, password, false, validUsernamePassword, "Login Page"
);
-	    }
+    public void submitLoginPage( String username, String password, boolean validUsernamePassword
)
+    {
+        submitLoginPage( username, password, false, validUsernamePassword, "Login Page" );
+    }
 
-	    public void submitLoginPage( String username, String password, boolean rememberMe, boolean
validUsernamePassword,
+    public void submitLoginPage( String username, String password, boolean rememberMe, boolean
validUsernamePassword,
                                  String assertReturnPage )
-	    {
-	        assertLoginPage();
-	        setFieldValue( "username", username );
-	        setFieldValue( "password", password );
-	        if ( rememberMe )
-	        {
-	            checkField( "rememberMe" );
-	        }
-	        clickButtonWithValue( "Login" );
-
-	        if ( validUsernamePassword )
-	        {
-	            assertTextPresent( "Current User:" );
-	            assertTextPresent( username );
-	            assertLinkPresent( "Edit Details" );
-	            assertLinkPresent( "Logout" );
-	        }
-	        else
-	        {
-	            if ( "Login Page".equals( assertReturnPage ) )
-	            {
-	                assertLoginPage();
-	            }
-	            else
-	            {
-	                assertPage( assertReturnPage );
-	            }
-	        }
-	    }
+    {
+        assertLoginPage();
+        setFieldValue( "username", username );
+        setFieldValue( "password", password );
+        if ( rememberMe )
+        {
+            checkField( "rememberMe" );
+        }
+        clickButtonWithValue( "Login" );
+
+        if ( validUsernamePassword )
+        {
+            assertTextPresent( "Current User:" );
+            assertTextPresent( username );
+            assertLinkPresent( "Edit Details" );
+            assertLinkPresent( "Logout" );
+        }
+        else
+        {
+            if ( "Login Page".equals( assertReturnPage ) )
+            {
+                assertLoginPage();
+            }
+            else
+            {
+                assertPage( assertReturnPage );
+            }
+        }
+    }
 
 	public void deleteUser( String userName, String fullName, String emailAdd )
     {
         deleteUser( userName, fullName, emailAdd, false, false );
     }
 
-	public void deleteUser( String userName, String fullName, String emailAd, boolean validated,
boolean locked )
-	{
-		//clickLinkWithText( "userlist" );
-		clickLinkWithXPath( "//table[@id='ec_table']/tbody[2]/tr[3]/td[7]/a/img" );
-		assertDeleteUserPage( userName );
+    public void deleteUser( String userName, String fullName, String emailAd, boolean validated,
boolean locked )
+    {
+	    //clickLinkWithText( "userlist" );
+        clickLinkWithXPath( "//table[@id='ec_table']/tbody[2]/tr[3]/td[7]/a/img" );
+        assertDeleteUserPage( userName );
         submit();
         assertElementNotPresent( userName );
-	}
+    }
 }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r827851 - in /continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test: LoginTest.java SecurityTest.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091021001041.ABCE62388987@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091021001041-ABCE62388987@eris-apache-org%3e</id>
<updated>2009-10-21T00:10:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Wed Oct 21 00:10:41 2009
New Revision: 827851

URL: http://svn.apache.org/viewvc?rev=827851&amp;view=rev
Log:
added test for CONTINUUM-2327

Modified:
    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/SecurityTest.java

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=827851&amp;r1=827850&amp;r2=827851&amp;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
Wed Oct 21 00:10:41 2009
@@ -124,24 +124,10 @@
         getSelenium().type( "passwordForm_newPasswordConfirm", newPassword );
         getSelenium().click( "passwordForm__submit" );
         getSelenium().waitForPageToLoad( maxWaitTimeInMs );
-        assertTextPresent( "Password successfully changed" );
 
         assertLinkPresent( "Edit Details" );
         assertLinkPresent( "Logout" );
-
-        assertProjectAdministratorAccess();
-
-        clickLinkWithText( "Logout" );
-
-        goToLoginPage();
-        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
-        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
-        getSelenium().click( "loginForm__login" );
-        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
-
-        clickLinkWithText( "Configuration" );
-        clickLinkWithLocator( "configuration_distributedBuildEnabled", false );
-
+        
         clickLinkWithText( "Logout" );
     }
 

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SecurityTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SecurityTest.java?rev=827851&amp;r1=827850&amp;r2=827851&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SecurityTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SecurityTest.java
Wed Oct 21 00:10:41 2009
@@ -7,6 +7,7 @@
 public class SecurityTest
     extends AbstractContinuumTest
 {
+    @Test( dependsOnMethods = { "testWithCreatedProjectAdminUser", "testWithCorrectUsernamePassword"
})
     public void testProjectAdminAccess()
     {
         String username = getProperty( "PROJECT_ADMIN_USERNAME" );
@@ -64,4 +65,34 @@
 
         clickLinkWithText( "Logout" );
     }
+
+    @Test( dependsOnMethods = { "testProjectAdminAccess" } )
+    public void testNotAuthorizedMessageAfterLoginSuccessful()
+    {
+        assertTextPresent( "Login" );
+        assertTextNotPresent( "Edit Details" );
+        assertTextNotPresent( "Logout" );
+
+        String url;
+
+        if ( baseUrl.endsWith( "/" ) )
+        {
+            url = baseUrl + "projectGroupSummary.action?projectGroupId=1";
+        }
+        else
+        {
+            url = baseUrl + "/projectGroupSummary.action?projectGroupId=1";
+        }
+
+        getSelenium().open( url );
+        assertTextPresent( "You are not authorized to access this page. Please contact your
administrator to be granted the appropriate permissions." );
+
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+
+        assertTextNotPresent( "You are not authorized to access this page. Please contact
your administrator to be granted the appropriate permissions." );
+    }
 }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r826891 - in /continuum/trunk/continuum-webapp-test/src/test: resources/ testng/config/ testng/org/apache/continuum/web/test/ testng/org/apache/continuum/web/test/parent/</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091019234701.8877A238889B@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091019234701-8877A238889B@eris-apache-org%3e</id>
<updated>2009-10-19T23:47:01Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Mon Oct 19 23:47:00 2009
New Revision: 826891

URL: http://svn.apache.org/viewvc?rev=826891&amp;view=rev
Log:
added test for CONTINUUM-2127

Added:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SecurityTest.java
Modified:
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/config/testng.xml
    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/parent/AbstractContinuumTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=826891&amp;r1=826890&amp;r2=826891&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Mon Oct 19
23:47:00 2009
@@ -275,3 +275,12 @@
 BUILD_AGENT_NAME3 =Third_Agent
 BUILD_AGENT_DESCRIPTION3 =Agent_description3
 BUILD_AGENT_GROUPNAME =agent_groupname
+
+########################
+# security
+########################
+PROJECT_ADMIN_USERNAME=project_admin
+PROJECT_ADMIN_NAME=project_admin_name
+PROJECT_ADMIN_EMAIL=project_admin@something.com
+PROJECT_ADMIN_OLD_PASSWORD=password123
+PROJECT_ADMIN_NEW_PASSWORD=projectadmin123
\ No newline at end of file

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=826891&amp;r1=826890&amp;r2=826891&amp;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 Mon Oct 19 23:47:00
2009
@@ -61,6 +61,7 @@
 				&lt;include name="buildDefinitionTemplate" /&gt;
 				&lt;include name="userroles"/&gt;
 				&lt;include name="agent"/&gt;
+				&lt;include name="security" /&gt;
 			&lt;/run&gt;
 		&lt;/groups&gt;
 		&lt;packages&gt;

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=826891&amp;r1=826890&amp;r2=826891&amp;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
Mon Oct 19 23:47:00 2009
@@ -78,7 +78,74 @@
         assertTextPresent( "You have entered an incorrect username and/or password" );
     }
 
-    @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithEmptyPassword" }, alwaysRun
= true )
+    @Test( dependsOnMethods = { "testWithEmptyPassword" } )
+    public void testWithCreatedProjectAdminUser()
+    {
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+
+        clickLinkWithText( "Configuration" );
+        clickLinkWithLocator( "configuration_distributedBuildEnabled", false );
+
+        String username = getProperty( "PROJECT_ADMIN_USERNAME" );
+        String name = getProperty( "PROJECT_ADMIN_NAME" );
+        String email = getProperty( "PROJECT_ADMIN_EMAIL" );
+        String oldPassword = getProperty( "PROJECT_ADMIN_OLD_PASSWORD" );
+        String newPassword = getProperty( "PROJECT_ADMIN_NEW_PASSWORD" );
+
+        createNewUser( username, name, email, oldPassword );
+        assignContinuumRoleToUser( "Continuum Group Project Administrator" );
+        clickButtonWithValue( "Submit" );
+        assertUserCreatedPage();
+        assertLinkPresent( username );
+        assertTextPresent( name );
+        assertTextPresent( email );
+
+        clickLinkWithText( username );
+        assertUserEditPage( username, name, email );
+        assertTextNotPresent( "Last Login:" );
+        assertTextPresent( "Continuum Group Project User" );
+        assertTextPresent( "Continuum Group Project Developer" );
+        assertTextPresent( "Continuum Group Project Administrator" );
+        clickLinkWithText( "Logout" );
+        goToLoginPage();
+
+        getSelenium().type( "loginForm_username", username );
+        getSelenium().type( "loginForm_password", oldPassword );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        assertChangePasswordPage();
+        
+        getSelenium().type( "passwordForm_existingPassword", oldPassword );
+        getSelenium().type( "passwordForm_newPassword", newPassword );
+        getSelenium().type( "passwordForm_newPasswordConfirm", newPassword );
+        getSelenium().click( "passwordForm__submit" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+        assertTextPresent( "Password successfully changed" );
+
+        assertLinkPresent( "Edit Details" );
+        assertLinkPresent( "Logout" );
+
+        assertProjectAdministratorAccess();
+
+        clickLinkWithText( "Logout" );
+
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+
+        clickLinkWithText( "Configuration" );
+        clickLinkWithLocator( "configuration_distributedBuildEnabled", false );
+
+        clickLinkWithText( "Logout" );
+    }
+
+    @Test( groups = { "loginSuccess" }, dependsOnMethods = { "testWithCreatedProjectAdminUser"
}, alwaysRun = true )
     public void testWithCorrectUsernamePassword()
     {
         goToLoginPage();

Added: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SecurityTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SecurityTest.java?rev=826891&amp;view=auto
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SecurityTest.java
(added)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/SecurityTest.java
Mon Oct 19 23:47:00 2009
@@ -0,0 +1,67 @@
+package org.apache.continuum.web.test;
+
+import org.apache.continuum.web.test.parent.AbstractContinuumTest;
+import org.testng.annotations.Test;
+
+@Test( groups = { "security" } )
+public class SecurityTest
+    extends AbstractContinuumTest
+{
+    public void testProjectAdminAccess()
+    {
+        String username = getProperty( "PROJECT_ADMIN_USERNAME" );
+        String password = getProperty( "PROJECT_ADMIN_NEW_PASSWORD" );
+        String name = getProperty( "PROJECT_ADMIN_NAME" );
+
+        // enable distributed build
+        clickLinkWithText( "Configuration" );
+        clickLinkWithLocator( "configuration_distributedBuildEnabled", false );
+        clickButtonWithValue( "Save" );
+
+        // logout admin
+        clickLinkWithText( "Logout" );
+
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", username );
+        getSelenium().type( "loginForm_password", password );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+
+        assertTextPresent( "Current User: " + name + " (" + username + ")" );
+        assertLinkPresent( "Edit Details" );
+        assertLinkPresent( "Logout" );
+
+        assertProjectAdministratorAccess();
+
+        clickLinkWithText( "Logout" );
+
+        // login as admin again
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", getProperty( "ADMIN_USERNAME" ) );
+        getSelenium().type( "loginForm_password", getProperty( "ADMIN_PASSWORD" ) );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+
+        // disable distributed build
+        clickLinkWithText( "Configuration" );
+        clickLinkWithLocator( "configuration_distributedBuildEnabled", false );
+        clickButtonWithValue( "Save" );
+
+        // logout admin
+        clickLinkWithText( "Logout" );
+
+        goToLoginPage();
+        getSelenium().type( "loginForm_username", username );
+        getSelenium().type( "loginForm_password", password );
+        getSelenium().click( "loginForm__login" );
+        getSelenium().waitForPageToLoad( maxWaitTimeInMs );
+
+        assertTextPresent( "Current User: " + name + " (" + username + ")" );
+        assertLinkPresent( "Edit Details" );
+        assertLinkPresent( "Logout" );
+
+        assertProjectAdministratorAccess();
+
+        clickLinkWithText( "Logout" );
+    }
+}

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=826891&amp;r1=826890&amp;r2=826891&amp;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
Mon Oct 19 23:47:00 2009
@@ -133,6 +133,38 @@
         assertTextPresent( username );
     }
 
+    public void assertChangePasswordPage()
+    {
+        assertPage( "Change Password" );
+        assertTextPresent( "Change Password" );
+        assertTextPresent( "Existing Password*:" );
+        assertElementPresent( "existingPassword" );
+        assertTextPresent( "New Password*:" );
+        assertElementPresent( "newPassword" );
+        assertTextPresent( "Confirm New Password*:" );
+        assertElementPresent( "newPasswordConfirm" );
+    }
+
+    public void assertUserEditPage( String username, String name, String email )
+    {
+        assertPage( "[Admin] User Edit" );
+        assertTextPresent( "[Admin] User Edit" );
+        assertTextPresent( "Username" );
+        assertTextPresent( username );
+        assertTextPresent( "Full Name*:" );
+        assertFieldValue( name, "userEditForm_user_fullName" );
+        assertTextPresent( "Email Address*:" );
+        assertFieldValue( email, "userEditForm_user_email" );
+        assertTextPresent( "Password*:" );
+        assertFieldValue( "", "userEditForm_user_password" );
+        assertTextPresent( "Confirm Password*:" );
+        assertElementPresent( "userEditForm_user_confirmPassword" );
+        assertTextPresent( "Account Creation:" );
+        assertTextPresent( "Last Password Change:" );
+        assertTextPresent( "Effective Roles" );
+        assertLinkPresent( "Edit Roles" );
+    }
+
     // ////////////////////////////////////
     // Configuration
     // ////////////////////////////////////
@@ -787,7 +819,7 @@
         setFieldValue( "user.confirmPassword", password );
         clickButtonWithValue( "Create User" );
         assertPage( "[Admin] User Edit" );
-        clickLinkWithXPath( "//input[@name='addDSelectedRoles' and @value='Project Developer
- " + groupName + "']", false );
+        assignContinuumResourceRoleToUser( "Project Developer", groupName );
         clickButtonWithValue( "Submit" );
         assertPage( "[Admin] User List" );
         assertTextPresent( username );
@@ -836,4 +868,61 @@
         }
         Thread.sleep( 10000 );
     }
+
+    public void createNewUser( String username, String name, String email, String password
)
+    {
+        clickLinkWithText( "Users" );
+        assertPage( "[Admin] User List" );
+        assertTextNotPresent( username );
+        clickButtonWithValue( "Create New User" );
+        assertPage( "[Admin] User Create" );
+        setFieldValue( "user.fullName", name );
+        setFieldValue( "user.username", username );
+        setFieldValue( "user.email", email );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", password );
+        clickButtonWithValue( "Create User" );
+        assertPage( "[Admin] User Edit" );
+    }
+
+    public void assignContinuumRoleToUser( String role )
+    {
+        clickLinkWithXPath( "//input[@id='addRolesToUser_addNDSelectedRoles' and @name='addNDSelectedRoles'
and @value='" + role + "']", false );
+    }
+
+    public void assignContinuumResourceRoleToUser( String resourceRole, String groupName
)
+    {
+        clickLinkWithXPath( "//input[@name='addDSelectedRoles' and @value='" + resourceRole
+ " - " + groupName + "']", false );
+    }
+
+    public void assertUserCreatedPage()
+    {
+        assertPage( "[Admin] User List" );
+        assertTextPresent( "[Admin] List of Users in Role: Any" );
+        assertLinkPresent( "admin" );
+        assertLinkPresent( "guest" );
+    }
+
+    public void assertProjectAdministratorAccess()
+    {
+        assertLinkPresent( "About" );
+        assertLinkPresent( "Show Project Groups" );
+        assertLinkPresent( "Maven 2.0.x Project" );
+        assertLinkPresent( "Maven 1.x Project" );
+        assertLinkPresent( "Ant Project" );
+        assertLinkPresent( "Shell Project" );
+        assertLinkPresent( "Schedules" );
+        assertLinkPresent( "Queues" );
+        assertLinkPresent( "Users" );
+        assertLinkPresent( "Roles" );
+        assertLinkNotPresent( "Local Repositories" );
+        assertLinkNotPresent( "Purge Configurations" );
+        assertLinkNotPresent( "Installations" );
+        assertLinkNotPresent( "Build Environments" );
+        assertLinkNotPresent( "Build Definition Templates" );
+        assertLinkNotPresent( "Configuration" );
+        assertLinkNotPresent( "Appearance" );
+        assertLinkNotPresent( "Build Queue" );
+        assertLinkNotPresent( "Build Agent" );
+    }
 }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825861 - /continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/</title>
<author><name>brett@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091016121705.926482388854@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091016121705-926482388854@eris-apache-org%3e</id>
<updated>2009-10-16T12:17:05Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: brett
Date: Fri Oct 16 12:17:05 2009
New Revision: 825861

URL: http://svn.apache.org/viewvc?rev=825861&amp;view=rev
Log:
remove svn:ignore as it is no longer needed without war:inplace

Modified:
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/   (props
changed)

Propchange: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/
            ('svn:ignore' removed)




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825860 - /continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/</title>
<author><name>brett@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091016121606.842902388854@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091016121606-842902388854@eris-apache-org%3e</id>
<updated>2009-10-16T12:16:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: brett
Date: Fri Oct 16 12:16:06 2009
New Revision: 825860

URL: http://svn.apache.org/viewvc?rev=825860&amp;view=rev
Log:
remove ignores, no longer needed without war:inplace

Modified:
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/   (props changed)

Propchange: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/
            ('svn:ignore' removed)




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825759 - in /continuum/trunk/continuum-webapp-test/src/test: resources/testng.properties testng/org/apache/continuum/web/test/MavenTwoProjectTest.java testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091016042146.0CFF52388897@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091016042146-0CFF52388897@eris-apache-org%3e</id>
<updated>2009-10-16T04:21:45Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Fri Oct 16 04:21:45 2009
New Revision: 825759

URL: http://svn.apache.org/viewvc?rev=825759&amp;view=rev
Log:
-fixed selenium test when deleting a maven 2 project
-added check if scm root url is also deleted when deleting a project

Modified:
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    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/parent/AbstractContinuumTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=825759&amp;r1=825758&amp;r2=825759&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Fri Oct 16
04:21:45 2009
@@ -33,6 +33,7 @@
 M2_DELETE_PROJ_GRP_NAME=Continuum Simple Example Project
 M2_DELETE_PROJ_GRP_ID=org.apache.continuum.examples
 M2_DELETE_PROJ_GRP_DESCRIPTION=Delete test project
+M2_DELETE_PROJ_GRP_SCM_ROOT_URL=scm:svn:http://svn.apache.org/repos/asf/continuum/sandbox/simple-example
 
 # SCM element is missing from pom
 NOT_SCM_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-scm-element-pom.xml

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=825759&amp;r1=825758&amp;r2=825759&amp;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
Fri Oct 16 04:21:45 2009
@@ -193,44 +193,54 @@
         clickButtonWithValue( "Cancel" );
         assertAboutPage();
     }
-    
+
     @Test( dependsOnMethods = { "testAddMavenTwoProject" } )
     public void testDeleteMavenTwoProject()
         throws Exception
     {
         String M2_PROJ_GRP_NAME = getProperty( "M2_DELETE_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_DELETE_PROJ_GRP_SCM_ROOT_URL"
);
         goToProjectGroupsSummaryPage();
         
         // delete project - delete icon
         addMaven2Project( M2_PROJ_GRP_NAME );
         clickLinkWithText( M2_PROJ_GRP_NAME );
+
+        assertPage( "Continuum - Project Group" );
+        assertTextPresent( M2_PROJ_GRP_SCM_ROOT_URL );
+        // wait for project to finish checkout
+        waitForProjectCheckout();
+
         clickLinkWithXPath( "//tbody/tr['0']/td['10']/a/img[@alt='Delete']" );
         assertTextPresent( "Delete Continuum Project" );
         clickButtonWithValue( "Delete" );
         assertPage( "Continuum - Project Group" );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
+        assertTextNotPresent( M2_PROJ_GRP_SCM_ROOT_URL );
 
-        // wait for project to finish checkout
-        waitForProjectCheckout();
-        
         // remove group for next test
         removeProjectGroup( M2_PROJ_GRP_NAME );
-        
+        assertLinkNotPresent( M2_PROJ_GRP_NAME );
+
         // delete project - "Delete Project(s)" button
         addMaven2Project( M2_PROJ_GRP_NAME );
         clickLinkWithText( M2_PROJ_GRP_NAME );
+
+        assertPage( "Continuum - Project Group" );
+        //wait for project to finish checkout
+        waitForProjectCheckout();
+
         checkField( "//tbody/tr['0']/td['0']/input[@name='selectedProjects']" );
         clickButtonWithValue( "Delete Project(s)" );
         assertTextPresent( "Delete Continuum Projects" );
         clickButtonWithValue( "Delete" );
         assertPage( "Continuum - Project Group" );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
-        
-        //wait for project to finish checkout
-        waitForProjectCheckout();
+        assertTextNotPresent( M2_PROJ_GRP_SCM_ROOT_URL );
 
         // remove project group
         removeProjectGroup( M2_PROJ_GRP_NAME );
+        assertLinkNotPresent( M2_PROJ_GRP_NAME );
     }
 
     private void addMaven2Project( String groupName )

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=825759&amp;r1=825758&amp;r2=825759&amp;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
Fri Oct 16 04:21:45 2009
@@ -823,7 +823,7 @@
     {
         int currentIt = 1;
         int maxIt = 10;
-        while ( isElementPresent( "//img[@alt='Checking Out']" ) )
+        while ( isElementPresent( "//img[@alt='Checking Out']" ) || isElementPresent( "//img[@alt='Updating']")
)
         {
             Thread.sleep( 10000 );
             getSelenium().refresh();




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825350 - in /continuum/trunk/continuum-webapp-test/src/test: resources/testng.properties testng/org/apache/continuum/web/test/MavenTwoProjectTest.java testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091015002513.7312923888BD@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091015002513-7312923888BD@eris-apache-org%3e</id>
<updated>2009-10-15T00:25:13Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Thu Oct 15 00:25:12 2009
New Revision: 825350

URL: http://svn.apache.org/viewvc?rev=825350&amp;view=rev
Log:
- added selenium test for CONTINUUM-2350
- fixed testDeleteMavenTwoProject

Modified:
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    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/parent/AbstractContinuumTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=825350&amp;r1=825349&amp;r2=825350&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Thu Oct 15
00:25:12 2009
@@ -24,6 +24,7 @@
 M2_PROJ_GRP_NAME=ContinuumBuildQueueTestData
 M2_PROJ_GRP_ID=org.apache.continuum
 M2_PROJ_GRP_DESCRIPTION=Project for testing continuum build queue
+M2_PROJ_GRP_SCM_ROOT_URL=scm:svn:https://svn.apache.org/repos/asf/continuum/sandbox/continuum-build-queue-test-data
 M2_POM_USERNAME=
 M2_POM_PASSWORD=
 
@@ -39,6 +40,13 @@
 MISS_PARENT_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-parent-pom.xml
 MISS_SUBPRO_POM_URL=http://svn.apache.org/repos/asf/continuum/trunk/continuum-webapp-test/src/test/resources/unit/maven-two-projects/missing-modules-pom.xml
 
+# Properties for testAddMavenTwoProjectModuleNameWithSameLetter
+M2_SAME_LETTER_POM_URL=https://svn.apache.org/repos/asf/continuum/sandbox/flat-example/flat-parent/pom.xml
+M2_SAME_LETTER_PROJ_GRP_NAME=Flat Example
+M2_SAME_LETTER_PROJ_GRP_ID=com.example.flat
+M2_SAME_LETTER_PROJ_GRP_DESCRIPTION=
+M2_SAME_LETTER_PROJ_GRP_SCM_ROOT_URL=scm:svn:http://svn.apache.org/repos/asf/continuum/sandbox/flat-example/flat-parent
+
 ########################
 # mavenOneProject group 
 ########################

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=825350&amp;r1=825349&amp;r2=825350&amp;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
Thu Oct 15 00:25:12 2009
@@ -43,10 +43,37 @@
         String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         String M2_PROJ_GRP_ID = getProperty( "M2_PROJ_GRP_ID" );
         String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_PROJ_GRP_DESCRIPTION" );
+        String M2_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_PROJ_GRP_SCM_ROOT_URL" );
+        
         // Enter values into Add Maven Two Project fields, and submit
         addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true );
         // Wait Struct Listener
         assertProjectGroupSummaryPage( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION
);
+
+        assertTextPresent( M2_PROJ_GRP_SCM_ROOT_URL );
+    }
+
+    /**
+     * Test flat multi module project with names that start with the same letter
+     */
+    public void testAddMavenTwoProjectModuleNameWithSameLetter()
+        throws Exception
+    {
+        String M2_POM_URL = getProperty( "M2_SAME_LETTER_POM_URL" );
+        String M2_POM_USERNAME = getProperty( "M2_POM_USERNAME" );
+        String M2_POM_PASSWORD = getProperty( "M2_POM_PASSWORD" );
+
+        String M2_PROJ_GRP_NAME = getProperty( "M2_SAME_LETTER_PROJ_GRP_NAME" );
+        String M2_PROJ_GRP_ID = getProperty( "M2_SAME_LETTER_PROJ_GRP_ID" );
+        String M2_PROJ_GRP_DESCRIPTION = getProperty( "M2_SAME_LETTER_PROJ_GRP_DESCRIPTION"
);
+
+        String M2_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_SAME_LETTER_PROJ_GRP_SCM_ROOT_URL"
);
+
+        addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true );
+
+        assertProjectGroupSummaryPage( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION
);
+
+        assertTextPresent( M2_PROJ_GRP_SCM_ROOT_URL );
     }
 
     @Test( dependsOnMethods = { "testAddProjectGroup" } )
@@ -56,13 +83,17 @@
         String TEST_PROJ_GRP_NAME = getProperty( "TEST_PROJ_GRP_NAME" );
         String TEST_PROJ_GRP_ID = getProperty( "TEST_PROJ_GRP_ID" );
         String TEST_PROJ_GRP_DESCRIPTION = getProperty( "TEST_PROJ_GRP_DESCRIPTION" );
+        String TEST_PROJ_GRP_SCM_ROOT_URL = getProperty( "M2_PROJ_GRP_SCM_ROOT_URL" );
 
         String M2_POM_URL = getProperty( "M2_POM_URL" );
         String M2_POM_USERNAME = getProperty( "M2_POM_USERNAME" );
         String M2_POM_PASSWORD = getProperty( "M2_POM_PASSWORD" );
+        
         addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, TEST_PROJ_GRP_NAME,
true );
 
         assertProjectGroupSummaryPage( TEST_PROJ_GRP_NAME, TEST_PROJ_GRP_ID, TEST_PROJ_GRP_DESCRIPTION
);
+
+        assertTextPresent( TEST_PROJ_GRP_SCM_ROOT_URL );
     }
 
     /**
@@ -178,6 +209,9 @@
         clickButtonWithValue( "Delete" );
         assertPage( "Continuum - Project Group" );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
+
+        // wait for project to finish checkout
+        waitForProjectCheckout();
         
         // remove group for next test
         removeProjectGroup( M2_PROJ_GRP_NAME );
@@ -192,10 +226,13 @@
         assertPage( "Continuum - Project Group" );
         assertLinkNotPresent( M2_PROJ_GRP_NAME );
         
+        //wait for project to finish checkout
+        waitForProjectCheckout();
+
         // remove project group
         removeProjectGroup( M2_PROJ_GRP_NAME );
     }
-    
+
     private void addMaven2Project( String groupName )
         throws Exception
     {

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=825350&amp;r1=825349&amp;r2=825350&amp;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
Thu Oct 15 00:25:12 2009
@@ -230,6 +230,7 @@
         // assertElementPresent( "remove" );
 
         assertTextPresent( "Project Group Scm Root" );
+        assertTextPresent( "Scm Root URL" );
 
         if ( isTextPresent( "Member Projects" ) )
         {
@@ -816,4 +817,23 @@
         assertTextNotPresent( name );
         assertTextNotPresent( email );
     }
+
+    public void waitForProjectCheckout()
+        throws Exception
+    {
+        int currentIt = 1;
+        int maxIt = 10;
+        while ( isElementPresent( "//img[@alt='Checking Out']" ) )
+        {
+            Thread.sleep( 10000 );
+            getSelenium().refresh();
+            waitPage();
+            if ( currentIt &gt; maxIt )
+            {
+                Assert.fail( "Timeout, Can't check out projects" );
+            }
+            currentIt++;
+        }
+        Thread.sleep( 10000 );
+    }
 }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825340 - in /continuum/trunk/continuum-webapp-test/src/test: resources/testng.properties testng/org/apache/continuum/web/test/ProjectGroupTest.java testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091014232157.7A076238889D@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091014232157-7A076238889D@eris-apache-org%3e</id>
<updated>2009-10-14T23:21:57Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Wed Oct 14 23:21:56 2009
New Revision: 825340

URL: http://svn.apache.org/viewvc?rev=825340&amp;view=rev
Log:
[CONTINUUM-2387] added selenium test

Modified:
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    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/parent/AbstractContinuumTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties?rev=825340&amp;r1=825339&amp;r2=825340&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Wed Oct 14
23:21:56 2009
@@ -101,6 +101,14 @@
 TEST_DELETE_GRP_ID=test.delete.project.group
 TEST_DELETE_GRP_DESCRIPTION=Test Delete Project Group Description
 
+# Test properties for testProjectGroupMembers
+TEST_PROJ_GRP_NAME_ONE=Group
+TEST_PROJ_GRP_ID_ONE=Group Id
+TEST_PROJ_GRP_DESCRIPTION_ONE=Project group for members test
+TEST_PROJ_GRP_NAME_TWO=Group-Two
+TEST_PROJ_GRP_ID_TWO=Group Id Two
+TEST_PROJ_GRP_DESCRIPTION_TWO=Project group two for members test
+
 ########################
 # notifier group 
 ########################

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=825340&amp;r1=825339&amp;r2=825340&amp;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
Wed Oct 14 23:21:56 2009
@@ -165,4 +165,40 @@
         assertProjectGroupsSummaryPage();
         assertLinkNotPresent( TEST_GRP_NAME );
     }
+
+    public void testProjectGroupMembers()
+        throws Exception
+    {
+        String GRP_NAME_ONE = getProperty( "TEST_PROJ_GRP_NAME_ONE" );
+        String GRP_ID_ONE = getProperty( "TEST_PROJ_GRP_ID_ONE" );
+        String GRP_DESCRIPTION_ONE = getProperty( "TEST_PROJ_GRP_DESCRIPTION_ONE" );
+        String GRP_NAME_TWO = getProperty( "TEST_PROJ_GRP_NAME_TWO" );
+        String GRP_ID_TWO = getProperty( "TEST_PROJ_GRP_ID_TWO" );
+        String GRP_DESCRIPTION_TWO = getProperty( "TEST_PROJ_GRP_DESCRIPTION_TWO" );
+
+        addProjectGroup( GRP_NAME_ONE, GRP_ID_ONE, GRP_DESCRIPTION_ONE, true );
+        assertLinkPresent( GRP_NAME_ONE );
+
+        addProjectGroup( GRP_NAME_TWO, GRP_ID_TWO, GRP_DESCRIPTION_TWO, true );
+        assertLinkPresent( GRP_NAME_TWO );
+
+        createAndAddUserAsDeveloperToGroup( "username1", "user1", "user1@something.com",
"password123", GRP_NAME_ONE );
+        createAndAddUserAsDeveloperToGroup( "username2", "user2", "user2@something.com",
"password123", GRP_NAME_ONE );
+        createAndAddUserAsDeveloperToGroup( "username3", "user3", "user3@something.com",
"password123", GRP_NAME_TWO );
+
+        showMembers( GRP_NAME_ONE, GRP_ID_ONE, GRP_DESCRIPTION_ONE );
+        assertUserPresent( "username1", "user1", "user1@something.com" );
+        assertUserPresent( "username2", "user2", "user2@something.com" );
+        assertUserNotPresent( "username3", "user3", "user3@something.com" );
+
+        showMembers( GRP_NAME_TWO, GRP_ID_TWO, GRP_DESCRIPTION_TWO );
+        assertUserNotPresent( "username1", "user1", "user1@something.com" );
+        assertUserNotPresent( "username2", "user2", "user2@something.com" );
+        assertUserPresent( "username3", "user3", "user3@something.com" );
+
+        removeProjectGroup( GRP_NAME_ONE );
+        assertLinkNotPresent( GRP_NAME_ONE );
+        removeProjectGroup( GRP_NAME_TWO );
+        assertLinkNotPresent( GRP_NAME_TWO );
+    }
 }

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=825340&amp;r1=825339&amp;r2=825340&amp;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
Wed Oct 14 23:21:56 2009
@@ -771,4 +771,49 @@
         String t = getTitle();
         Assert.assertTrue( t.contains( title ) );
     }
+
+    public void createAndAddUserAsDeveloperToGroup( String username, String name, String
email, String password, String groupName )
+    {
+        clickLinkWithText( "Users" );
+        assertPage( "[Admin] User List" );
+        assertTextNotPresent( username );
+        clickButtonWithValue( "Create New User" );
+        assertPage( "[Admin] User Create" );
+        setFieldValue( "user.fullName", name );
+        setFieldValue( "user.username", username );
+        setFieldValue( "user.email", email );
+        setFieldValue( "user.password", password );
+        setFieldValue( "user.confirmPassword", password );
+        clickButtonWithValue( "Create User" );
+        assertPage( "[Admin] User Edit" );
+        clickLinkWithXPath( "//input[@name='addDSelectedRoles' and @value='Project Developer
- " + groupName + "']", false );
+        clickButtonWithValue( "Submit" );
+        assertPage( "[Admin] User List" );
+        assertTextPresent( username );
+        assertTextPresent( name );
+        assertTextPresent( email );
+    }
+
+    public void showMembers( String name, String groupId, String description )
+        throws Exception
+    {
+        showProjectGroup( name, groupId, description );
+        clickLinkWithText( "Members" );
+        assertTextPresent( "Member Projects of " + name + " group" );
+        assertTextPresent( "Users" );
+    }
+
+    public void assertUserPresent( String username, String name, String email )
+    {
+        assertTextPresent( username );
+        assertTextPresent( name );
+        assertTextPresent( email );
+    }
+
+    public void assertUserNotPresent( String username, String name, String email )
+    {
+        assertTextNotPresent( username );
+        assertTextNotPresent( name );
+        assertTextNotPresent( email );
+    }
 }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825339 - /continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091014232120.61CB72388897@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091014232120-61CB72388897@eris-apache-org%3e</id>
<updated>2009-10-14T23:21:20Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Wed Oct 14 23:21:19 2009
New Revision: 825339

URL: http://svn.apache.org/viewvc?rev=825339&amp;view=rev
Log:
[CONTINUUM-2387] retrieve correct roles to show only the users of the project group in the
members tab
merge -r 825337:825338 of 1.3.x branch

Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=825339&amp;r1=825338&amp;r2=825339&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Wed Oct 14 23:21:19 2009
@@ -692,7 +692,8 @@
             List&lt;String&gt; roleNames = new ArrayList&lt;String&gt;();
             for ( Role r : roles )
             {
-                if ( r.getName().indexOf( projectGroup.getName() ) &gt; -1 )
+                int index = r.getName().indexOf( projectGroup.getName() );
+                if ( index &gt; -1 &amp;&amp; r.getName().substring( index ).trim().equals(
projectGroup.getName() ) )
                 {
                     roleNames.add( r.getName() );
                 }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825338 - /continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091014231929.051572388897@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091014231929-051572388897@eris-apache-org%3e</id>
<updated>2009-10-14T23:19:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Wed Oct 14 23:19:28 2009
New Revision: 825338

URL: http://svn.apache.org/viewvc?rev=825338&amp;view=rev
Log:
[CONTINUUM-2387] retrieve correct roles to show only the users of the project group in the
members tab

Modified:
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=825338&amp;r1=825337&amp;r2=825338&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
Wed Oct 14 23:19:28 2009
@@ -689,7 +689,8 @@
             List&lt;String&gt; roleNames = new ArrayList&lt;String&gt;();
             for ( Role r : roles )
             {
-                if ( r.getName().indexOf( projectGroup.getName() ) &gt; -1 )
+                int index = r.getName().indexOf( projectGroup.getName() );
+                if ( index &gt; -1 &amp;&amp; r.getName().substring( index ).trim().equals(
projectGroup.getName() ) )
                 {
                     roleNames.add( r.getName() );
                 }




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825223 - /continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp</title>
<author><name>wsmoak@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091014190735.F2B0123888D0@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091014190735-F2B0123888D0@eris-apache-org%3e</id>
<updated>2009-10-14T19:07:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: wsmoak
Date: Wed Oct 14 19:07:35 2009
New Revision: 825223

URL: http://svn.apache.org/viewvc?rev=825223&amp;view=rev
Log:
[CONTINUUM-2388] Use POST when saving a build definition.  Reduces length of url and is more
correct since the action has side effects.
merged r825222 from trunk

Modified:
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp?rev=825223&amp;r1=825222&amp;r2=825223&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
Wed Oct 14 19:07:35 2009
@@ -30,7 +30,7 @@
         &lt;h3&gt;&lt;s:text name="buildDefinition.section.title"/&gt;&lt;/h3&gt;
 
         &lt;div class="axial"&gt;
-          &lt;s:form action="saveBuildDefinition" method="get"&gt;
+          &lt;s:form action="saveBuildDefinition" method="post"&gt;
             &lt;c:choose&gt;
             
               &lt;c:when test="${!empty actionErrors}"&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r825222 - /continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp</title>
<author><name>wsmoak@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091014190532.2E44023888D0@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091014190532-2E44023888D0@eris-apache-org%3e</id>
<updated>2009-10-14T19:05:31Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: wsmoak
Date: Wed Oct 14 19:05:31 2009
New Revision: 825222

URL: http://svn.apache.org/viewvc?rev=825222&amp;view=rev
Log:
[CONTINUUM-2388] Use POST when saving a build definition.  Reduces length of url and is more
correct since the action has side effects.

Modified:
    continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp

Modified: continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp?rev=825222&amp;r1=825221&amp;r2=825222&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp (original)
+++ continuum/trunk/continuum-webapp/src/main/webapp/WEB-INF/jsp/buildDefinitionEdit.jsp Wed
Oct 14 19:05:31 2009
@@ -30,7 +30,7 @@
         &lt;h3&gt;&lt;s:text name="buildDefinition.section.title"/&gt;&lt;/h3&gt;
 
         &lt;div class="axial"&gt;
-          &lt;s:form action="saveBuildDefinition" method="get"&gt;
+          &lt;s:form action="saveBuildDefinition" method="post"&gt;
             &lt;c:choose&gt;
             
               &lt;c:when test="${!empty actionErrors}"&gt;




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r824636 - in /continuum/trunk/continuum-webapp/src: main/java/org/apache/maven/continuum/web/action/AddProjectAction.java test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java</title>
<author><name>jzurbano@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091013083127.D112E23888FF@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091013083127-D112E23888FF@eris-apache-org%3e</id>
<updated>2009-10-13T08:31:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jzurbano
Date: Tue Oct 13 08:31:27 2009
New Revision: 824636

URL: http://svn.apache.org/viewvc?rev=824636&amp;view=rev
Log:
revert changes made in r809964 (CONTINUUM-2347)

Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
    continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java?rev=824636&amp;r1=824635&amp;r2=824636&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Tue Oct 13 08:31:27 2009
@@ -66,7 +66,7 @@
 
     private Collection&lt;ProjectGroup&gt; projectGroups;
 
-    private static int selectedProjectGroup;
+    private int selectedProjectGroup;
 
     private String projectGroupName;
 
@@ -144,11 +144,6 @@
             addActionError( authzE.getMessage() );
             return REQUIRES_AUTHORIZATION;
         }
-        
-        if ( this.getSelectedProjectGroup() == 0 )
-        {
-            return INPUT;
-        }
 
         String projectNameTrim = projectName.trim();
         String versionTrim = projectVersion.trim();
@@ -226,8 +221,6 @@
         }
 
         projectGroups = new ArrayList&lt;ProjectGroup&gt;();
-        
-        selectedProjectGroup = 0;
 
         Collection&lt;ProjectGroup&gt; allProjectGroups = getContinuum().getAllProjectGroups();
 

Modified: continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java?rev=824636&amp;r1=824635&amp;r2=824636&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java
(original)
+++ continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java
Tue Oct 13 08:31:27 2009
@@ -65,30 +65,6 @@
         action.validate();
     }
     
-   /**
-     * Test add of project with no project groups available
-     *
-     * @throws Exception
-     */
-    public void testAddProjectNoProjectGroups()
-        throws Exception
-    {
-        Collection&lt;ProjectGroup&gt; projectGroups = new ArrayList&lt;ProjectGroup&gt;();
-        
-        String scmUrl = "scm:svn:http://project/scm/url/test/build.xml";
-        action.setProjectGroups( projectGroups );
-        
-        List&lt;Project&gt; projects = createProjectList();
-        
-        action.setProjectName( "Ant Test Project" );
-        action.setProjectVersion( "1.0-SNAPSHOT" );
-        action.setProjectScmUrl( scmUrl );
-        action.setProjectType( "ant" );
-        action.setBuildDefintionTemplateId( 1 );
-        
-        assertEquals( action.add(), "input" );
-    }
-    
     /**
      * Test add of Ant project
      *




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r824635 - in /continuum/branches/continuum-1.3.x/continuum-webapp/src: main/java/org/apache/maven/continuum/web/action/AddProjectAction.java test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java</title>
<author><name>jzurbano@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091013083106.EACCF23888D0@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091013083106-EACCF23888D0@eris-apache-org%3e</id>
<updated>2009-10-13T08:31:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: jzurbano
Date: Tue Oct 13 08:31:06 2009
New Revision: 824635

URL: http://svn.apache.org/viewvc?rev=824635&amp;view=rev
Log:
revert changes made in r809963 (CONTINUUM-2347)

Modified:
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java?rev=824635&amp;r1=824634&amp;r2=824635&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
Tue Oct 13 08:31:06 2009
@@ -66,7 +66,7 @@
 
     private Collection&lt;ProjectGroup&gt; projectGroups;
 
-    private static int selectedProjectGroup;
+    private int selectedProjectGroup;
 
     private String projectGroupName;
 
@@ -144,11 +144,6 @@
             addActionError( authzE.getMessage() );
             return REQUIRES_AUTHORIZATION;
         }
-        
-        if ( this.getSelectedProjectGroup() == 0 )
-        {
-            return INPUT;
-        }
 
         String projectNameTrim = projectName.trim();
         String versionTrim = projectVersion.trim();
@@ -226,8 +221,6 @@
         }
 
         projectGroups = new ArrayList&lt;ProjectGroup&gt;();
-        
-        selectedProjectGroup = 0;
 
         Collection&lt;ProjectGroup&gt; allProjectGroups = getContinuum().getAllProjectGroups();
 

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java?rev=824635&amp;r1=824634&amp;r2=824635&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/AddProjectActionTest.java
Tue Oct 13 08:31:06 2009
@@ -66,30 +66,6 @@
     }
     
     /**
-     * Test add of project with no project groups available
-     *
-     * @throws Exception
-     */
-    public void testAddProjectNoProjectGroups()
-        throws Exception
-    {
-        Collection&lt;ProjectGroup&gt; projectGroups = new ArrayList&lt;ProjectGroup&gt;();
-        
-        String scmUrl = "scm:svn:http://project/scm/url/test/build.xml";
-        action.setProjectGroups( projectGroups );
-        
-        List&lt;Project&gt; projects = createProjectList();
-        
-        action.setProjectName( "Ant Test Project" );
-        action.setProjectVersion( "1.0-SNAPSHOT" );
-        action.setProjectScmUrl( scmUrl );
-        action.setProjectType( "ant" );
-        action.setBuildDefintionTemplateId( 1 );
-        
-        assertEquals( action.add(), "input" );
-    }
-    
-    /**
      * Test add of Ant project
      *
      * @throws Exception




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r823366 - /continuum/site/src/site/apt/download.apt</title>
<author><name>brett@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091009002340.5227E23888DA@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091009002340-5227E23888DA@eris-apache-org%3e</id>
<updated>2009-10-09T00:23:40Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: brett
Date: Fri Oct  9 00:23:39 2009
New Revision: 823366

URL: http://svn.apache.org/viewvc?rev=823366&amp;view=rev
Log:
point to a single archive

Modified:
    continuum/site/src/site/apt/download.apt

Modified: continuum/site/src/site/apt/download.apt
URL: http://svn.apache.org/viewvc/continuum/site/src/site/apt/download.apt?rev=823366&amp;r1=823365&amp;r2=823366&amp;view=diff
==============================================================================
--- continuum/site/src/site/apt/download.apt (original)
+++ continuum/site/src/site/apt/download.apt Fri Oct  9 00:23:39 2009
@@ -65,31 +65,5 @@
 
 *Previous Releases
 
-**Continuum 1.2
-
-*-------------------------------+---------+----------+-----------+
-|                               | Download | Checksum | Signature |
-*-------------------------------+---------+----------+-----------+
-| Continuum 1.2 (tar.gz)| {{{http://archive.apache.org/dist/continuum/binaries/apache-continuum-1.2-bin.tar.gz}
apache-continuum-1.2-bin.tar.gz}} | {{{http://archive.apache.org/dist/continuum/apache-continuum-1.2-bin.tar.gz.md5}
apache-continuum-1.2-bin.tar.gz.md5}} | {{{http://archive.apache.org/dist/continuum/binaries/apache-continuum-1.2-bin.tar.gz.asc}
apache-continuum-1.2-bin.tar.gz.asc}} |
-*-------------------------------+---------+----------+-----------+
-| Continuum 1.2 (zip)| {{{http://archive.apache.org/dist/continuum/binaries/apache-continuum-1.2-bin.zip}
apache-continuum-1.2-bin.zip}} | {{{http://archive.apache.org/dist/continuum/binaries/apache-continuum-1.2-bin.zip.md5}
apache-continuum-1.2-bin.zip.md5}} | {{{http://archive.apache.org/dist/continuum/binaries/apache-continuum-1.2-bin.zip.asc}
apache-continuum-1.2-bin.zip.asc}} |
-*-------------------------------+---------+----------+-----------+
-| Continuum 1.2 (war)| {{{http://archive.apache.org/dist/continuum/binaries/apache-continuum-1.2.war}
apache-continuum-1.2.war}} | {{{http://archive.apache.org/dist/continuum/binaries/apache-continuum-1.2.war.md5}
apache-continuum-1.2.war.md5}} | {{{http://archive.apache.org/dist/continuum/binaries/apache-continuum-1.2.war.asc}
apache-continuum-1.2.war.asc}} |
-*-------------------------------+---------+----------+-----------+
-
-**Continuum 1.1
-
-*-------------------------------+---------+----------+-----------+
-|                               | Download | Checksum | Signature |
-*-------------------------------+---------+----------+-----------+
-| Continuum 1.1 (tar.bz2)| {{{http://archive.apache.org/dist/maven/binaries/apache-continuum-1.1.tar.bz2}
apache-continuum-1.1.tar.bz2}} | {{{http://archive.apache.org/dist/maven/binaries/apache-continuum-1.1.tar.bz2.md5}
apache-continuum-1.1.tar.bz2.md5}} | {{{http://archive.apache.org/dist/maven/binaries/apache-continuum-1.1.tar.bz2.asc}
apache-continuum-1.1.tar.bz2.asc}} |
-*-------------------------------+---------+----------+-----------+
-| Continuum 1.1 (tar.gz)| {{{http://archive.apache.org/dist/maven/binaries/apache-continuum-1.1.tar.gz}
apache-continuum-1.1.tar.gz}} | {{{http://archive.apache.org/dist/maven/binaries/apache-continuum-1.1.tar.gz.md5}
apache-continuum-1.1.tar.gz.md5}} | {{{http://archive.apache.org/dist/maven/binaries/apache-continuum-1.1.tar.gz.asc}
apache-continuum-1.1.tar.gz.asc}} |
-*-------------------------------+---------+----------+-----------+
-| Continuum 1.1 (zip)| {{{http://archive.apache.org/dist/maven/binaries/apache-continuum-1.1.zip}
apache-continuum-1.1.zip}} | {{{http://archive.apache.org/dist/maven/binaries/apache-continuum-1.1.zip.md5}
apache-continuum-1.1.zip.md5}} | {{{http://archive.apache.org/dist/maven/binaries/apache-continuum-1.1.zip.asc}
apache-continuum-1.1.zip.asc}} |
-*-------------------------------+---------+----------+-----------+
-| Continuum 1.1 (war)| {{{http://archive.apache.org/dist/maven/binaries/continuum-webapp-1.1.war}
continuum-webapp-1.1.war}} | {{{http://archive.apache.org/dist/maven/binaries/continuum-webapp-1.1.war.md5}
continuum-webapp-1.1.war.md5}} | {{{http://archive.apache.org/dist/maven/binaries/continuum-webapp-1.1.war.asc}
continuum-webapp-1.1.war.asc}} |
-*-------------------------------+---------+----------+-----------+
-
-
-  More releases are available in the {{{http://archive.apache.org/dist/maven/binaries/} Apache
Maven Archives }}.
+  More releases are available in the {{{http://archive.apache.org/dist/continuum/binaries/}
Apache Continuum Archives}}
+  or prior to the graduation from Maven, in the {{{http://archive.apache.org/dist/maven/binaries/}
Apache Maven Archives}}.




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r822972 - in /continuum/trunk/continuum-webapp/src: main/java/org/apache/maven/continuum/web/action/ test/java/org/apache/maven/continuum/web/action/ test/java/org/apache/maven/continuum/web/action/stub/</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091008003702.ED974238889C@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091008003702-ED974238889C@eris-apache-org%3e</id>
<updated>2009-10-08T00:37:02Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Thu Oct  8 00:37:02 2009
New Revision: 822972

URL: http://svn.apache.org/viewvc?rev=822972&amp;view=rev
Log:
[CONTINUUM-2367] view build result from distributed build agent only if the user is trying
to view the current build because it is not yet stored in the master's database
merge -r 822970:822971 from 1.3.x branch

Added:
    continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/BuildResultActionTest.java
    continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/stub/BuildResultActionStub.java
Modified:
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildAction.java
    continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildAction.java?rev=822972&amp;r1=822971&amp;r2=822972&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildAction.java
Thu Oct  8 00:37:02 2009
@@ -22,6 +22,7 @@
 import java.util.Set;
 
 import org.apache.continuum.buildmanager.BuildManagerException;
+import org.apache.continuum.buildmanager.BuildsManager;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.project.ContinuumProjectState;
@@ -41,7 +42,9 @@
     protected boolean canRemoveBuildResult( BuildResult buildResult )
         throws BuildManagerException
     {
-        Map&lt;String, BuildProjectTask&gt; currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
+        BuildsManager buildsManager = getContinuum().getBuildsManager();
+
+        Map&lt;String, BuildProjectTask&gt; currentBuilds = buildsManager.getCurrentBuilds();
         Set&lt;String&gt; keySet = currentBuilds.keySet();
         for ( String key : keySet )
         {

Modified: continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java?rev=822972&amp;r1=822971&amp;r2=822972&amp;view=diff
==============================================================================
--- continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
(original)
+++ continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
Thu Oct  8 00:37:02 2009
@@ -34,6 +34,7 @@
 import org.apache.continuum.web.util.AuditLogConstants;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationException;
+import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.scm.ChangeSet;
@@ -92,9 +93,16 @@
         // check if there are surefire results to display
         project = getContinuum().getProject( getProjectId() );
 
-        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() &amp;&amp;
-            project.getState() == ContinuumProjectState.BUILDING )
+        buildResult = getContinuum().getBuildResult( getBuildId() );
+
+        ConfigurationService configuration = getContinuum().getConfiguration();
+
+        // view build result of the current build from the distributed build agent
+        if ( configuration.isDistributedBuildEnabled() &amp;&amp;
+            project.getState() == ContinuumProjectState.BUILDING &amp;&amp; buildResult ==
null )
         {
+            // if the project is currently building in distributed build agent, the build
result will be stored in the database after the build is finished. 
+            // it's safe to assume that the build result will be null at this point
             Map&lt;String, Object&gt; map = distributedBuildManager.getBuildResult( project.getId()
);
 
             if ( map == null )
@@ -110,8 +118,11 @@
 
                 buildOutput = ContinuumBuildConstant.getBuildOutput( map );
 
-                state =
-                    StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath()
);
+                if ( ServletActionContext.getRequest() != null )
+                {
+                    state =
+                        StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath()
);
+                }
             }
             changeSet = null;
 
@@ -121,19 +132,20 @@
         }
         else
         {
-            buildResult = getContinuum().getBuildResult( getBuildId() );
-
             // directory contains files ?
             File surefireReportsDirectory =
-                getContinuum().getConfiguration().getTestReportsDirectory( buildId, getProjectId()
);
+                configuration.getTestReportsDirectory( buildId, getProjectId() );
             File[] files = surefireReportsDirectory.listFiles();
             hasSurefireResults = files != null &amp;&amp; files.length &gt; 0;
             changeSet = getContinuum().getChangesSinceLastSuccess( getProjectId(), getBuildId()
);
 
             buildOutput = getBuildOutputText();
 
-            state =
-                StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath()
);
+            if ( ServletActionContext.getRequest() != null )
+            {
+                state =
+                    StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath()
);
+            }
 
             this.setCanDelete( this.canRemoveBuildResult( buildResult ) );
         }
@@ -204,7 +216,8 @@
     private String getBuildOutputText()
         throws ConfigurationException, IOException
     {
-        File buildOutputFile = getContinuum().getConfiguration().getBuildOutputFile( getBuildId(),
getProjectId() );
+        ConfigurationService configuration = getContinuum().getConfiguration();
+        File buildOutputFile = configuration.getBuildOutputFile( getBuildId(), getProjectId()
);
 
         if ( buildOutputFile.exists() )
         {
@@ -274,4 +287,10 @@
     {
         return projectGroupId;
     }
+
+    // for testing
+    public void setDistributedBuildManager( DistributedBuildManager distributedBuildManager
)
+    {
+        this.distributedBuildManager = distributedBuildManager;
+    }
 }

Added: continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/BuildResultActionTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/BuildResultActionTest.java?rev=822972&amp;view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/BuildResultActionTest.java
(added)
+++ continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/BuildResultActionTest.java
Thu Oct  8 00:37:02 2009
@@ -0,0 +1,96 @@
+package org.apache.maven.continuum.web.action;
+
+import java.io.File;
+import java.util.HashMap;
+
+import org.apache.continuum.builder.distributed.manager.DistributedBuildManager;
+import org.apache.continuum.buildmanager.BuildsManager;
+import org.apache.continuum.taskqueue.BuildProjectTask;
+import org.apache.maven.continuum.Continuum;
+import org.apache.maven.continuum.configuration.ConfigurationService;
+import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.web.action.stub.BuildResultActionStub;
+import org.apache.maven.continuum.xmlrpc.project.ContinuumProjectState;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+public class BuildResultActionTest
+    extends MockObjectTestCase
+{
+    private BuildResultActionStub action;
+
+    private Mock continuum;
+
+    private Mock configurationService;
+
+    private Mock distributedBuildManager;
+
+    private Mock buildsManager;
+
+    protected void setUp()
+    {
+        action = new BuildResultActionStub();
+        continuum = mock( Continuum.class );
+        configurationService = mock( ConfigurationService.class );
+        distributedBuildManager = mock( DistributedBuildManager.class );
+        buildsManager = mock( BuildsManager.class );
+
+        action.setContinuum( (Continuum) continuum.proxy() );
+        action.setDistributedBuildManager( (DistributedBuildManager) distributedBuildManager.proxy()
);
+    }
+
+    public void testViewPreviousBuild()
+        throws Exception
+    {
+        Project project = createProject( "stub-project" );
+        BuildResult buildResult = createBuildResult( project );
+
+        continuum.expects( once() ).method( "getProject" ).will( returnValue( project ) );
+        continuum.expects( once() ).method( "getBuildResult" ).will( returnValue( buildResult
) );
+        continuum.expects( atLeastOnce() ).method( "getConfiguration" ).will( returnValue(
(ConfigurationService) configurationService.proxy()  ) );
+        configurationService.expects( once() ).method( "isDistributedBuildEnabled" ).will(
returnValue( false ) );
+        configurationService.expects( once() ).method( "getTestReportsDirectory" ).will(
returnValue( new File( "testReportsDir" ) ) );
+        continuum.expects( once() ).method( "getChangesSinceLastSuccess" ).will( returnValue(
null ) );
+        configurationService.expects( once() ).method( "getBuildOutputFile" ).will( returnValue(
new File( "buildOutputFile" ) ) );
+        continuum.expects( once() ).method( "getBuildsManager" ).will( returnValue( buildsManager.proxy()
) );
+        buildsManager.expects( once() ).method( "getCurrentBuilds" ).will( returnValue( new
HashMap&lt;String, BuildProjectTask&gt;() ) );
+
+        action.execute();
+    }
+
+    public void testViewCurrentBuildInDistributedBuildAgent()
+        throws Exception
+    {
+        Project project = createProject( "stub-project" );
+
+        continuum.expects( once() ).method( "getProject" ).will( returnValue( project ) );
+        continuum.expects( once() ).method( "getBuildResult" ).will( returnValue( null )
);
+        continuum.expects( once() ).method( "getConfiguration" ).will( returnValue( (ConfigurationService)
configurationService.proxy()  ) );
+        configurationService.expects( once() ).method( "isDistributedBuildEnabled" ).will(
returnValue( true ) );
+        distributedBuildManager.expects( once() ).method( "getBuildResult" ).will( returnValue(
new HashMap&lt;String, Object&gt;() ) );
+
+        action.execute();
+    }
+
+    private Project createProject( String name )
+    {
+        Project project = new Project();
+        project.setId( 1 );
+        project.setName( name );
+        project.setArtifactId( "foo:bar" );
+        project.setVersion( "1.0" );
+        project.setState( ContinuumProjectState.BUILDING );
+
+        return project;
+    }
+
+    private BuildResult createBuildResult( Project project )
+    {
+        BuildResult buildResult = new BuildResult();
+        buildResult.setId( 1 );
+        buildResult.setProject( project );
+
+        return buildResult;
+    }
+}

Added: continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/stub/BuildResultActionStub.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/stub/BuildResultActionStub.java?rev=822972&amp;view=auto
==============================================================================
--- continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/stub/BuildResultActionStub.java
(added)
+++ continuum/trunk/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/stub/BuildResultActionStub.java
Thu Oct  8 00:37:02 2009
@@ -0,0 +1,17 @@
+package org.apache.maven.continuum.web.action.stub;
+
+import org.apache.maven.continuum.web.action.BuildResultAction;
+
+public class BuildResultActionStub
+    extends BuildResultAction
+{
+    public String getProjectGroupName()
+    {
+        return "test-group";
+    }
+    
+    protected void checkViewProjectGroupAuthorization( String resource )
+    {
+        // skip authorization check
+    }
+}




</pre>
</div>
</content>
</entry>
<entry>
<title>svn commit: r822971 - in /continuum/branches/continuum-1.3.x/continuum-webapp/src: main/java/org/apache/maven/continuum/web/action/ test/java/org/apache/maven/continuum/web/action/ test/java/org/apache/maven/continuum/web/action/stub/</title>
<author><name>ctan@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/continuum-commits/200910.mbox/%3c20091008003421.C4D50238889D@eris.apache.org%3e"/>
<id>urn:uuid:%3c20091008003421-C4D50238889D@eris-apache-org%3e</id>
<updated>2009-10-08T00:34:21Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Author: ctan
Date: Thu Oct  8 00:34:21 2009
New Revision: 822971

URL: http://svn.apache.org/viewvc?rev=822971&amp;view=rev
Log:
[CONTINUUM-2367] view build result from distributed build agent only if the user is trying
to view the current build because it is not yet stored in the master's database

Added:
    continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/BuildResultActionTest.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/stub/BuildResultActionStub.java
Modified:
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildAction.java
    continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildAction.java?rev=822971&amp;r1=822970&amp;r2=822971&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AbstractBuildAction.java
Thu Oct  8 00:34:21 2009
@@ -22,6 +22,7 @@
 import java.util.Set;
 
 import org.apache.continuum.buildmanager.BuildManagerException;
+import org.apache.continuum.buildmanager.BuildsManager;
 import org.apache.continuum.taskqueue.BuildProjectTask;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.project.ContinuumProjectState;
@@ -41,7 +42,9 @@
     protected boolean canRemoveBuildResult( BuildResult buildResult )
         throws BuildManagerException
     {
-        Map&lt;String, BuildProjectTask&gt; currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
+        BuildsManager buildsManager = getContinuum().getBuildsManager();
+
+        Map&lt;String, BuildProjectTask&gt; currentBuilds = buildsManager.getCurrentBuilds();
         Set&lt;String&gt; keySet = currentBuilds.keySet();
         for ( String key : keySet )
         {

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java?rev=822971&amp;r1=822970&amp;r2=822971&amp;view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
Thu Oct  8 00:34:21 2009
@@ -34,6 +34,7 @@
 import org.apache.continuum.web.util.AuditLogConstants;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationException;
+import org.apache.maven.continuum.configuration.ConfigurationService;
 import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.scm.ChangeSet;
@@ -92,9 +93,16 @@
         // check if there are surefire results to display
         project = getContinuum().getProject( getProjectId() );
 
-        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() &amp;&amp;
-            project.getState() == ContinuumProjectState.BUILDING )
+        buildResult = getContinuum().getBuildResult( getBuildId() );
+
+        ConfigurationService configuration = getContinuum().getConfiguration();
+
+        // view build result of the current build from the distributed build agent
+        if ( configuration.isDistributedBuildEnabled() &amp;&amp;
+            project.getState() == ContinuumProjectState.BUILDING &amp;&amp; buildResult ==
null )
         {
+            // if the project is currently building in distributed build agent, the build
result will be stored in the database after the build is finished. 
+            // it's safe to assume that the build result will be null at this point
             Map&lt;String, Object&gt; map = distributedBuildManager.getBuildResult( project.getId()
);
 
             if ( map == null )
@@ -110,8 +118,11 @@
 
                 buildOutput = ContinuumBuildConstant.getBuildOutput( map );
 
-                state =
-                    StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath()
);
+                if ( ServletActionContext.getRequest() != null )
+                {
+                    state =
+                        StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath()
);
+                }
             }
             changeSet = null;
 
@@ -121,19 +132,20 @@
         }
         else
         {
-            buildResult = getContinuum().getBuildResult( getBuildId() );
-
             // directory contains files ?
             File surefireReportsDirectory =
-                getContinuum().getConfiguration().getTestReportsDirectory( buildId, getProjectId()
);
+                configuration.getTestReportsDirectory( buildId, getProjectId() );
             File[] files = surefireReportsDirectory.listFiles();
             hasSurefireResults = files != null &amp;&amp; files.length &gt; 0;
             changeSet = getContinuum().getChangesSinceLastSuccess( getProjectId(), getBuildId()
);
 
             buildOutput = getBuildOutputText();
 
-            state =
-                StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath()
);
+            if ( ServletActionContext.getRequest() != null )
+            {
+                state =
+                    StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath()
);
+            }
 
             this.setCanDelete( this.canRemoveBuildResult( buildResult ) );
         }
@@ -204,7 +216,8 @@
     private String getBuildOutputText()
         throws ConfigurationException, IOException
     {
-        File buildOutputFile = getContinuum().getConfiguration().getBuildOutputFile( getBuildId(),
getProjectId() );
+        ConfigurationService configuration = getContinuum().getConfiguration();
+        File buildOutputFile = configuration.getBuildOutputFile( getBuildId(), getProjectId()
);
 
         if ( buildOutputFile.exists() )
         {
@@ -274,4 +287,10 @@
     {
         return projectGroupId;
     }
+
+    // for testing
+    public void setDistributedBuildManager( DistributedBuildManager distributedBuildManager
)
+    {
+        this.distributedBuildManager = distributedBuildManager;
+    }
 }

Added: continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/BuildResultActionTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/BuildResultActionTest.java?rev=822971&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/BuildResultActionTest.java
(added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/BuildResultActionTest.java
Thu Oct  8 00:34:21 2009
@@ -0,0 +1,96 @@
+package org.apache.maven.continuum.web.action;
+
+import java.io.File;
+import java.util.HashMap;
+
+import org.apache.continuum.builder.distributed.manager.DistributedBuildManager;
+import org.apache.continuum.buildmanager.BuildsManager;
+import org.apache.continuum.taskqueue.BuildProjectTask;
+import org.apache.maven.continuum.Continuum;
+import org.apache.maven.continuum.configuration.ConfigurationService;
+import org.apache.maven.continuum.model.project.BuildResult;
+import org.apache.maven.continuum.model.project.Project;
+import org.apache.maven.continuum.web.action.stub.BuildResultActionStub;
+import org.apache.maven.continuum.xmlrpc.project.ContinuumProjectState;
+import org.jmock.Mock;
+import org.jmock.MockObjectTestCase;
+
+public class BuildResultActionTest
+    extends MockObjectTestCase
+{
+    private BuildResultActionStub action;
+
+    private Mock continuum;
+
+    private Mock configurationService;
+
+    private Mock distributedBuildManager;
+
+    private Mock buildsManager;
+
+    protected void setUp()
+    {
+        action = new BuildResultActionStub();
+        continuum = mock( Continuum.class );
+        configurationService = mock( ConfigurationService.class );
+        distributedBuildManager = mock( DistributedBuildManager.class );
+        buildsManager = mock( BuildsManager.class );
+
+        action.setContinuum( (Continuum) continuum.proxy() );
+        action.setDistributedBuildManager( (DistributedBuildManager) distributedBuildManager.proxy()
);
+    }
+
+    public void testViewPreviousBuild()
+        throws Exception
+    {
+        Project project = createProject( "stub-project" );
+        BuildResult buildResult = createBuildResult( project );
+
+        continuum.expects( once() ).method( "getProject" ).will( returnValue( project ) );
+        continuum.expects( once() ).method( "getBuildResult" ).will( returnValue( buildResult
) );
+        continuum.expects( atLeastOnce() ).method( "getConfiguration" ).will( returnValue(
(ConfigurationService) configurationService.proxy()  ) );
+        configurationService.expects( once() ).method( "isDistributedBuildEnabled" ).will(
returnValue( false ) );
+        configurationService.expects( once() ).method( "getTestReportsDirectory" ).will(
returnValue( new File( "testReportsDir" ) ) );
+        continuum.expects( once() ).method( "getChangesSinceLastSuccess" ).will( returnValue(
null ) );
+        configurationService.expects( once() ).method( "getBuildOutputFile" ).will( returnValue(
new File( "buildOutputFile" ) ) );
+        continuum.expects( once() ).method( "getBuildsManager" ).will( returnValue( buildsManager.proxy()
) );
+        buildsManager.expects( once() ).method( "getCurrentBuilds" ).will( returnValue( new
HashMap&lt;String, BuildProjectTask&gt;() ) );
+
+        action.execute();
+    }
+
+    public void testViewCurrentBuildInDistributedBuildAgent()
+        throws Exception
+    {
+        Project project = createProject( "stub-project" );
+
+        continuum.expects( once() ).method( "getProject" ).will( returnValue( project ) );
+        continuum.expects( once() ).method( "getBuildResult" ).will( returnValue( null )
);
+        continuum.expects( once() ).method( "getConfiguration" ).will( returnValue( (ConfigurationService)
configurationService.proxy()  ) );
+        configurationService.expects( once() ).method( "isDistributedBuildEnabled" ).will(
returnValue( true ) );
+        distributedBuildManager.expects( once() ).method( "getBuildResult" ).will( returnValue(
new HashMap&lt;String, Object&gt;() ) );
+
+        action.execute();
+    }
+
+    private Project createProject( String name )
+    {
+        Project project = new Project();
+        project.setId( 1 );
+        project.setName( name );
+        project.setArtifactId( "foo:bar" );
+        project.setVersion( "1.0" );
+        project.setState( ContinuumProjectState.BUILDING );
+
+        return project;
+    }
+
+    private BuildResult createBuildResult( Project project )
+    {
+        BuildResult buildResult = new BuildResult();
+        buildResult.setId( 1 );
+        buildResult.setProject( project );
+
+        return buildResult;
+    }
+}

Added: continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/stub/BuildResultActionStub.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/stub/BuildResultActionStub.java?rev=822971&amp;view=auto
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/stub/BuildResultActionStub.java
(added)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/test/java/org/apache/maven/continuum/web/action/stub/BuildResultActionStub.java
Thu Oct  8 00:34:21 2009
@@ -0,0 +1,17 @@
+package org.apache.maven.continuum.web.action.stub;
+
+import org.apache.maven.continuum.web.action.BuildResultAction;
+
+public class BuildResultActionStub
+    extends BuildResultAction
+{
+    public String getProjectGroupName()
+    {
+        return "test-group";
+    }
+    
+    protected void checkViewProjectGroupAuthorization( String resource )
+    {
+        // skip authorization check
+    }
+}




</pre>
</div>
</content>
</entry>
</feed>
