continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From car...@apache.org
Subject svn commit: r794086 - in /continuum/branches/continuum-selenium-parallel-carlos: pom.xml src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
Date Tue, 14 Jul 2009 22:02:19 GMT
Author: carlos
Date: Tue Jul 14 22:02:18 2009
New Revision: 794086

URL: http://svn.apache.org/viewvc?rev=794086&view=rev
Log:
Print the browser that failed the tests

Modified:
    continuum/branches/continuum-selenium-parallel-carlos/pom.xml
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
    continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java

Modified: continuum/branches/continuum-selenium-parallel-carlos/pom.xml
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/pom.xml?rev=794086&r1=794085&r2=794086&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/pom.xml (original)
+++ continuum/branches/continuum-selenium-parallel-carlos/pom.xml Tue Jul 14 22:02:18 2009
@@ -71,7 +71,7 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <configuration>
           <suiteXmlFiles>
-            <suiteXmlFile>src/test/testng/config/testng.xml</suiteXmlFile>
+            <suiteXmlFile>src/test/testng/config/testng-multienvironment.xml</suiteXmlFile>
           </suiteXmlFiles>
         </configuration>
         <executions>

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java?rev=794086&r1=794085&r2=794086&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/listener/CaptureScreenShotsListener.java
Tue Jul 14 22:02:18 2009
@@ -35,14 +35,14 @@
     public void onTestFailure( ITestResult tr )
     {
         captureError( tr );
-        System.out.println( "Test " + tr.getName() + " -> Failed" );
+        System.out.println( "Test " + tr.getName() + " [" + AbstractSeleniumTest.getSeleniumBrowser()
+ "] -> Failed" );
         super.onTestFailure( tr );
     }
 
     @Override
     public void onTestSuccess( ITestResult tr )
     {
-        System.out.println( "Test " + tr.getName() + " -> Success" );
+        System.out.println( "Test " + tr.getName() + " [" + AbstractSeleniumTest.getSeleniumBrowser()
+ "] -> Success" );
         super.onTestFailure( tr );
     }
 
@@ -54,7 +54,7 @@
         }
         catch ( RuntimeException e )
         {
-            System.out.println( "Error when take screenshot for test " + tr.getName() );
+            System.out.println( "Error when taking screenshot for test " + tr.getName() );
             e.printStackTrace();
         }
     }

Modified: continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java?rev=794086&r1=794085&r2=794086&view=diff
==============================================================================
--- continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
(original)
+++ continuum/branches/continuum-selenium-parallel-carlos/src/test/testng/org/apache/continuum/web/test/parent/AbstractSeleniumTest.java
Tue Jul 14 22:02:18 2009
@@ -49,6 +49,8 @@
 
     private static ThreadLocal<Selenium> selenium = new ThreadLocal<Selenium>();
 
+    private static ThreadLocal<String> seleniumBrowser = new ThreadLocal<String>();
+
     private static Properties p;
 
     private final static String PROPERTIES_SEPARATOR = "=";
@@ -79,6 +81,7 @@
             DefaultSelenium s = new DefaultSelenium( seleniumHost, seleniumPort, browser,
baseUrl );
             s.start();
             selenium.set( s );
+            seleniumBrowser.set( browser );
         }
     }
 
@@ -87,6 +90,11 @@
         return selenium == null ? null : selenium.get();
     }
 
+    public static String getSeleniumBrowser()
+    {
+        return seleniumBrowser == null ? null : seleniumBrowser.get();
+    }
+
     /**
      * Returns an unique identifier that can be used to allow rerunning the tests against
the same server without status
      * collision



Mime
View raw message