mirror of https://github.com/apache/archiva.git
always output the HTML anyway
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@919326 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e521a959c5
commit
62b97751fb
|
@ -19,18 +19,18 @@ package org.apache.archiva.web.test.listener;
|
||||||
* under the License.
|
* 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.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.regex.Pattern;
|
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
|
public class CaptureScreenShotsListener
|
||||||
extends TestListenerAdapter
|
extends TestListenerAdapter
|
||||||
{
|
{
|
||||||
|
@ -80,6 +80,7 @@ public class CaptureScreenShotsListener
|
||||||
catch ( RuntimeException e )
|
catch ( RuntimeException e )
|
||||||
{
|
{
|
||||||
System.out.println( "Error when take screenshot for test " + tr.getName() + ": " + e.getMessage() );
|
System.out.println( "Error when take screenshot for test " + tr.getName() + ": " + e.getMessage() );
|
||||||
|
}
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
File fileName = new File( targetPath, fileBaseName + ".html" );
|
File fileName = new File( targetPath, fileBaseName + ".html" );
|
||||||
|
@ -90,7 +91,6 @@ public class CaptureScreenShotsListener
|
||||||
System.out.println( ioe.getMessage() );
|
System.out.println( ioe.getMessage() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
private int getStackTraceIndexOfCallingClass( String nameOfClass, StackTraceElement stackTrace[] )
|
private int getStackTraceIndexOfCallingClass( String nameOfClass, StackTraceElement stackTrace[] )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue