continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From br...@apache.org
Subject svn commit: r1367865 - in /continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test: AntProjectTest.java DistributedBuildTest.java ShellProjectTest.java parent/AbstractContinuumTest.java
Date Wed, 01 Aug 2012 06:18:27 GMT
Author: brett
Date: Wed Aug  1 06:18:26 2012
New Revision: 1367865

URL: http://svn.apache.org/viewvc?rev=1367865&view=rev
Log:
some shell / ant fixes and move shell distributed builds under the same test

Modified:
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedBuildTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java?rev=1367865&r1=1367864&r2=1367865&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
Wed Aug  1 06:18:26 2012
@@ -67,7 +67,6 @@ public class AntProjectTest
         addProject( ANT_NAME, ANT_DESCRIPTION, ANT_VERSION, ANT_SCM_URL, ANT_SCM_USERNAME,
                     ANT_SCM_PASSWORD, ANT_TAG, false, DEFAULT_PROJ_GRP_NAME, null, false,
"ant" );
         assertTextPresent( "Name contains invalid characters." );
-        assertTextPresent( "Description contains invalid characters." );
         assertTextPresent( "Version contains invalid characters." );
         assertTextPresent( "SCM Url contains invalid characters." );
         assertTextPresent( "SCM Tag contains invalid characters." );

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedBuildTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedBuildTest.java?rev=1367865&r1=1367864&r2=1367865&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedBuildTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/DistributedBuildTest.java
Wed Aug  1 06:18:26 2012
@@ -153,4 +153,56 @@ public class DistributedBuildTest
         buildProjectGroup( M2_PROJ_GRP_NAME, M2_PROJ_GRP_ID, M2_PROJ_GRP_DESCRIPTION, M2_PROJ_GRP_NAME,
true );
     }
 
+    public void testBuildShellProjectWithDistributedBuildsEnabled()
+        throws Exception
+    {
+        String SHELL_GROUP_NAME = getProperty( "SHELL_GROUP_NAME" );
+        String SHELL_GROUP_ID = getProperty( "SHELL_GROUP_ID" );
+        String SHELL_GROUP_DESC = getProperty( "SHELL_GROUP_DESC" );
+
+        String SHELL_NAME = getProperty( "SHELL_NAME_TWO" );
+        String SHELL_DESCRIPTION = getProperty( "SHELL_DESCRIPTION_TWO" );
+        String SHELL_VERSION = getProperty( "SHELL_VERSION_TWO" );
+        String SHELL_TAG = getProperty( "SHELL_TAG_TWO" );
+        String SHELL_SCM_URL = getProperty( "SHELL_SCM_URL_TWO" );
+        String SHELL_SCM_USERNAME = getProperty( "SHELL_SCM_USERNAME_TWO" );
+        String SHELL_SCM_PASSWORD = getProperty( "SHELL_SCM_PASSWORD_TWO" );
+
+        addProjectGroup( SHELL_GROUP_NAME, SHELL_GROUP_ID, SHELL_GROUP_DESC, true );
+
+        projectGroupName = SHELL_GROUP_NAME;
+
+        addBuildAgent( getBuildAgentUrl() );
+
+        goToAddShellProjectPage();
+        addProject( SHELL_NAME, SHELL_DESCRIPTION, SHELL_VERSION, SHELL_SCM_URL, SHELL_SCM_USERNAME,
+                    SHELL_SCM_PASSWORD, SHELL_TAG, false, SHELL_GROUP_NAME, null, true, "shell"
);
+        assertProjectGroupSummaryPage( SHELL_GROUP_NAME, SHELL_GROUP_ID, SHELL_GROUP_DESC
);
+
+        goToProjectGroupsSummaryPage();
+        clickLinkWithText( SHELL_GROUP_NAME );
+        clickLinkWithText( "Build Definitions" );
+        clickLinkWithXPath( "//table[@id='ec_table']/tbody/tr/td[14]/a/img" );
+
+        editBuildDefinitionShellType( "build.sh", "", "description", "shell", true );
+
+        goToProjectGroupsSummaryPage();
+
+        buildProjectGroup( SHELL_GROUP_NAME ,SHELL_GROUP_ID , SHELL_GROUP_DESC ,SHELL_NAME,
true );
+
+    }
+
+    private void editBuildDefinitionShellType( String buildFile, String arguments, String
description, String buildDefinitionType, boolean alwaysBuild )
+    {
+        setFieldValue( "buildFile", buildFile);
+        setFieldValue( "arguments", arguments );
+        setFieldValue( "description", description );
+        setFieldValue( "buildDefinitionType", buildDefinitionType );
+        if( alwaysBuild )
+        {
+            checkField( "alwaysBuild" );
+        }
+
+        submit();
+    }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java?rev=1367865&r1=1367864&r2=1367865&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/ShellProjectTest.java
Wed Aug  1 06:18:26 2012
@@ -69,7 +69,6 @@ public class ShellProjectTest
         addProject( SHELL_NAME, SHELL_DESCRIPTION, SHELL_VERSION, SHELL_SCM_URL, SHELL_SCM_USERNAME,
                     SHELL_SCM_PASSWORD, SHELL_TAG, false, DEFAULT_PROJ_GRP_NAME, null, false,
"shell" );
         assertTextPresent( "Name contains invalid characters." );
