diff options
author | Olivier Lamy <olamy@apache.org> | 2011-06-17 20:59:36 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2011-06-17 20:59:36 +0000 |
commit | f23144e02fd6f79381216e95d444cbe219d4e52b (patch) | |
tree | b7094c88f73127cf628810716eafb011f344a24c /archiva-modules | |
parent | 3ebb3f35d1fc0a4feb7d9bc4805e9bee888b3a93 (diff) | |
download | archiva-f23144e02fd6f79381216e95d444cbe219d4e52b.tar.gz archiva-f23144e02fd6f79381216e95d444cbe219d4e52b.zip |
ugly display stack trace in selenium tests to know why it failed on asf jenkins in ubuntu slave
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1137019 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules')
-rw-r--r-- | archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java index 654d84835..508889372 100644 --- a/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java +++ b/archiva-modules/archiva-web/archiva-webapp-test/src/test/testng/org/apache/archiva/web/test/parent/AbstractSeleniumTest.java @@ -67,15 +67,25 @@ public abstract class AbstractSeleniumTest public void open( String baseUrl, String browser, String seleniumHost, int seleniumPort, String maxWaitTimeInMs ) throws Exception { - AbstractSeleniumTest.baseUrl = baseUrl; - AbstractSeleniumTest.maxWaitTimeInMs = maxWaitTimeInMs; + try + { + AbstractSeleniumTest.baseUrl = baseUrl; + AbstractSeleniumTest.maxWaitTimeInMs = maxWaitTimeInMs; - if ( getSelenium() == null ) + if ( getSelenium() == null ) + { + DefaultSelenium s = + new DefaultSelenium( seleniumHost, seleniumPort, browser, baseUrl + "?" + forceLocaleParam ); + s.start(); + s.setTimeout( maxWaitTimeInMs ); + selenium.set( s ); + } + } + catch ( Exception e ) { - DefaultSelenium s = new DefaultSelenium( seleniumHost, seleniumPort, browser, baseUrl + "?" + forceLocaleParam ); - s.start(); - s.setTimeout( maxWaitTimeInMs ); - selenium.set( s ); + // yes + System.out.print( e.getMessage() ); + e.printStackTrace(); } } @@ -405,14 +415,14 @@ public abstract class AbstractSeleniumTest Assert.assertFalse( getSelenium().isChecked( locator ) ); } - public void assertXpathCount(String locator, int expectedCount) + public void assertXpathCount( String locator, int expectedCount ) { - Assert.assertEquals( getSelenium().getXpathCount(locator).intValue(), expectedCount ); + Assert.assertEquals( getSelenium().getXpathCount( locator ).intValue(), expectedCount ); } - public void assertElementValue(String locator, String expectedValue) + public void assertElementValue( String locator, String expectedValue ) { - Assert.assertEquals(getSelenium().getValue(locator), expectedValue); + Assert.assertEquals( getSelenium().getValue( locator ), expectedValue ); } }
\ No newline at end of file |