]> source.dussan.org Git - sonarqube.git/commitdiff
Use SeleneseTest to improve reliability of selenium
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 18 Dec 2015 09:53:43 +0000 (10:53 +0100)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Fri, 18 Dec 2015 09:54:39 +0000 (10:54 +0100)
it/it-tests/src/test/java/it/actionPlan/ActionPlanUiTest.java
it/it-tests/src/test/java/it/measureHistory/DifferentialPeriodsTest.java
it/it-tests/src/test/java/it/measureHistory/HistoryUiTest.java
it/it-tests/src/test/java/it/settings/PropertySetsTest.java

index 1537f0e14cf632b3d87fb7aefe43f9c9eef4a521..a381cecb27281fd0e07a5a8a6ecad8ed7888b876 100644 (file)
@@ -30,6 +30,7 @@ import org.junit.ClassRule;
 import org.junit.Ignore;
 import org.junit.Test;
 import org.sonar.wsclient.issue.ActionPlanClient;
+import util.selenium.SeleneseTest;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static util.ItUtils.runProjectAnalysis;
@@ -78,7 +79,7 @@ public class ActionPlanUiTest {
         "/actionPlan/ActionPlanUiTest/edit_action_plan.html",
         // SONAR-3198
         "/actionPlan/ActionPlanUiTest/can_create_action_plan_with_date_today.html").build();
-    orchestrator.executeSelenese(selenese);
+    new SeleneseTest(selenese).runOn(orchestrator);
   }
 
 }
index c1e9606ab4ea25290b2516e0a9a64232983cbbf7..908d109655a05675ea1a5c863ef28280a9499239 100644 (file)
@@ -14,6 +14,7 @@ import org.sonar.wsclient.services.Measure;
 import org.sonar.wsclient.services.Resource;
 import org.sonar.wsclient.services.ResourceQuery;
 import util.ItUtils;
+import util.selenium.SeleneseTest;
 
 import static org.assertj.core.api.Assertions.assertThat;
 import static util.ItUtils.projectDir;
@@ -89,15 +90,14 @@ public class DifferentialPeriodsTest {
     orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
 
     // Use old way to execute Selenium because 'assertSelectOptions' action is not supported by SeleneseTest
-    orchestrator.executeSelenese(Selenese.builder().setHtmlTestsInClasspath("not-display-periods-selection-dropdown-on-first-analysis",
-      "/measureHistory/DifferentialPeriodsTest/not-display-periods-selection-dropdown-on-dashboard.html"
-      ).build());
+    new SeleneseTest(Selenese.builder().setHtmlTestsInClasspath("not-display-periods-selection-dropdown-on-first-analysis",
+      "/measureHistory/DifferentialPeriodsTest/not-display-periods-selection-dropdown-on-dashboard.html").build()).runOn(orchestrator);
 
     orchestrator.executeBuild(SonarRunner.create(projectDir("shared/xoo-sample")));
 
-    orchestrator.executeSelenese(Selenese.builder().setHtmlTestsInClasspath("display-periods-selection-dropdown-after-first-analysis",
+    new SeleneseTest(Selenese.builder().setHtmlTestsInClasspath("display-periods-selection-dropdown-after-first-analysis",
       "/measureHistory/DifferentialPeriodsTest/display-periods-selection-dropdown-on-dashboard.html"
-      ).build());
+    ).build()).runOn(orchestrator);
   }
 
 }
index bc957f944157e1a8eeff9d85d10dac590d226b70..84d733a3ade4abd78f277b44e17d03f6862ac797 100644 (file)
@@ -63,13 +63,13 @@ public class HistoryUiTest {
   @Test
   public void test_timemachine_widget() {
     // Use old way to execute Selenium because 'waitForTextPresent' action is not supported by SeleneseTest
-    orchestrator.executeSelenese(Selenese.builder().setHtmlTestsInClasspath("history-timemachine-widget",
+    new SeleneseTest(Selenese.builder().setHtmlTestsInClasspath("history-timemachine-widget",
       "/measureHistory/HistoryUiTest/history-timemachine-widget/time-machine-widget.html",
       // SONAR-3354 & SONAR-3353
       "/measureHistory/HistoryUiTest/history-timemachine-widget/should-display-empty-table-if-no-measure.html",
       // SONAR-3650
       "/measureHistory/HistoryUiTest/history-timemachine-widget/should-exclude-new-metrics.html"
-      ).build());
+      ).build()).runOn(orchestrator);
   }
 
   /**
index 7a0f7b34c7ef067619584bbd8b6f583733a8a009..3678d33c348d06e934ef8f71e0ff6dbd0065bdf6 100644 (file)
@@ -45,7 +45,7 @@ public class PropertySetsTest {
       "/settings/PropertySetsTest/property-sets/all_types.html"
       ).build();
     // Use the old runner because it fails with the new Selenium runner
-    orchestrator.executeSelenese(selenese);
+    new SeleneseTest(selenese).runOn(orchestrator);
 
     // SSF-25 Check that the password has well be setted as now it does not appears in the html source code
     String sonarDemoValue = getProperty("sonar.demo");