continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r792361 - in /continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test: AboutTest.java LoginTest.java parent/AbstractSeleniumTest.java
Date Thu, 09 Jul 2009 00:07:53 GMT
Author: carlos
Date: Thu Jul  9 00:07:53 2009
New Revision: 792361

URL: http://svn.apache.org/viewvc?rev=792361&view=rev
Log:
Simplify the before/after handling of selenium rc

Modified:
    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/LoginTest.java
    continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java

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=792361&r1=792360&r2=792361&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
Thu Jul  9 00:07:53 2009
@@ -20,9 +20,7 @@
  */
 
 import org.apache.continuum.web.test.parent.AbstractContinuumTest;
-import org.testng.annotations.AfterTest;
 import org.testng.annotations.BeforeSuite;
-import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
 /**
@@ -39,7 +37,6 @@
     public void initializeContinuum()
         throws Exception
     {
-        super.open();
         getSelenium().open( baseUrl );
         String title = getSelenium().getTitle();
         if ( title.equals( "Create Admin User" ) )
@@ -55,7 +52,6 @@
             postAdminUserCreation();
             clickLinkWithText( "Logout" );
         }
-        super.close();
     }
 
     private void postAdminUserCreation()
@@ -75,24 +71,9 @@
         }
     }
 
-    @Override
-    @BeforeTest( groups = { "about" } )
-    public void open()
-        throws Exception
-    {
-        super.open();
-    }
-
     public void displayAboutPage()
     {
         goToAboutPage();
     }
 
-    @Override
-    @AfterTest( groups = { "about" } )
-    public void close()
-        throws Exception
-    {
-        super.close();
-    }
 }
\ No newline at end of file

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java?rev=792361&r1=792360&r2=792361&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/LoginTest.java
Thu Jul  9 00:07:53 2009
@@ -20,8 +20,6 @@
  */
 
 import org.apache.continuum.web.test.parent.AbstractContinuumTest;
-import org.testng.annotations.AfterTest;
-import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
 /*
@@ -92,20 +90,4 @@
         assertTextPresent( "Logout" );
         assertTextPresent( getProperty( "ADMIN_USERNAME" ) );
     }
-
-    @Override
-    @BeforeTest
-    public void open()
-        throws Exception
-    {
-        super.open();
-    }
-
-    @Override
-    @AfterTest
-    public void close()
-        throws Exception
-    {
-        super.close();
-    }
 }

Modified: continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java?rev=792361&r1=792360&r2=792361&view=diff
==============================================================================
--- continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
(original)
+++ continuum/trunk/continuum-webapp-test/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
Thu Jul  9 00:07:53 2009
@@ -21,8 +21,6 @@
 
 import java.io.IOException;
 import java.io.InputStream;
-import java.io.File;
-import java.util.Date;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
@@ -30,13 +28,12 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Map.Entry;
-import java.util.regex.Pattern;
-import java.text.SimpleDateFormat;
-import java.lang.Throwable;
 
 import org.apache.commons.io.IOUtils;
 import org.codehaus.plexus.util.StringUtils;
 import org.testng.Assert;
+import org.testng.annotations.AfterSuite;
+import org.testng.annotations.BeforeSuite;
 
 import com.thoughtworks.selenium.DefaultSelenium;
 import com.thoughtworks.selenium.Selenium;
@@ -62,6 +59,7 @@
     /**
      * Initialize selenium an others properties. This method is called from BeforeSuite method
of sub-class.
      */
+    @BeforeSuite( alwaysRun = true )
     public void open()
         throws Exception
     {
@@ -131,6 +129,7 @@
     /**
      * Close selenium session. Called from AfterSuite method of sub-class
      */
+    @AfterSuite( alwaysRun = true )
     public void close()
         throws Exception
     {



Mime
View raw message