continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1367527 - in /continuum/trunk/continuum-webapp-test/src: appserver-base/conf/ test/resources/ test/testng/org/apache/continuum/web/test/ test/testng/org/apache/continuum/web/test/parent/
Date Tue, 31 Jul 2012 13:03:01 GMT
Author: brett
Date: Tue Jul 31 13:03:00 2012
New Revision: 1367527

URL: http://svn.apache.org/viewvc?rev=1367527&view=rev
Log:
fix build agents tests

Modified:
    continuum/trunk/continuum-webapp-test/src/appserver-base/conf/continuum-buildagent.xml
    continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java

Modified: continuum/trunk/continuum-webapp-test/src/appserver-base/conf/continuum-buildagent.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/appserver-base/conf/continuum-buildagent.xml?rev=1367527&r1=1367526&r2=1367527&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/appserver-base/conf/continuum-buildagent.xml
(original)
+++ continuum/trunk/continuum-webapp-test/src/appserver-base/conf/continuum-buildagent.xml
Tue Jul 31 13:03:00 2012
@@ -22,4 +22,5 @@ under the License.
   <continuumServerUrl>http://localhost:9595/continuum/master-xmlrpc</continuumServerUrl>
   <buildOutputDirectory>target/data/build-agent/build-output-directory</buildOutputDirectory>
   <workingDirectory>target/data/build-agent/working-directory</workingDirectory>
+  <sharedSecretPassword>continuum1234</sharedSecretPassword>
 </continuum-buildagent-configuration>

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=1367527&r1=1367526&r2=1367527&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Tue Jul 31
13:03:00 2012
@@ -317,10 +317,7 @@ PROJECTUSER_DEFAULTPROJECTGROUP_FULLNAME
 ########################
 # buildAgents group 
 ########################
-BUILD_AGENT_NAME2=http://localhost:9595/continuum-buildagent/xmlrpc
 BUILD_AGENT_DESCRIPTION2=Agent_description2
-BUILD_AGENT_NAME=http://localhost:9090
 BUILD_AGENT_DESCRIPTION=Agent_description
-BUILD_AGENT_NAME3=http://localhost:9191/xmlrpc
 BUILD_AGENT_DESCRIPTION3=Agent_description3
 BUILD_AGENT_GROUPNAME=agent_groupname

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java?rev=1367527&r1=1367526&r2=1367527&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/BuildAgentsTest.java
Tue Jul 31 13:03:00 2012
@@ -20,7 +20,9 @@ package org.apache.continuum.web.test;
  */
 
 //import org.apache.continuum.web.test.parent.AbstractBuildQueueTest;
+import org.testng.annotations.AfterMethod;
 import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
 import org.testng.annotations.Test;
 import org.apache.continuum.web.test.parent.AbstractBuildAgentsTest;
 import org.testng.Assert;
