From: John Ahlroos Date: Wed, 25 Sep 2013 10:51:23 +0000 (+0300) Subject: Publish error artifacts immediatly in TeamCity X-Git-Tag: 7.1.7~17 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5fb1da2;p=vaadin-framework.git Publish error artifacts immediatly in TeamCity Change-Id: I69cb2208b7f6b3263ddb25fa26eebebcc6f9a7c3 --- 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 @@ + + + ##teamcity[publishArtifacts '${com.vaadin.testbench.screenshot.directory}/errors/${basename}* => screenshot-errors'] +