-        assertTextPresent( "Description contains invalid characters." );
         assertTextPresent( "Version contains invalid characters." );
         assertTextPresent( "SCM Url contains invalid characters." );
         assertTextPresent( "SCM Tag contains invalid characters." );
@@ -102,62 +101,4 @@ public class ShellProjectTest
         assertTextPresent( "Project name already exist" );
     }
 
-    @Test( dependsOnMethods = { "testAddBuildAgent" } )
-    public void testBuildShellProjectWithDistributedBuildsEnabled()
-       throws Exception
-    {
-        String SHELL_GROUP_NAME = getProperty( "SHELL_GROUP_NAME" );
-        String SHELL_GROUP_ID = getProperty( "SHELL_GROUP_ID" );
-        String SHELL_GROUP_DESC = getProperty( "SHELL_GROUP_DESC" );
-
-        String SHELL_NAME = getProperty( "SHELL_NAME_TWO" );
-        String SHELL_DESCRIPTION = getProperty( "SHELL_DESCRIPTION_TWO" );
-        String SHELL_VERSION = getProperty( "SHELL_VERSION_TWO" );
-        String SHELL_TAG = getProperty( "SHELL_TAG_TWO" );
-        String SHELL_SCM_URL = getProperty( "SHELL_SCM_URL_TWO" );
-        String SHELL_SCM_USERNAME = getProperty( "SHELL_SCM_USERNAME_TWO" );
-        String SHELL_SCM_PASSWORD = getProperty( "SHELL_SCM_PASSWORD_TWO" );
-
-        addProjectGroup( SHELL_GROUP_NAME, SHELL_GROUP_ID, SHELL_GROUP_DESC, true );
-
-        goToAddShellProjectPage();
-        addProject( SHELL_NAME, SHELL_DESCRIPTION, SHELL_VERSION, SHELL_SCM_URL, SHELL_SCM_USERNAME,
-                    SHELL_SCM_PASSWORD, SHELL_TAG, false, SHELL_GROUP_NAME, null, true, "shell"
);
-        assertProjectGroupSummaryPage( SHELL_GROUP_NAME, SHELL_GROUP_ID, SHELL_GROUP_DESC
);
-
-        goToProjectGroupsSummaryPage();
-        clickLinkWithText( SHELL_GROUP_NAME );
-        clickLinkWithText( "Build Definitions" );
-        clickLinkWithXPath( "//table[@id='ec_table']/tbody/tr/td[14]/a/img" );
-        
-        editBuildDefinitionShellType( "build.sh", "", "description", "shell", true );
-
-        try
-        {
-            enableDistributedBuilds();
-
-            goToProjectGroupsSummaryPage();
-
-            buildProjectGroup( SHELL_GROUP_NAME ,SHELL_GROUP_ID , SHELL_GROUP_DESC ,SHELL_NAME,
true );
-        }
-        finally
-        {
-            disableDistributedBuilds();
-        }
-
-    }
-    
-    private void editBuildDefinitionShellType( String buildFile, String arguments, String
description, String buildDefinitionType, boolean alwaysBuild )
-    {
-        setFieldValue( "buildFile", buildFile);
-        setFieldValue( "arguments", arguments );
-        setFieldValue( "description", description );
-        setFieldValue( "buildDefinitionType", buildDefinitionType );
-        if( alwaysBuild )
-        {
-            checkField( "alwaysBuild" );
-        }
-        
-        submit();
-    }
 }

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=1367865&r1=1367864&r2=1367865&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 Aug  1 06:18:26 2012
@@ -368,6 +368,7 @@ public abstract class AbstractContinuumT
     {
         showProjectGroup( projectGroupName, groupId, description );
         waitForProjectUpdate();
+        waitForElementPresent( "//button[@value='Build all projects']" );
         clickButtonWithValue( "Build all projects" );
 
         // wait for project to finish building



Mime
View raw message