@@ -29,48 +31,35 @@ import org.testng.Assert;
 public class BuildAgentsTest
     extends AbstractBuildAgentsTest
 {
+    @BeforeMethod
+    public void setUp()
+    {
+        enableDistributedBuilds();
+    }
+
+    @AfterMethod
+    public void tearDown()
+    {
+        disableDistributedBuilds();
+    }
+
     public void testAddBuildAgent()
     {
-        String BUILD_AGENT_NAME = getProperty( "BUILD_AGENT_NAME" );
+        String BUILD_AGENT_NAME = getBuildAgentUrl();
         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" );
-
-        try
-        {
-            enableDistributedBuilds();
-            goToAddBuildAgent();
-            addBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION, true, true, false );
-            goToAddBuildAgent();
-            addBuildAgent( BUILD_AGENT_NAME2, BUILD_AGENT_DESCRIPTION2, true, true, true
);
-            goToAddBuildAgent();
-            addBuildAgent( BUILD_AGENT_NAME3, BUILD_AGENT_DESCRIPTION3, true, false, false
);
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+
+        goToAddBuildAgent();
+        addBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION, true, true, true );
     }
 
     public void testAddBuildAgentWithXSS()
     {
-        try
-        {
-            String invalidUrl = "http://sampleagent/<script>alert('gotcha')</script>";
-            String invalidDescription = "blah blah <script>alert('gotcha')</script>
blah blah";
-            enableDistributedBuilds();
-            goToAddBuildAgent();
-            addBuildAgent( invalidUrl, invalidDescription, false, true, false );
-
-            assertTextPresent( "Build agent url is invalid." );
-            assertTextPresent( "Build agent description contains invalid characters." );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        String invalidUrl = "http://sampleagent/<script>alert('gotcha')</script>";
+        String invalidDescription = "blah blah <script>alert('gotcha')</script>
blah blah";
+        goToAddBuildAgent();
+        addBuildAgent( invalidUrl, invalidDescription, false, true, false );
+
+        assertTextPresent( "Build agent url is invalid." );
     }
 
     public void testViewBuildAgentInstallationXSS()
@@ -89,59 +78,37 @@ public class BuildAgentsTest
     @Test( dependsOnMethods = { "testEditBuildAgent" } )
     public void testAddAnExistingBuildAgent()
     {
-        String BUILD_AGENT_NAME = getProperty( "BUILD_AGENT_NAME" );
+        String BUILD_AGENT_NAME = getBuildAgentUrl();
         String BUILD_AGENT_DESCRIPTION = getProperty( "BUILD_AGENT_DESCRIPTION" );
 
-        try
-        {
-            enableDistributedBuilds();
-            goToAddBuildAgent();
-            addBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION, false, false, false
) ;
-            assertTextPresent( "Build agent already exists" );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        goToAddBuildAgent();
+        addBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION, false, false, true ) ;
+        assertTextPresent( "Build agent already exists" );
     }
 
     @Test( dependsOnMethods = { "testAddBuildAgent" } )
     public void testEditBuildAgent()
     {
-        String BUILD_AGENT_NAME = getProperty( "BUILD_AGENT_NAME" );
+        String BUILD_AGENT_NAME = getBuildAgentUrl();
         String BUILD_AGENT_DESCRIPTION = getProperty( "BUILD_AGENT_DESCRIPTION" );
         String new_agentDescription = "new_agentDescription";
 
-        try
-        {
-            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 );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        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 );
     }
 
     @Test( dependsOnMethods = { "testAddAnExistingBuildAgent" } )
     public void testDeleteBuildAgent()
         throws Exception
     {
-        try
-        {
-            enableDistributedBuilds();
-            goToBuildAgentPage();
-            String BUILD_AGENT_NAME = getProperty( "BUILD_AGENT_NAME" );
-            removeBuildAgent( BUILD_AGENT_NAME );
-            assertTextNotPresent( BUILD_AGENT_NAME );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        goToBuildAgentPage();
+        String BUILD_AGENT_NAME = getBuildAgentUrl();
+        removeBuildAgent( BUILD_AGENT_NAME );
+        assertTextNotPresent( BUILD_AGENT_NAME );
+
+        testAddBuildAgent();
     }
 
 	@Test( dependsOnMethods = { "testDeleteBuildAgent" } )
@@ -149,78 +116,52 @@ public class BuildAgentsTest
     {
     	String BUILD_AGENT_DESCRIPTION = getProperty( "BUILD_AGENT_DESCRIPTION" );
 
-    	try
-    	{
-    	    enableDistributedBuilds();
-    	    goToAddBuildAgent();
-    	    addBuildAgent( "", BUILD_AGENT_DESCRIPTION, false, false, false ) ;
-    	    assertTextPresent( "Build agent url is required." );
-    	}
-    	finally
-    	{
-    	    disableDistributedBuilds();
-    	}
+        goToAddBuildAgent();
+        addBuildAgent( "", BUILD_AGENT_DESCRIPTION, false, false, false ) ;
+        assertTextPresent( "Build agent url is required." );
     }
 
     @Test( dependsOnMethods = { "testDeleteBuildAgent" }, enabled=false )
     public void testBuildSuccessWithDistributedBuildsAfterDisableEnableOfBuildAgent()
         throws Exception
     {
-        String BUILD_AGENT_NAME = getProperty( "BUILD_AGENT_NAME2" );
-        String BUILD_AGENT_DESCRIPTION = getProperty( "BUILD_AGENT_DESCRIPTION2" );
+        String BUILD_AGENT_NAME = getBuildAgentUrl();
+        String BUILD_AGENT_DESCRIPTION = getProperty( "BUILD_AGENT_DESCRIPTION" );
         String M2_PROJ_GRP_NAME = getProperty( "M2_DELETE_PROJ_GRP_NAME" );
         String M2_PROJ_GRP_ID = getProperty( "M2_DELETE_PROJ_GRP_ID" );
         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" );
 
-        try
-        {
-            enableDistributedBuilds();
-
-            addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true
);
-            goToProjectGroupsSummaryPage();
-            assertLinkPresent( M2_PROJ_GRP_NAME );
-            
-            clickLinkWithText( M2_PROJ_GRP_NAME );
-
-            assertPage( "Continuum - Project Group" );
-
-            // disable then enable build agent
-            goToEditBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION );
-            enableDisableBuildAgent( BUILD_AGENT_NAME, false );
-            goToEditBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION );
-            enableDisableBuildAgent( BUILD_AGENT_NAME, true );
-
-            buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, "", M2_PROJ_GRP_NAME, true
);
-
-            removeProjectGroup( M2_PROJ_GRP_NAME );
-            assertLinkNotPresent( M2_PROJ_GRP_NAME );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        addMavenTwoProject( M2_POM_URL, M2_POM_USERNAME, M2_POM_PASSWORD, null, true );
+        goToProjectGroupsSummaryPage();
+        assertLinkPresent( M2_PROJ_GRP_NAME );
+
+        clickLinkWithText( M2_PROJ_GRP_NAME );
+
+        assertPage( "Continuum - Project Group" );
+
+        // disable then enable build agent
+        goToEditBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION );
+        enableDisableBuildAgent( BUILD_AGENT_NAME, false );
+        goToEditBuildAgent( BUILD_AGENT_NAME, BUILD_AGENT_DESCRIPTION );
+        enableDisableBuildAgent( BUILD_AGENT_NAME, true );
+
+        buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, "", M2_PROJ_GRP_NAME, true );
+
+        removeProjectGroup( M2_PROJ_GRP_NAME );
+        assertLinkNotPresent( M2_PROJ_GRP_NAME );
     }
 
