]> source.dussan.org Git - archiva.git/commitdiff
always output the HTML anyway
authorBrett Porter <brett@apache.org>
Fri, 5 Mar 2010 07:59:47 +0000 (07:59 +0000)
committerBrett Porter <brett@apache.org>
Fri, 5 Mar 2010 07:59:47 +0000 (07:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@919326 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/listener/CaptureScreenShotsListener.java

index 8ee826394baf70a0fb9e62d6441c268073e62eb4..36bba09336da564082aea91dffc3d055f7f5afb2 100644 (file)
@@ -19,18 +19,18 @@ package org.apache.archiva.web.test.listener;
  * under the License.
  */
 
+import com.thoughtworks.selenium.Selenium;
+import org.apache.archiva.web.test.parent.AbstractSeleniumTest;
+import org.apache.commons.io.FileUtils;
+import org.testng.ITestResult;
+import org.testng.TestListenerAdapter;
+
 import java.io.File;
 import java.io.IOException;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.regex.Pattern;
 
-import org.apache.archiva.web.test.parent.AbstractSeleniumTest;
-import org.apache.commons.io.FileUtils;
-import org.testng.ITestResult;
-import org.testng.TestListenerAdapter;
-import com.thoughtworks.selenium.Selenium;
-
 public class CaptureScreenShotsListener
     extends TestListenerAdapter
 {
@@ -80,15 +80,15 @@ public class CaptureScreenShotsListener
         catch ( RuntimeException e )
         {
             System.out.println( "Error when take screenshot for test " + tr.getName() + ": " + e.getMessage() );
-            try
-            {
-                File fileName = new File( targetPath, fileBaseName + ".html" );
-                FileUtils.writeStringToFile( fileName, selenium.getHtmlSource() );
-            }
-            catch ( IOException ioe )
-            {
-                System.out.println( ioe.getMessage() );
-            }
+        }
+        try
+        {
+            File fileName = new File( targetPath, fileBaseName + ".html" );
+            FileUtils.writeStringToFile( fileName, selenium.getHtmlSource() );
+        }
+        catch ( IOException ioe )
+        {
+            System.out.println( ioe.getMessage() );
         }
     }