continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r794896 - /continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/
Date Thu, 16 Jul 2009 22:39:43 GMT
Author: carlos
Date: Thu Jul 16 22:39:42 2009
New Revision: 794896

URL: http://svn.apache.org/viewvc?rev=794896&view=rev
Log:
Remove some more test dependencies

Modified:
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/QueueTest.java

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java?rev=794896&r1=794895&r2=794896&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/AntProjectTest.java
Thu Jul 16 22:39:42 2009
@@ -28,7 +28,7 @@
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "antProject" }, dependsOnMethods = { "testWithCorrectUsernamePassword"
} )
+@Test( groups = { "antProject" } )
 public class AntProjectTest
     extends AbstractContinuumTest
 {
@@ -36,6 +36,7 @@
     public void testAddAntProject()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String ANT_NAME = getProperty( "ANT_NAME" );
         String ANT_DESCRIPTION = getProperty( "ANT_DESCRIPTION" );
         String ANT_VERSION = getProperty( "ANT_VERSION" );
@@ -54,6 +55,7 @@
 
     public void testSubmitEmptyForm()
     {
+        loginAsAdminIfNeeded();
         goToAddAntProjectPage();
         submit();
         assertAddProjectPage( "ant" );
@@ -66,6 +68,7 @@
     public void testAddDupliedAntProject()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String ANT_NAME = getProperty( "ANT_NAME" );
         String ANT_DESCRIPTION = getProperty( "ANT_DESCRIPTION" );
         String ANT_VERSION = getProperty( "ANT_VERSION" );

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java?rev=794896&r1=794895&r2=794896&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTemplateTest.java
Thu Jul 16 22:39:42 2009
@@ -26,13 +26,14 @@
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "buildDefinitionTemplate" }, dependsOnMethods = { "testWithCorrectUsernamePassword"
} )
+@Test( groups = { "buildDefinitionTemplate" } )
 public class BuildDefinitionTemplateTest
     extends AbstractBuildDefinitionTemplateTest
 {
     public void testAddTemplate()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String TEMPLATE_NAME = getProperty( "TEMPLATE_NAME" );
         goToAddTemplate();
         addEditTemplate( TEMPLATE_NAME, new String[] { "Default Maven 2 Build Definition",
@@ -42,6 +43,7 @@
     public void testAddInvalidTemplate()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         goToAddTemplate();
         addEditTemplate( "", new String[] {}, new String[] {}, false );
         assertTextPresent( "Name is required" );
@@ -51,6 +53,7 @@
     public void testEditTemplate()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String TEMPLATE_NAME = getProperty( "TEMPLATE_NAME" );
         String newName = "new_name";
         goToEditTemplate( TEMPLATE_NAME, new String[] { "Default Maven 2 Build Definition",
@@ -66,6 +69,7 @@
     @Test( dependsOnMethods = { "testEditTemplate" } )
     public void testDeleteTemplate()
     {
+        loginAsAdminIfNeeded();
         String TEMPLATE_NAME = getProperty( "TEMPLATE_NAME" );
         removeTemplate( TEMPLATE_NAME );
     }
@@ -73,6 +77,7 @@
     public void testAddBuildDefinitionTemplate()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         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" );
@@ -85,6 +90,7 @@
     public void testAddInvalidBuildDefinitionTemplate()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         goToAddBuildDefinitionTemplate();
         addEditBuildDefinitionTemplate( "", "", "", "", true, true, true, false );
         assertTextPresent( "BuildFile is required" );
@@ -95,6 +101,7 @@
     public void testEditBuildDefinitionTemplate()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         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" );
@@ -107,6 +114,7 @@
     @Test( dependsOnMethods = { "testEditBuildDefinitionTemplate" } )
     public void testDeleteBuildDefinitionTemplate()
     {
+        loginAsAdminIfNeeded();
         String TEMPLATE_BUILD_DESCRIPTION = getProperty( "TEMPLATE_BUILD_DESCRIPTION" );
         removeBuildDefinitionTemplate( TEMPLATE_BUILD_DESCRIPTION );
     }

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java?rev=794896&r1=794895&r2=794896&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildDefinitionTest.java
Thu Jul 16 22:39:42 2009
@@ -26,13 +26,14 @@
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "buildDefinition" }, dependsOnMethods = { "testWithCorrectUsernamePassword"
} )
+@Test( groups = { "buildDefinition" } )
 public class BuildDefinitionTest
     extends AbstractContinuumTest
 {
     public void testDefaultGroupBuildDefinition()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         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"
);
@@ -70,6 +71,7 @@
     public void testAddInvalidGroupBuildDefinition()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" ) + getTestId();
         String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" ) + getTestId();
         String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
@@ -84,6 +86,7 @@
     public void testBuildFromGroupBuildDefinition()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" ) + getTestId();
         String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" ) + getTestId();
         String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
@@ -96,6 +99,7 @@
     public void testAddDefautltGroupBuildDefinition()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" ) + getTestId();
         String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" ) + getTestId();
         String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
@@ -113,6 +117,7 @@
     public void testAddNotDefautltGroupBuildDefinition()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" ) + getTestId();
         String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" ) + getTestId();
         String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
@@ -130,6 +135,7 @@
     public void testEditGroupBuildDefinition()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" ) + getTestId();
         String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" ) + getTestId();
         String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
@@ -154,6 +160,7 @@
     public void testDeleteGroupBuildDefinition()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String TEST2_PROJ_GRP_NAME = getProperty( "TEST2_PROJ_GRP_NAME" ) + getTestId();
         String TEST2_PROJ_GRP_ID = getProperty( "TEST2_PROJ_GRP_ID" ) + getTestId();
         String TEST2_PROJ_GRP_DESCRIPTION = getProperty( "TEST2_PROJ_GRP_DESCRIPTION" );
@@ -171,6 +178,7 @@
     public void testAddNotDefautltProjectBuildDefinition()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String TEST_PROJ_GRP_NAME = getTestGroupName();
         String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         String BUILD_POM_NAME = getProperty( "BUILD_POM_NAME" );
@@ -187,6 +195,7 @@
     public void testDeleteProjectBuildDefinition()
         throws Exception
     {
+        loginAsAdminIfNeeded();
         String TEST_PROJ_GRP_NAME = getTestGroupName();
         String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         String BUILD_GOALS = getProperty( "BUILD_GOALS" );

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java?rev=794896&r1=794895&r2=794896&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/BuildEnvironmentTest.java
Thu Jul 16 22:39:42 2009
@@ -26,19 +26,21 @@
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "buildEnvironment" }, dependsOnMethods = { "testWithCorrectUsernamePassword"
} )
+@Test( groups = { "buildEnvironment" } )
 public class BuildEnvironmentTest
     extends AbstractBuildEnvironmentTest
 {
     public void testAddBuildEnvironment()
     {
-        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" );
+        loginAsAdminIfNeeded();
+        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" ) + getTestId();
         goToAddBuildEnvironment();
         addBuildEnvironment( BUIL_ENV_NAME, new String[] {}, true );
     }
 
     public void testAddInvalidBuildEnvironment()
     {
+        loginAsAdminIfNeeded();
         goToAddBuildEnvironment();
         addBuildEnvironment( "", new String[] {}, false );
         assertTextPresent( "You must define a name" );
@@ -47,7 +49,8 @@
     @Test( dependsOnMethods = { "testAddBuildEnvironment" } )
     public void testEditInvalidBuildEnvironment()
     {
-        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" );
+        loginAsAdminIfNeeded();
+        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" ) + getTestId();
         goToEditBuildEnvironment( BUIL_ENV_NAME );
         editBuildEnvironment( "", new String[] {}, false );
         assertTextPresent( "You must define a name" );
@@ -56,7 +59,8 @@
     @Test( dependsOnMethods = { "testAddBuildEnvironment" } )
     public void testAddDuplicatedBuildEnvironment()
     {
-        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" );
+        loginAsAdminIfNeeded();
+        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" ) + getTestId();
         goToAddBuildEnvironment();
         addBuildEnvironment( BUIL_ENV_NAME, new String[] {}, false );
         assertTextPresent( "A Build Environment with the same name already exists" );
@@ -65,7 +69,8 @@
     @Test( dependsOnMethods = { "testAddBuildEnvironment" } )
     public void testEditBuildEnvironment()
     {
-        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" );
+        loginAsAdminIfNeeded();
+        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" ) + getTestId();
         String newName = "new_name";
         goToEditBuildEnvironment( BUIL_ENV_NAME );
         editBuildEnvironment( newName, new String[] {}, true );
@@ -78,7 +83,8 @@
         "testAddDuplicatedBuildEnvironment", "testEditInvalidBuildEnvironment" } )
     public void testDeleteBuildEnvironment()
     {
-        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" );
+        loginAsAdminIfNeeded();
+        String BUIL_ENV_NAME = getProperty( "BUIL_ENV_NAME" ) + getTestId();
         removeBuildEnvironment( BUIL_ENV_NAME );
     }
 }

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java?rev=794896&r1=794895&r2=794896&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/ConfigurationTest.java
Thu Jul 16 22:39:42 2009
@@ -26,7 +26,7 @@
  * @author José Morales Martínez
  * @version $Id$
  */
-@Test( groups = { "configuration" }, dependsOnMethods = { "testWithCorrectUsernamePassword"
} )
+@Test( groups = { "configuration" } )
 public class ConfigurationTest
     extends AbstractConfigurationTest
 {
@@ -44,6 +44,7 @@
 
     public void defaultConfiguration()
     {
+        loginAsAdminIfNeeded();
         goToConfigurationPage();
         WORKING_DIRECTORY = getFieldValue( "workingDirectory" );
         BASE_URL = getFieldValue( "baseUrl" );
@@ -56,6 +57,7 @@
     @Test( dependsOnMethods = { "defaultConfiguration" } )
     public void editConfiguration()
     {
+        loginAsAdminIfNeeded();
         String newWorking = "newWorking";
         String newUrl = "http://localhost:8181";
         String newBuildOutput = "newBuildOutput";
@@ -72,6 +74,7 @@
 
     public void setInvalidConfiguration()
     {
+        loginAsAdminIfNeeded();
         goToConfigurationPage();
         submitConfiguration( "", "", "", "", "", "", true, false );
         assertTextPresent( "You must define a working directory" );
@@ -81,6 +84,7 @@
 
     public void setZeroParallelBuilds()
     {
+        loginAsAdminIfNeeded();
         setMaxBuildQueue( 0 );
         assertTextPresent( "Number of Allowed Builds in Parallel must be greater than zero"
);
     }

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/QueueTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/QueueTest.java?rev=794896&r1=794895&r2=794896&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/QueueTest.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/QueueTest.java
Thu Jul 16 22:39:42 2009
@@ -30,13 +30,14 @@
  */
 
 
-@Test( groups = { "queue" }, dependsOnMethods = { "testWithCorrectUsernamePassword" } )
+@Test( groups = { "queue" } )
 public class QueueTest
     extends AbstractBuildQueueTest
 {
 
     public void testAddBuildQueue()
     {
+        loginAsAdminIfNeeded();
         setMaxBuildQueue( 2 );
         String BUILD_QUEUE_NAME = getProperty( "BUILD_QUEUE_NAME" ) + getTestId();
         addBuildQueue( BUILD_QUEUE_NAME, true );
@@ -45,6 +46,7 @@
 	@Test( dependsOnMethods = { "testAddBuildQueue" } ) //"testDeleteBuildQueue" } )
     public void testQueuePageWithoutBuild()
     {
+        loginAsAdminIfNeeded();
         clickAndWait( "link=Queues"  );
         assertPage( "Continuum - Build Queue" );
         assertTextPresent( "Nothing is building" );
@@ -59,10 +61,11 @@
 
 	@Test( dependsOnMethods = { "testAddBuildQueue", "testAddSchedule" } )
     public void testAddBuildQueueToSchedule()
-  {
-	    ScheduleTest sched = new ScheduleTest();
+    {
+        loginAsAdminIfNeeded();
+        ScheduleTest sched = new ScheduleTest();
 
-	    String SCHEDULE_NAME = getProperty( "SCHEDULE_NAME" );
+        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" );
@@ -90,6 +93,7 @@
 	@Test( dependsOnMethods = { "testAddBuildQueue" } )
     public void testAddNotAllowedBuildQueue()
     {
+        loginAsAdminIfNeeded();
         setMaxBuildQueue( 1 );
         String secodQueue = "second_queue_name";
         addBuildQueue( secodQueue, false );
@@ -99,6 +103,7 @@
     @Test( dependsOnMethods = { "testAddBuildQueue" } )
     public void testAddAlreadyExistBuildQueue()
     {
+        loginAsAdminIfNeeded();
         setMaxBuildQueue( 3 );
         String BUILD_QUEUE_NAME = getProperty( "BUILD_QUEUE_NAME" ) + getTestId();
         addBuildQueue( BUILD_QUEUE_NAME, false );
@@ -108,6 +113,7 @@
     @Test( dependsOnMethods = { "testAddAlreadyExistBuildQueue" } )
     public void testAddEmptyBuildQueue()
     {
+        loginAsAdminIfNeeded();
         setMaxBuildQueue( 3 );
         addBuildQueue( "", false );
         assertTextPresent( "You must define a name" );
@@ -116,6 +122,7 @@
     @Test( dependsOnMethods = { "testAddBuildQueueToSchedule" } )
     public void testDeleteBuildQueue()
     {
+        loginAsAdminIfNeeded();
         goToBuildQueuePage();
         String BUILD_QUEUE_NAME = getProperty( "BUILD_QUEUE_NAME" ) + getTestId();
         removeBuildQueue( BUILD_QUEUE_NAME );
@@ -127,6 +134,7 @@
     public void testQueuePageWithProjectCurrentlyBuilding()
         throws Exception
     {
+        loginAsAdminIfNeeded();
     	//build a project
         String M2_PROJ_GRP_NAME = getProperty( "M2_PROJ_GRP_NAME" );
         String M2_PROJ_GRP_ID = getProperty( "M2_PROJ_GRP_ID" ) + getTestId();



Mime
View raw message