-//TESTS FOR BUILD AGENT GROUPS
+    //TESTS FOR BUILD AGENT GROUPS
 
     @Test( dependsOnMethods = { "testAddBuildAgent" } )
     public void testAddBuildAgentGroupXSS()
         throws Exception
     {
-        try
-        {
-            enableDistributedBuilds();
-            goToAddBuildAgentGroup();
-            addEditBuildAgentGroup( "%3Cscript%3Ealert%28%27xss%27%29%3C/script%3E", new
String[]{}, new String[] {}, false );
-            assertTextPresent( "Build agent group name contains invalid characters" );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        goToAddBuildAgentGroup();
+        addEditBuildAgentGroup( "%3Cscript%3Ealert%28%27xss%27%29%3C/script%3E", new String[]{},
new String[] {}, false );
+        assertTextPresent( "Build agent group name contains invalid characters" );
     }
 
     public void testEditBuildAgentGroupXSS()
@@ -233,83 +174,48 @@ public class BuildAgentsTest
     public void testAddBuildAgentGroup()
         throws Exception
     {
-        String BUILD_AGENT_NAME2 = getProperty( "BUILD_AGENT_NAME2" );
-        String BUILD_AGENT_NAME3 = getProperty( "BUILD_AGENT_NAME3" );
+        String BUILD_AGENT_NAME = getBuildAgentUrl();
         String BUILD_AGENT_GROUPNAME = getProperty( "BUILD_AGENT_GROUPNAME" );
 
-        try
-        {
-            enableDistributedBuilds();
-            goToAddBuildAgentGroup();
-            addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { BUILD_AGENT_NAME2,
BUILD_AGENT_NAME3 }, new String[] {}, true );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        goToAddBuildAgentGroup();
+        addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { BUILD_AGENT_NAME },
new String[] {}, true );
     }
 
     @Test( dependsOnMethods = { "testAddBuildAgentGroup" } )
     public void testEditBuildAgentGroup()
         throws Exception
     {
-        String BUILD_AGENT_NAME2 = getProperty( "BUILD_AGENT_NAME2" );
-        String BUILD_AGENT_NAME3 = getProperty( "BUILD_AGENT_NAME3" );
+        String BUILD_AGENT_NAME = getBuildAgentUrl();
         String BUILD_AGENT_GROUPNAME = getProperty( "BUILD_AGENT_GROUPNAME" );
 
         String newName = "new_agentgroupname";
-        try
-        {
-            enableDistributedBuilds();
-            goToEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { BUILD_AGENT_NAME2,
BUILD_AGENT_NAME3 } );
-            addEditBuildAgentGroup( newName, new String[] {},
-                             new String[] { BUILD_AGENT_NAME3 }, true );
-            goToEditBuildAgentGroup( newName, new String[] { BUILD_AGENT_NAME2 } );
-            addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { BUILD_AGENT_NAME3
},
-                             new String[] {}, true );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        goToEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { BUILD_AGENT_NAME }
);
+        addEditBuildAgentGroup( newName, new String[] {},
+                         new String[] { BUILD_AGENT_NAME }, true );
+        goToEditBuildAgentGroup( newName, new String[] {  } );
+        addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { BUILD_AGENT_NAME },
+                         new String[] {}, true );
     }
 
     @Test( dependsOnMethods = { "testEditBuildAgentGroup" } )
     public void testAddAnExistingBuildAgentGroup()
         throws Exception
     {
-        String BUILD_AGENT_NAME2 = getProperty( "BUILD_AGENT_NAME2" );
-        String BUILD_AGENT_NAME3 = getProperty( "BUILD_AGENT_NAME3" );
+        String BUILD_AGENT_NAME = getBuildAgentUrl();
         String BUILD_AGENT_GROUPNAME = getProperty( "BUILD_AGENT_GROUPNAME" );
 
-        try
-        {
-            enableDistributedBuilds();
-            goToAddBuildAgentGroup();
-           	addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { BUILD_AGENT_NAME2,
BUILD_AGENT_NAME3 }, new String[] {}, false );
-           	assertTextPresent( "Build agent group already exists." );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        goToAddBuildAgentGroup();
+        addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] { BUILD_AGENT_NAME },
new String[] {}, false );
+        assertTextPresent( "Build agent group already exists." );
     }
 
     @Test( dependsOnMethods = { "testAddAnExistingBuildAgentGroup" } )
     public void testAddEmptyBuildAgentGroupName()
         throws Exception
     {
-        try
-        {
-            enableDistributedBuilds();
-            goToAddBuildAgentGroup();
-            addEditBuildAgentGroup( "", new String[] {}, new String[] {}, false );
-            assertTextPresent( "Build agent group name is required." );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        goToAddBuildAgentGroup();
+        addEditBuildAgentGroup( "", new String[] {}, new String[] {}, false );
+        assertTextPresent( "Build agent group name is required." );
     }
 
     @Test( dependsOnMethods = { "testAddEmptyBuildAgentGroupName" } )
@@ -317,15 +223,7 @@ public class BuildAgentsTest
     {
         String BUILD_AGENT_GROUPNAME = getProperty( "BUILD_AGENT_GROUPNAME" );
 
-        try
-        {
-            enableDistributedBuilds();
-            removeBuildAgentGroup( BUILD_AGENT_GROUPNAME );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        removeBuildAgentGroup( BUILD_AGENT_GROUPNAME );
     }
 
     @Test( dependsOnMethods = { "testDeleteBuildAgentGroup" } )
@@ -334,15 +232,7 @@ public class BuildAgentsTest
     {
         String BUILD_AGENT_GROUPNAME = getProperty( "BUILD_AGENT_GROUPNAME" );
 
-        try
-        {
-            enableDistributedBuilds();
-            goToAddBuildAgentGroup();
-            addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] {}, new String[]
{}, true );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
+        goToAddBuildAgentGroup();
+        addEditBuildAgentGroup( BUILD_AGENT_GROUPNAME, new String[] {}, new String[] {},
true );
     }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java?rev=1367527&r1=1367526&r2=1367527&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ReleaseTest.java
Tue Jul 31 13:03:00 2012
@@ -298,7 +298,7 @@ public class ReleaseTest
         throws Exception
     {
         String M2_PROJECT_AGENT_GROUP = getProperty( "M2_RELEASE_AGENT_GROUP" );
-        String buildAgent = getProperty( "BUILD_AGENT_NAME2" );
+        String buildAgent = getBuildAgentUrl();
         
         clickLinkWithText( "Build Agents" );
         String xPath = "//preceding::td[text()='" + M2_PROJECT_AGENT_GROUP + "']//following::img[@alt='Edit']";
@@ -316,7 +316,7 @@ public class ReleaseTest
         throws Exception
     {
         String M2_PROJECT_AGENT_GROUP = getProperty( "M2_RELEASE_AGENT_GROUP" );
-        String buildAgent = getProperty( "BUILD_AGENT_NAME2" );
+        String buildAgent = getBuildAgentUrl();
         
         clickLinkWithText( "Build Agents" );
         String xPath = "//preceding::td[text()='" + M2_PROJECT_AGENT_GROUP + "']//following::img[@alt='Edit']";

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java?rev=1367527&r1=1367526&r2=1367527&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractAdminTest.java
Tue Jul 31 13:03:00 2012
@@ -37,4 +37,9 @@ public abstract class AbstractAdminTest
             login( username, password );
         }
     }
+
+    protected String getBuildAgentUrl()
+    {
+        return baseUrl.replace( "/continuum", "/continuum-buildagent/xmlrpc" );
+    }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java?rev=1367527&r1=1367526&r2=1367527&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractBuildAgentsTest.java
Tue Jul 31 13:03:00 2012
@@ -80,17 +80,18 @@ public abstract class AbstractBuildAgent
 
         if ( success )
         {
-            assertBuildAgentPage();
-            assertElementPresent( "link=" + agentURL );
-            clickLinkWithText( agentURL );
-
             if ( pingOk )
             {
+                assertBuildAgentPage();
+                assertElementPresent( "link=" + agentURL );
+                clickLinkWithText( agentURL );
+
                 assertTextPresent( "true" );
             }
             else
             {
-                assertTextPresent( "false" );
+                assertTextPresent( "Unable to ping" );
+                assertAddEditBuildAgentPage( true );
             }
         }
         else
@@ -136,13 +137,10 @@ public abstract class AbstractBuildAgent
 
     public void goToAddBuildAgentGroup()
     {
-        String BUILD_AGENT_NAME2 = getProperty( "BUILD_AGENT_NAME2" );
-        String BUILD_AGENT_NAME3 = getProperty( "BUILD_AGENT_NAME3" );
-
         goToBuildAgentPage();
         clickAndWait("editBuildAgentGroup_0"); //add button
         String[] options =
-            new String[] { "--- Available Build Agents ---", BUILD_AGENT_NAME2, BUILD_AGENT_NAME3
};
+            new String[] { "--- Available Build Agents ---" };
         assertAddEditBuildAgentGroupPage( options, null );
     }
 

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=1367527&r1=1367526&r2=1367527&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
Tue Jul 31 13:03:00 2012
@@ -1051,6 +1051,7 @@ public abstract class AbstractContinuumT
         {
             checkField( "configuration_distributedBuildEnabled" );
         }
+        setFieldValue( "configuration_sharedSecretPassword", "continuum1234" );
         clickAndWait( "configuration_" );
         assertTextPresent( "true" );
         assertTextPresent( "Distributed Builds" );

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java?rev=1367527&r1=1367526&r2=1367527&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractReleaseTest.java
Tue Jul 31 13:03:00 2012
@@ -173,7 +173,7 @@ public abstract class AbstractReleaseTes
         FileInputStream fis = new FileInputStream( file );
         BufferedReader reader = new BufferedReader( new InputStreamReader( fis ) );
 
-        String BUILD_AGENT_URL = getProperty( "BUILD_AGENT_NAME2" );
+        String BUILD_AGENT_URL = getBuildAgentUrl();
         String strLine;
         StringBuffer str = new StringBuffer();
         while( ( strLine = reader.readLine() ) != null )



Mime
View raw message