geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r938122 - in /geronimo/server/trunk/testsuite/web-testsuite: test-2.1-jsps/ test-2.1-jsps/src/test/java/org/apache/geronimo/testsuite/jsps/ test-2.1-jsps/src/test/resources/ test-tld/test-tld-war/ test-tld/test-tld-war/src/test/java/org/apa...
Date Mon, 26 Apr 2010 16:54:55 GMT
Author: gawor
Date: Mon Apr 26 16:54:55 2010
New Revision: 938122

URL: http://svn.apache.org/viewvc?rev=938122&view=rev
Log:
simplify tests - remove selenium usage

Removed:
    geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/src/test/resources/
    geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/test/resources/
Modified:
    geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/pom.xml
    geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/src/test/java/org/apache/geronimo/testsuite/jsps/TestJsps.java
    geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/pom.xml
    geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/test/java/org/apache/geronimo/testsuite/tld/TestTLD.java

Modified: geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/pom.xml?rev=938122&r1=938121&r2=938122&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/pom.xml (original)
+++ geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/pom.xml Mon Apr 26 16:54:55
2010
@@ -52,27 +52,8 @@
         <profile>
             <id>it</id>
             <build>
-                <pluginManagement>
-                    <plugins>
-                        <plugin>
-                            <groupId>org.apache.maven.plugins</groupId>
-                            <artifactId>maven-failsafe-plugin</artifactId>
-                            <configuration>
-                                <suiteXmlFiles>
-                                    <suiteXmlFile>${project.build.testOutputDirectory}/testng.xml</suiteXmlFile>
-                                </suiteXmlFiles>
-                            </configuration>
-                        </plugin>
-                    </plugins>
-                </pluginManagement>
-
                 <plugins>
                     <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>selenium-maven-plugin</artifactId>
-                    </plugin>
-
-                    <plugin>
                         <groupId>org.apache.geronimo.buildsupport</groupId>
                         <artifactId>geronimo-maven-plugin</artifactId>
                         <executions>

Modified: geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/src/test/java/org/apache/geronimo/testsuite/jsps/TestJsps.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/src/test/java/org/apache/geronimo/testsuite/jsps/TestJsps.java?rev=938122&r1=938121&r2=938122&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/src/test/java/org/apache/geronimo/testsuite/jsps/TestJsps.java
(original)
+++ geronimo/server/trunk/testsuite/web-testsuite/test-2.1-jsps/src/test/java/org/apache/geronimo/testsuite/jsps/TestJsps.java
Mon Apr 26 16:54:55 2010
@@ -19,41 +19,40 @@
 
 package org.apache.geronimo.testsuite.jsps;
 
+import java.net.URL;
 
-import org.apache.geronimo.testsupport.SeleniumTestSupport;
+import org.apache.geronimo.testsupport.HttpUtils;
+import org.apache.geronimo.testsupport.TestSupport;
 import org.testng.annotations.Test;
 
