]> source.dussan.org Git - vaadin-framework.git/commitdiff
Add project, build and test name capabilities.
authorSauli Tähkäpää <sauli@vaadin.com>
Wed, 25 Feb 2015 07:14:28 +0000 (09:14 +0200)
committerVaadin Code Review <review@vaadin.com>
Wed, 25 Feb 2015 09:24:12 +0000 (09:24 +0000)
- Helps identifiying problem points in test queue
- Enables grouping tests in BrowserStack and other services.

Change-Id: I444d0aa07900c39b4dafc2d6b6889975b3de3bec

uitest/src/com/vaadin/tests/tb3/MultiBrowserTest.java

index acf9d7a815c8f00465a6974f0ef3c034a5163611..b166590c4316539250bf0ae6508bb78300e71d17 100644 (file)
 package com.vaadin.tests.tb3;
 
 import java.util.ArrayList;
+import java.util.Calendar;
 import java.util.List;
 
+import org.junit.Rule;
+import org.junit.rules.TestName;
 import org.openqa.selenium.ie.InternetExplorerDriver;
 import org.openqa.selenium.remote.DesiredCapabilities;
 
@@ -43,6 +46,9 @@ import com.vaadin.testbench.parallel.BrowserUtil;
  */
 public abstract class MultiBrowserTest extends PrivateTB3Configuration {
 
+    @Rule
+    public TestName testName = new TestName();
+
     protected List<DesiredCapabilities> getBrowsersSupportingWebSocket() {
         // No WebSocket support in IE8-9 and PhantomJS
         return getBrowserCapabilities(Browser.IE10, Browser.IE11,
@@ -88,6 +94,12 @@ public abstract class MultiBrowserTest extends PrivateTB3Configuration {
             }
         }
 
+        desiredCapabilities.setCapability("project", "Vaadin Framework");
+        desiredCapabilities.setCapability("build", String.format("%s / %s",
+                getDeploymentHostname(), Calendar.getInstance().getTime()));
+        desiredCapabilities.setCapability("name", String.format("%s.%s",
+                getClass().getCanonicalName(), testName.getMethodName()));
+
         super.setDesiredCapabilities(desiredCapabilities);
     }