continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmora...@apache.org
Subject svn commit: r769178 - in /continuum/trunk/continuum-webapp-test: ./ src/test/resources/ src/test/testng/config/ src/test/testng/org/apache/continuum/web/test/ src/test/testng/org/apache/continuum/web/test/parent/
Date Mon, 27 Apr 2009 21:50:05 GMT
Author: jmorales
Date: Mon Apr 27 21:50:04 2009
New Revision: 769178

URL: http://svn.apache.org/viewvc?rev=769178&view=rev
Log:
[CONTINUUM-2073]

Exclude common-loggin, activate Maven1 and Shell project Test, process resourcess for reference
java.home and maven.home in testng.properties.

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/AboutTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractContinuumTest.java
    continuum/trunk/continuum-webapp-test/testng-pom.xml

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=769178&r1=769177&r2=769178&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties (original)
+++ continuum/trunk/continuum-webapp-test/src/test/resources/testng.properties Mon Apr 27
21:50:04 2009
@@ -25,12 +25,12 @@
 ########################
 
 # 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/simple-example/pom.xml
+M2_PROJ_GRP_NAME=Continuum Simple Example Project
+M2_PROJ_GRP_ID=org.apache.continuum.examples
+M2_PROJ_GRP_DESCRIPTION=
+M2_POM_USERNAME =
+M2_POM_PASSWORD =
 # 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
@@ -153,10 +153,10 @@
 ########################
 # Correct location for JDK
 INSTALL_TOOL_JDK_NAME =JDK6
-INSTALL_TOOL_JDK_PATH =/usr/lib/jvm/java-6-sun-1.6.0.10
+INSTALL_TOOL_JDK_PATH =${java.home}
 # Correct location for maven 2
 INTALLA_TOOL_MAVEN_NAME =M9_HOME
-INTALLA_TOOL_MAVEN_PATH =/home/jomm/software/apache-maven-2.0.9
+INTALLA_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

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=769178&r1=769177&r2=769178&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 Apr 27 21:50:04
2009
@@ -41,10 +41,8 @@
 				<include name="mavenTwoProject"/>								
 				<include name="projectGroup" />				
                 <include name="mavenOneProject" />
-                <!--
                 <include name="antProject" />
                 <include name="shellProject" />
-                -->
                 <include name="buildDefinition" />
                 <include name="notifier" />
 				<include name="schedule" />

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java?rev=769178&r1=769177&r2=769178&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/AboutTest.java
Mon Apr 27 21:50:04 2009
@@ -51,8 +51,6 @@
             String mail = p.getProperty( "ADMIN_MAIL" );
             String password = p.getProperty( "ADMIN_PASSWORD" );
             submitAdminData( fullname, mail, password );
-            assertLoginPage();
-            submitUserData( username, password, false, true );
             assertAutenticatedPage( username );
             assertEditConfigurationPage();
             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=769178&r1=769177&r2=769178&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 Apr 27 21:50:04 2009
@@ -572,17 +572,16 @@
             selectValue( "addMavenTwoProject_selectedProjectGroup", projectGroup );
         }
         submit();
-        String ident;
+        String title;
         if ( success )
         {
-            ident = "projectGroupSummary";
+            title = "Continuum - Project Group";
         }
         else
         {
-            ident = "addMavenTwoProject";
+            title = "Continuum - Add Maven 2 Project";
         }
-        String condition = "selenium.browserbot.getCurrentWindow().document.getElementById('"
+ ident + "')";
-        getSelenium().waitForCondition( condition, maxWaitTimeInMs );
+        waitAddProject( title );
     }
 
     /**
@@ -637,6 +636,7 @@
 
     public void addMavenOneProject( String pomUrl, String username, String password, String
projectGroup,
                                     String buildTemplate, boolean success )
+        throws Exception
     {
         setFieldValue( "m1PomUrl", pomUrl );
         setFieldValue( "scmUsername", username );
@@ -651,17 +651,16 @@
             selectValue( "selectedProjectGroup", projectGroup );
         }
         submit();
-        String ident;
+        String title;
         if ( success )
         {
-            ident = "projectGroupSummary";
+            title = "Continuum - Project Group";
         }
         else
         {
-            ident = "addMavenOneProject";
+            title = "Continuum - Add Maven 1 Project";
         }
-        String condition = "selenium.browserbot.getCurrentWindow().document.getElementById('"
+ ident + "')";
-        getSelenium().waitForCondition( condition, maxWaitTimeInMs );
+        waitAddProject( title );
     }
 
     // ////////////////////////////////////
@@ -716,6 +715,7 @@
     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 );
@@ -737,16 +737,26 @@
             selectValue( "selectedProjectGroup", projectGroup );
         }
         submit();
-        String ident;
+        String title;
         if ( success )
         {
-            ident = "projectGroupSummary";
+            title = "Continuum - Project Group";
         }
         else
         {
-            ident = "addProject";
+            title = "Continuum - Add ";
         }
-        String condition = "selenium.browserbot.getCurrentWindow().document.getElementById('"
+ ident + "')";
+        waitAddProject( title );
+    }
+
+    private void waitAddProject( String title )
+        throws Exception
+    {
+        Thread.sleep( 100 );
+        String condition = "selenium.browserbot.getCurrentWindow().document.title != ''";
         getSelenium().waitForCondition( condition, maxWaitTimeInMs );
+        Thread.sleep( 1000 );
+        String t = getTitle();
+        Assert.assertTrue( t.contains( title ) );
     }
 }

Modified: continuum/trunk/continuum-webapp-test/testng-pom.xml
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/testng-pom.xml?rev=769178&r1=769177&r2=769178&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/testng-pom.xml (original)
+++ continuum/trunk/continuum-webapp-test/testng-pom.xml Mon Apr 27 21:50:04 2009
@@ -30,6 +30,15 @@
 
   <build>
     <testSourceDirectory>src/test/testng</testSourceDirectory>
+    <testResources>
+      <testResource>
+        <directory>src/test/resources</directory>
+        <filtering>true</filtering>
+        <includes>
+          <include>**/*</include>
+        </includes>
+      </testResource>
+    </testResources>
     <plugins>
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -189,13 +198,7 @@
       <scope>test</scope>
       <classifier>jdk15</classifier>
     </dependency>
-    <dependency>
-      <groupId>org.openqa.selenium.client-drivers</groupId>
-      <artifactId>selenium-java-client-driver</artifactId>
-      <version>0.9.2</version>
-      <scope>test</scope>
-    </dependency>
-
+    
     <!-- deployables -->
     <dependency>
       <groupId>org.apache.continuum</groupId>
@@ -231,7 +234,26 @@
       <groupId>org.openqa.selenium.server</groupId>
       <artifactId>selenium-server</artifactId>
       <version>0.9.2</version>
+      <exclusions>
+        <exclusion>
+          <groupId> commons-logging</groupId>
+          <artifactId> commons-logging</artifactId>
+        </exclusion>
+      </exclusions>
     </dependency>
+    <dependency>
+      <groupId>org.openqa.selenium.client-drivers</groupId>
+      <artifactId>selenium-java-client-driver</artifactId>
+      <version>0.9.2</version>
+      <scope>test</scope>
+      <exclusions>
+        <exclusion>
+          <groupId> commons-logging</groupId>
+          <artifactId> commons-logging</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+
   </dependencies>
 
   <profiles>



Mime
View raw message