diff options
author | John Ahlroos <john@vaadin.com> | 2013-09-25 13:51:23 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2013-09-27 06:30:06 +0000 |
commit | 5fb1da2da04ccca2305af31a9105b848e42b1ed6 (patch) | |
tree | e6fe0bf1113626f419c812bbd98b41f6a73564b2 | |
parent | 8ce6565b3ee456db4f95b41568a8b31721a48cd6 (diff) | |
download | vaadin-framework-5fb1da2da04ccca2305af31a9105b848e42b1ed6.tar.gz vaadin-framework-5fb1da2da04ccca2305af31a9105b848e42b1ed6.zip |
Publish error artifacts immediatly in TeamCity
Change-Id: I69cb2208b7f6b3263ddb25fa26eebebcc6f9a7c3
-rw-r--r-- | uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java | 12 | ||||
-rw-r--r-- | uitest/test.xml | 4 |
2 files changed, 15 insertions, 1 deletions
diff --git a/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java b/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java index 645d9cd0cb..565d04fdb9 100644 --- a/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java +++ b/uitest/src/com/vaadin/tests/tb3/ScreenshotTB3Test.java @@ -31,6 +31,7 @@ import org.junit.Before; import org.junit.Rule; import org.junit.rules.TestRule; import org.junit.rules.TestWatcher; +import org.junit.runner.Description; import org.openqa.selenium.OutputType; import org.openqa.selenium.TakesScreenshot; import org.openqa.selenium.remote.DesiredCapabilities; @@ -65,7 +66,16 @@ public abstract class ScreenshotTB3Test extends AbstractTB3Test { } screenshotBaseName = className + "-" + testMethod; - }; + } + + @Override + protected void failed(Throwable e, Description description) { + + // Notify Teamcity of failed test + System.out.print("##teamcity[publishArtifacts '"); + System.out.println(getScreenshotErrorDirectory() + "/" + + getScreenshotBaseName() + "* => screenshot-errors']"); + } }; /** diff --git a/uitest/test.xml b/uitest/test.xml index dd6964e59c..88b5238c09 100644 --- a/uitest/test.xml +++ b/uitest/test.xml @@ -134,6 +134,10 @@ </batchtest> </junit> + <!-- Have teamcity publish each test error artifact immediatly if there are any --> + <basename property="basename" file="${target}" suffix="java" /> + <echo>##teamcity[publishArtifacts '${com.vaadin.testbench.screenshot.directory}/errors/${basename}* => screenshot-errors']</echo> + </target> <!-- Remove temporary source and compiled java files --> |