-public class TestJsps extends SeleniumTestSupport
-{
+public class TestJsps extends TestSupport {
 
     @Test
     public void testDeferral() throws Exception {
-        selenium.open("/jsp21/testDeferral.jsp");
-        waitForPageLoad();
-        
-        //throw new Exception(selenium.getText("xpath=/html/body"));
-        assertEquals("OneTwo", selenium.getText("xpath=/html/body"));
+        URL url = new URL("http://localhost:8080/jsp21/testDeferral.jsp");
+        String reply = HttpUtils.doGET(url);
+        assertTrue("testDeferral", reply.contains("OneTwo"));
     }
 
     @Test
     public void testScopes() throws Exception {
-        selenium.open("/jsp21/testScopes.jsp");
-        waitForPageLoad();
-        assertEquals("value1 value2 value3 value4", selenium.getText("xpath=/html/body"));
+        URL url = new URL("http://localhost:8080/jsp21/testScopes.jsp");
+        String reply = HttpUtils.doGET(url);
+        assertTrue("testScopes", reply.contains("value1 value2 value3 value4"));
     }
 
     @Test
     public void testTaglibs() throws Exception {
-        selenium.open("/jsp21/testTaglibs.jsp");
-        waitForPageLoad();
-        assertEquals("Hello", selenium.getText("xpath=/html/body"));
+        URL url = new URL("http://localhost:8080/jsp21/testTaglibs.jsp");
+        String reply = HttpUtils.doGET(url);
+        assertTrue("testTagLibs", reply.contains("Hello"));
     }
 
     @Test
     public void testTrimWhitespace() throws Exception {
-        selenium.open("/jsp21/testTrimWhitespace.jsp");
-        waitForPageLoad();
-        assertEquals("source html of this page should not contain empty lines", selenium.getText("xpath=/html/body"));
+        URL url = new URL("http://localhost:8080/jsp21/testTrimWhitespace.jsp");
+        String reply = HttpUtils.doGET(url);
+        assertTrue("testTrimWhitespace", reply.contains("source html of this page should
not contain empty lines"));
     }
 
 }

Modified: geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/pom.xml?rev=938122&r1=938121&r2=938122&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/pom.xml (original)
+++ geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/pom.xml Mon Apr 26
16:54:55 2010
@@ -58,27 +58,8 @@
         <profile>
             <id>it</id>
             <build>
-                <pluginManagement>
-                    <plugins>
-                        <plugin>
-                            <groupId>org.apache.maven.plugins</groupId>
-                            <artifactId>maven-failsafe-plugin</artifactId>
-                            <configuration>
-                                <suiteXmlFiles>
-                                    <suiteXmlFile>${project.build.testOutputDirectory}/testng.xml</suiteXmlFile>
-                                </suiteXmlFiles>
-                            </configuration>
-                        </plugin>
-                    </plugins>
-                </pluginManagement>
-
                 <plugins>
                     <plugin>
-                        <groupId>org.codehaus.mojo</groupId>
-                        <artifactId>selenium-maven-plugin</artifactId>
-                    </plugin>
-
-                    <plugin>
                         <groupId>org.apache.geronimo.buildsupport</groupId>
                         <artifactId>geronimo-maven-plugin</artifactId>
                         <executions>

Modified: geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/test/java/org/apache/geronimo/testsuite/tld/TestTLD.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/test/java/org/apache/geronimo/testsuite/tld/TestTLD.java?rev=938122&r1=938121&r2=938122&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/test/java/org/apache/geronimo/testsuite/tld/TestTLD.java
(original)
+++ geronimo/server/trunk/testsuite/web-testsuite/test-tld/test-tld-war/src/test/java/org/apache/geronimo/testsuite/tld/TestTLD.java
Mon Apr 26 16:54:55 2010
@@ -19,19 +19,21 @@
 
 package org.apache.geronimo.testsuite.tld;
 
-import org.apache.geronimo.testsupport.SeleniumTestSupport;
+import java.net.URL;
+
+import org.apache.geronimo.testsupport.HttpUtils;
+import org.apache.geronimo.testsupport.TestSupport;
 import org.testng.annotations.Test;
 
-public class TestTLD extends SeleniumTestSupport {
+public class TestTLD extends TestSupport {
 
     @Test
     public void testTaglibs() throws Exception {
-        selenium.open("/tld/testTaglibs.jsp");
-        waitForPageLoad();
-        String text = selenium.getText("xpath=/html/body");
-        assertTrue("'Hello' not found", text.contains("Hello"));
-        assertTrue("'TestTag' not found", text.contains("TestTag"));
-        assertTrue("'Listener initialized' not found", text.contains("Listener initialized:
true"));
+        URL url = new URL("http://localhost:8080/tld/testTaglibs.jsp");
+        String reply = HttpUtils.doGET(url);
+        assertTrue("'Hello' not found", reply.contains("Hello"));
+        assertTrue("'TestTag' not found", reply.contains("TestTag"));
+        assertTrue("'Listener initialized' not found", reply.contains("Listener initialized:
true"));
     }
 
 }



Mime
View raw message