geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kl...@apache.org
Subject [13/46] geode git commit: GEODE-2112: Fix UITests failing due to insufficient cleanup
Date Mon, 12 Dec 2016 22:36:16 GMT
http://git-wip-us.apache.org/repos/asf/geode/blob/190f3a21/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseBase.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseBase.java b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseBase.java
new file mode 100644
index 0000000..25bdef0
--- /dev/null
+++ b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseBase.java
@@ -0,0 +1,884 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ *
+ */
+package org.apache.geode.tools.pulse.tests.ui;
+
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_CLIENTS_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_FUNCTIONS_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_GCPAUSES_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_QUERIESPERSEC_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_READPERSEC_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_SUBSCRIPTION_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_UNIQUECQS_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_VIEW_GRID_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_VIEW_LABEL;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_VIEW_LOCATORS_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_VIEW_MEMBERS_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_VIEW_REGIONS_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.CLUSTER_WRITEPERSEC_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_COLOCATED_REGION;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_COLOCATED_REGION_NAME1;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_COLOCATED_REGION_NAME2;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_COLOCATED_REGION_NAME3;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_LABEL;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_REGION1_CHECKBOX;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_REGION2_CHECKBOX;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_REGION3_CHECKBOX;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_REGIONName1;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_REGIONName2;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_BROWSER_REGIONName3;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_DROPDOWN_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_VIEW_EMPTYNODES;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_VIEW_ENTRYCOUNT;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_VIEW_LABEL;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_VIEW_READPERSEC;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_VIEW_USEDMEMORY;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.DATA_VIEW_WRITEPERSEC;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.MEMBER_VIEW_CPUUSAGE_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.MEMBER_VIEW_JVMPAUSES_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.MEMBER_VIEW_LOADAVG_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.MEMBER_VIEW_OFFHEAPFREESIZE_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.MEMBER_VIEW_OFFHEAPUSEDSIZE_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.MEMBER_VIEW_READPERSEC_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.MEMBER_VIEW_REGION_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.MEMBER_VIEW_SOCKETS_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.MEMBER_VIEW_THREAD_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.MEMBER_VIEW_WRITEPERSEC_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.QUERY_STATISTICS_LABEL;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.REDUNDANCY_GRID_ID;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.REGION_NAME_LABEL;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.REGION_PATH_LABEL;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.REGION_PERSISTENCE_LABEL;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.REGION_TYPE_LABEL;
+import static org.apache.geode.tools.pulse.tests.ui.PulseTestConstants.SERVER_GROUP_GRID_ID;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.apache.geode.tools.pulse.internal.data.PulseConstants;
+import org.apache.geode.tools.pulse.tests.JMXProperties;
+import org.apache.geode.tools.pulse.tests.PulseTestLocators;
+import org.junit.Before;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.interactions.Actions;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.WebDriverWait;
+
+import java.io.BufferedReader;
+import java.io.FileReader;
+import java.io.IOException;
+import java.text.DecimalFormat;
+import java.util.List;
+
+/**
+ * If you try to run the Pulse UI Tests through your IDE without forking enabled, you will see
+ * jmxrmi exceptions. This is due to the implementation of org.apache.geode.tools.pulse.tests.Server
+ */
+public abstract class PulseBase {
+  public abstract WebDriver getWebDriver();
+
+  public abstract String getPulseURL();
+
+  @Before
+  public void setup() throws Exception {
+    // Make sure we go to the home page first
+    searchByXPathAndClick(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
+  }
+
+  protected void searchByLinkAndClick(String linkText) {
+    WebElement element = By.linkText(linkText).findElement(getWebDriver());
+    assertNotNull(element);
+    element.click();
+  }
+
+  protected void searchByIdAndClick(String id) {
+    WebElement element = getWebDriver().findElement(By.id(id));
+    assertNotNull(element);
+    element.click();
+  }
+
+  protected void searchByXPathAndClick(String xpath) {
+    WebElement element = getWebDriver().findElement(By.xpath(xpath));
+    assertNotNull(element);
+    element.click();
+  }
+
+  @Test
+  public void testClusterLocatorCount() throws IOException {
+    String clusterLocators = getWebDriver().findElement(By.id(CLUSTER_VIEW_LOCATORS_ID)).getText();
+
+    String totallocators = JMXProperties.getInstance().getProperty("server.S1.locatorCount");
+    assertEquals(totallocators, clusterLocators);
+  }
+
+  @Test
+  public void testClusterRegionCount() {
+    String clusterRegions = getWebDriver().findElement(By.id(CLUSTER_VIEW_REGIONS_ID)).getText();
+    String totalregions = JMXProperties.getInstance().getProperty("server.S1.totalRegionCount");
+    assertEquals(totalregions, clusterRegions);
+  }
+
+  @Test
+  public void testClusterMemberCount() {
+    String clusterMembers = getWebDriver().findElement(By.id(CLUSTER_VIEW_MEMBERS_ID)).getText();
+    String totalMembers = JMXProperties.getInstance().getProperty("server.S1.memberCount");
+    assertEquals(clusterMembers, totalMembers);
+  }
+
+  @Test
+  public void testClusterNumClient() {
+    String clusterClients = getWebDriver().findElement(By.id(CLUSTER_CLIENTS_ID)).getText();
+    String totalclients = JMXProperties.getInstance().getProperty("server.S1.numClients");
+    assertEquals(totalclients, clusterClients);
+  }
+
+  @Test
+  public void testClusterNumRunningFunction() {
+    String clusterFunctions = getWebDriver().findElement(By.id(CLUSTER_FUNCTIONS_ID)).getText();
+    String totalfunctions =
+        JMXProperties.getInstance().getProperty("server.S1.numRunningFunctions");
+    assertEquals(totalfunctions, clusterFunctions);
+  }
+
+  @Test
+  public void testClusterRegisteredCQCount() {
+    String clusterUniqueCQs = getWebDriver().findElement(By.id(CLUSTER_UNIQUECQS_ID)).getText();
+    String totaluniqueCQs = JMXProperties.getInstance().getProperty("server.S1.registeredCQCount");
+    assertEquals(totaluniqueCQs, clusterUniqueCQs);
+  }
+
+  @Test
+  public void testClusterNumSubscriptions() {
+    String clusterSubscriptions =
+        getWebDriver().findElement(By.id(CLUSTER_SUBSCRIPTION_ID)).getText();
+    String totalSubscriptions =
+        JMXProperties.getInstance().getProperty("server.S1.numSubscriptions");
+    assertEquals(totalSubscriptions, clusterSubscriptions);
+  }
+
+  @Test
+  public void testClusterJVMPausesWidget() {
+    String clusterJVMPauses = getWebDriver().findElement(By.id(CLUSTER_GCPAUSES_ID)).getText();
+    String totalgcpauses = JMXProperties.getInstance().getProperty("server.S1.jvmPauses");
+    assertEquals(totalgcpauses, clusterJVMPauses);
+  }
+
+  @Test
+  public void testClusterAverageWritesWidget() {
+    String clusterWritePerSec = getWebDriver().findElement(By.id(CLUSTER_WRITEPERSEC_ID)).getText();
+    String totalwritepersec = JMXProperties.getInstance().getProperty("server.S1.averageWrites");
+    assertEquals(totalwritepersec, clusterWritePerSec);
+  }
+
+  @Test
+  public void testClusterAverageReadsWidget() {
+    String clusterReadPerSec = getWebDriver().findElement(By.id(CLUSTER_READPERSEC_ID)).getText();
+    String totalreadpersec = JMXProperties.getInstance().getProperty("server.S1.averageReads");
+    assertEquals(totalreadpersec, clusterReadPerSec);
+  }
+
+  @Test
+  public void testClusterQuerRequestRateWidget() {
+    String clusterQueriesPerSec =
+        getWebDriver().findElement(By.id(CLUSTER_QUERIESPERSEC_ID)).getText();
+    String totalqueriespersec =
+        JMXProperties.getInstance().getProperty("server.S1.queryRequestRate");
+    assertEquals(totalqueriespersec, clusterQueriesPerSec);
+  }
+
+  @Test
+  public void testClusterGridViewMemberID() throws InterruptedException {
+    searchByIdAndClick("default_grid_button");
+    List<WebElement> elements =
+        getWebDriver().findElements(By.xpath("//table[@id='memberList']/tbody/tr"));
+
+    for (int memberCount = 1; memberCount < elements.size(); memberCount++) {
+      String memberId = getWebDriver()
+          .findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (memberCount + 1) + "]/td"))
+          .getText();
+      String propertMemeberId =
+          JMXProperties.getInstance().getProperty("member.M" + memberCount + ".id");
+      assertEquals(memberId, propertMemeberId);
+    }
+  }
+
+  @Test
+  public void testClusterGridViewMemberName() {
+    searchByIdAndClick("default_grid_button");
+    List<WebElement> elements =
+        getWebDriver().findElements(By.xpath("//table[@id='memberList']/tbody/tr"));
+    for (int memberNameCount = 1; memberNameCount < elements.size(); memberNameCount++) {
+      String gridMemberName = getWebDriver()
+          .findElement(
+              By.xpath("//table[@id='memberList']/tbody/tr[" + (memberNameCount + 1) + "]/td[2]"))
+          .getText();
+      String memberName =
+          JMXProperties.getInstance().getProperty("member.M" + memberNameCount + ".member");
+      assertEquals(gridMemberName, memberName);
+    }
+  }
+
+
+  @Test
+  public void testClusterGridViewMemberHost() {
+    searchByIdAndClick("default_grid_button");
+    List<WebElement> elements =
+        getWebDriver().findElements(By.xpath("//table[@id='memberList']/tbody/tr"));
+    for (int memberHostCount = 1; memberHostCount < elements.size(); memberHostCount++) {
+      String MemberHost = getWebDriver()
+          .findElement(
+              By.xpath("//table[@id='memberList']/tbody/tr[" + (memberHostCount + 1) + "]/td[3]"))
+          .getText();
+      String gridMemberHost =
+          JMXProperties.getInstance().getProperty("member.M" + memberHostCount + ".host");
+      assertEquals(gridMemberHost, MemberHost);
+    }
+  }
+
+  @Test
+  public void testClusterGridViewHeapUsage() {
+    searchByIdAndClick("default_grid_button");
+    for (int i = 1; i <= 3; i++) {
+      Float HeapUsage = Float.parseFloat(getWebDriver()
+          .findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (i + 1) + "]/td[5]"))
+          .getText());
+      Float gridHeapUsagestring =
+          Float.parseFloat(JMXProperties.getInstance().getProperty("member.M" + i + ".UsedMemory"));
+      assertEquals(gridHeapUsagestring, HeapUsage);
+    }
+  }
+
+  @Test
+  public void testClusterGridViewCPUUsage() throws Exception {
+    searchByIdAndClick("default_grid_button");
+    for (int i = 1; i <= 3; i++) {
+      String CPUUsage = getWebDriver()
+          .findElement(By.xpath("//table[@id='memberList']/tbody/tr[" + (i + 1) + "]/td[6]"))
+          .getText();
+      String gridCPUUsage = JMXProperties.getInstance().getProperty("member.M" + i + ".cpuUsage");
+      gridCPUUsage = gridCPUUsage.trim();
+      assertEquals(gridCPUUsage, CPUUsage);
+    }
+  }
+
+
+  public void testRgraphWidget() throws InterruptedException {
+    searchByIdAndClick("default_rgraph_button");
+    searchByIdAndClick("h1");
+    searchByIdAndClick("M1");
+  }
+
+  @Test
+  @Ignore("ElementNotVisible with phantomJS")
+  public void testMemberTotalRegionCount() throws InterruptedException {
+    testRgraphWidget();
+    String RegionCount = getWebDriver().findElement(By.id(MEMBER_VIEW_REGION_ID)).getText();
+    String memberRegionCount =
+        JMXProperties.getInstance().getProperty("member.M1.totalRegionCount");
+    assertEquals(memberRegionCount, RegionCount);
+  }
+
+  @Test
+  public void testMemberNumThread() throws InterruptedException {
+    searchByIdAndClick("default_grid_button");
+    searchByIdAndClick("M1&M1");
+    String ThreadCount = getWebDriver().findElement(By.id(MEMBER_VIEW_THREAD_ID)).getText();
+    String memberThreadCount = JMXProperties.getInstance().getProperty("member.M1.numThreads");
+    assertEquals(memberThreadCount, ThreadCount);
+  }
+
+  @Test
+  public void testMemberTotalFileDescriptorOpen() throws InterruptedException {
+    searchByIdAndClick("default_grid_button");
+    searchByIdAndClick("M1&M1");
+    String SocketCount = getWebDriver().findElement(By.id(MEMBER_VIEW_SOCKETS_ID)).getText();
+    String memberSocketCount =
+        JMXProperties.getInstance().getProperty("member.M1.totalFileDescriptorOpen");
+    assertEquals(memberSocketCount, SocketCount);
+  }
+
+  @Test
+  public void testMemberLoadAverage() throws InterruptedException {
+    searchByIdAndClick("default_grid_button");
+    searchByIdAndClick("M1&M1");
+    String LoadAvg = getWebDriver().findElement(By.id(MEMBER_VIEW_LOADAVG_ID)).getText();
+    String memberLoadAvg = JMXProperties.getInstance().getProperty("member.M1.loadAverage");
+    assertEquals(new DecimalFormat(PulseConstants.DECIMAL_FORMAT_PATTERN)
+        .format(Double.valueOf(memberLoadAvg)), LoadAvg);
+  }
+
+  @Ignore("WIP") // May be useful in near future
+  @Test
+  public void testOffHeapFreeSize() {
+
+    String OffHeapFreeSizeString =
+        getWebDriver().findElement(By.id(MEMBER_VIEW_OFFHEAPFREESIZE_ID)).getText();
+    String OffHeapFreeSizetemp = OffHeapFreeSizeString.replaceAll("[a-zA-Z]", "");
+    float OffHeapFreeSize = Float.parseFloat(OffHeapFreeSizetemp);
+    float memberOffHeapFreeSize =
+        Float.parseFloat(JMXProperties.getInstance().getProperty("member.M1.OffHeapFreeSize"));
+    if (memberOffHeapFreeSize < 1048576) {
+      memberOffHeapFreeSize = memberOffHeapFreeSize / 1024;
+
+    } else if (memberOffHeapFreeSize < 1073741824) {
+      memberOffHeapFreeSize = memberOffHeapFreeSize / 1024 / 1024;
+    } else {
+      memberOffHeapFreeSize = memberOffHeapFreeSize / 1024 / 1024 / 1024;
+    }
+    memberOffHeapFreeSize =
+        Float.parseFloat(new DecimalFormat("##.##").format(memberOffHeapFreeSize));
+    assertEquals(memberOffHeapFreeSize, OffHeapFreeSize);
+
+  }
+
+  @Ignore("WIP") // May be useful in near future
+  @Test
+  public void testOffHeapUsedSize() throws InterruptedException {
+
+    String OffHeapUsedSizeString =
+        getWebDriver().findElement(By.id(MEMBER_VIEW_OFFHEAPUSEDSIZE_ID)).getText();
+    String OffHeapUsedSizetemp = OffHeapUsedSizeString.replaceAll("[a-zA-Z]", "");
+    float OffHeapUsedSize = Float.parseFloat(OffHeapUsedSizetemp);
+    float memberOffHeapUsedSize =
+        Float.parseFloat(JMXProperties.getInstance().getProperty("member.M1.OffHeapUsedSize"));
+    if (memberOffHeapUsedSize < 1048576) {
+      memberOffHeapUsedSize = memberOffHeapUsedSize / 1024;
+
+    } else if (memberOffHeapUsedSize < 1073741824) {
+      memberOffHeapUsedSize = memberOffHeapUsedSize / 1024 / 1024;
+    } else {
+      memberOffHeapUsedSize = memberOffHeapUsedSize / 1024 / 1024 / 1024;
+    }
+    memberOffHeapUsedSize =
+        Float.parseFloat(new DecimalFormat("##.##").format(memberOffHeapUsedSize));
+    assertEquals(memberOffHeapUsedSize, OffHeapUsedSize);
+  }
+
+  @Test
+  public void testMemberJVMPauses() throws Exception {
+    searchByIdAndClick("default_grid_button");
+    searchByIdAndClick("M1&M1");
+    String JVMPauses = getWebDriver().findElement(By.id(MEMBER_VIEW_JVMPAUSES_ID)).getText();
+    String memberGcPausesAvg = JMXProperties.getInstance().getProperty("member.M1.JVMPauses");
+    assertEquals(memberGcPausesAvg, JVMPauses);
+  }
+
+  @Test
+  public void testMemberCPUUsage() {
+    searchByIdAndClick("default_grid_button");
+    searchByIdAndClick("M1&M1");
+    String CPUUsagevalue = getWebDriver().findElement(By.id(MEMBER_VIEW_CPUUSAGE_ID)).getText();
+    String memberCPUUsage = JMXProperties.getInstance().getProperty("member.M1.cpuUsage");
+    assertEquals(memberCPUUsage, CPUUsagevalue);
+  }
+
+  @Test // difference between UI and properties file
+  public void testMemberAverageReads() {
+    searchByIdAndClick("default_grid_button");
+    searchByIdAndClick("M1&M1");
+    float ReadPerSec =
+        Float.parseFloat(getWebDriver().findElement(By.id(MEMBER_VIEW_READPERSEC_ID)).getText());
+    float memberReadPerSec =
+        Float.parseFloat(JMXProperties.getInstance().getProperty("member.M1.averageReads"));
+    memberReadPerSec = Float.parseFloat(new DecimalFormat("##.##").format(memberReadPerSec));
+    assertEquals(memberReadPerSec, ReadPerSec, 0.001);
+  }
+
+  @Test
+  @Ignore("ElementNotVisible with phantomJS")
+  public void testMemberAverageWrites() throws InterruptedException {
+    testRgraphWidget();
+    String WritePerSec = getWebDriver().findElement(By.id(MEMBER_VIEW_WRITEPERSEC_ID)).getText();
+    String memberWritePerSec = JMXProperties.getInstance().getProperty("member.M1.averageWrites");
+    assertEquals(memberWritePerSec, WritePerSec);
+  }
+
+
+  @Test
+  @Ignore("ElementNotVisible with phantomJS")
+  public void testMemberGridViewData() throws InterruptedException {
+    testRgraphWidget();
+    searchByXPathAndClick(PulseTestLocators.MemberDetailsView.gridButtonXpath);
+    // get the number of rows on the grid
+    List<WebElement> noOfRows =
+        getWebDriver().findElements(By.xpath("//table[@id='memberRegionsList']/tbody/tr"));
+    String MemberRegionName = getWebDriver()
+        .findElement(By.xpath("//table[@id='memberRegionsList']/tbody/tr[2]/td[1]")).getText();
+    String memberRegionName = JMXProperties.getInstance().getProperty("region.R1.name");
+    assertEquals(memberRegionName, MemberRegionName);
+
+    String MemberRegionType = getWebDriver()
+        .findElement(By.xpath("//table[@id='memberRegionsList']/tbody/tr[2]/td[2]")).getText();
+    String memberRegionType = JMXProperties.getInstance().getProperty("region.R1.regionType");
+    assertEquals(memberRegionType, MemberRegionType);
+
+    String MemberRegionEntryCount = getWebDriver()
+        .findElement(By.xpath("//table[@id='memberRegionsList']/tbody/tr[2]/td[3]")).getText();
+    String memberRegionEntryCount =
+        JMXProperties.getInstance().getProperty("regionOnMember./R1.M1.entryCount");
+    assertEquals(memberRegionEntryCount, MemberRegionEntryCount);
+  }
+
+  @Test
+  public void testDropDownList() throws InterruptedException {
+    searchByIdAndClick("default_grid_button");
+    searchByIdAndClick("M1&M1");
+    searchByIdAndClick("memberName");
+    searchByLinkAndClick("M3");
+    searchByIdAndClick("memberName");
+    searchByLinkAndClick("M2");
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewRegionName() throws InterruptedException {
+    searchByLinkAndClick(DATA_VIEW_LABEL);
+    Thread.sleep(7000);
+    searchByIdAndClick("default_grid_button");
+    String regionName = getWebDriver().findElement(By.id(REGION_NAME_LABEL)).getText();
+    String dataviewregionname = JMXProperties.getInstance().getProperty("region.R1.name");
+    assertEquals(dataviewregionname, regionName);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewRegionPath() {
+    String regionPath = getWebDriver().findElement(By.id(REGION_PATH_LABEL)).getText();
+    String dataviewregionpath = JMXProperties.getInstance().getProperty("region.R1.fullPath");
+    assertEquals(dataviewregionpath, regionPath);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewRegionType() {
+    String regionType = getWebDriver().findElement(By.id(REGION_TYPE_LABEL)).getText();
+    String dataviewregiontype = JMXProperties.getInstance().getProperty("region.R1.regionType");
+    assertEquals(dataviewregiontype, regionType);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewEmptyNodes() {
+    String regionEmptyNodes = getWebDriver().findElement(By.id(DATA_VIEW_EMPTYNODES)).getText();
+    String dataviewEmptyNodes = JMXProperties.getInstance().getProperty("region.R1.emptyNodes");
+    assertEquals(dataviewEmptyNodes, regionEmptyNodes);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewSystemRegionEntryCount() {
+    String regionEntryCount = getWebDriver().findElement(By.id(DATA_VIEW_ENTRYCOUNT)).getText();
+    String dataviewEntryCount =
+        JMXProperties.getInstance().getProperty("region.R1.systemRegionEntryCount");
+    assertEquals(dataviewEntryCount, regionEntryCount);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewPersistentEnabled() {
+    String regionPersistence =
+        getWebDriver().findElement(By.id(REGION_PERSISTENCE_LABEL)).getText();
+    String dataviewregionpersistence =
+        JMXProperties.getInstance().getProperty("region.R1.persistentEnabled");
+    assertEquals(dataviewregionpersistence, regionPersistence);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewDiskWritesRate() {
+    String regionWrites = getWebDriver().findElement(By.id(DATA_VIEW_WRITEPERSEC)).getText();
+    String dataviewRegionWrites =
+        JMXProperties.getInstance().getProperty("region.R1.diskWritesRate");
+    assertEquals(dataviewRegionWrites, regionWrites);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewDiskReadsRate() {
+    String regionReads = getWebDriver().findElement(By.id(DATA_VIEW_READPERSEC)).getText();
+    String dataviewRegionReads = JMXProperties.getInstance().getProperty("region.R1.diskReadsRate");
+    assertEquals(dataviewRegionReads, regionReads);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewDiskUsage() {
+    String regionMemoryUsed = getWebDriver().findElement(By.id(DATA_VIEW_USEDMEMORY)).getText();
+    String dataviewMemoryUsed = JMXProperties.getInstance().getProperty("region.R1.diskUsage");
+    assertEquals(dataviewMemoryUsed, regionMemoryUsed);
+    searchByLinkAndClick(QUERY_STATISTICS_LABEL);
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataViewGridValue() {
+    String DataViewRegionName =
+        getWebDriver().findElement(By.xpath("//*[id('6')/x:td[1]]")).getText();
+    String dataViewRegionName = JMXProperties.getInstance().getProperty("region.R1.name");
+    assertEquals(dataViewRegionName, DataViewRegionName);
+
+    String DataViewRegionType =
+        getWebDriver().findElement(By.xpath("//*[id('6')/x:td[2]")).getText();
+    String dataViewRegionType = JMXProperties.getInstance().getProperty("region.R2.regionType");
+    assertEquals(dataViewRegionType, DataViewRegionType);
+
+    String DataViewEntryCount =
+        getWebDriver().findElement(By.xpath("//*[id('6')/x:td[3]")).getText();
+    String dataViewEntryCount =
+        JMXProperties.getInstance().getProperty("region.R2.systemRegionEntryCount");
+    assertEquals(dataViewEntryCount, DataViewEntryCount);
+
+    String DataViewEntrySize =
+        getWebDriver().findElement(By.xpath("//*[id('6')/x:td[4]")).getText();
+    String dataViewEntrySize = JMXProperties.getInstance().getProperty("region.R2.entrySize");
+    assertEquals(dataViewEntrySize, DataViewEntrySize);
+
+  }
+
+
+  public void loadDataBrowserpage() {
+    searchByLinkAndClick(DATA_BROWSER_LABEL);
+    // Thread.sleep(7000);
+  }
+
+  @Test
+  public void testDataBrowserRegionName() throws InterruptedException {
+    loadDataBrowserpage();
+    String DataBrowserRegionName1 =
+        getWebDriver().findElement(By.id(DATA_BROWSER_REGIONName1)).getText();
+    String databrowserRegionNametemp1 = JMXProperties.getInstance().getProperty("region.R1.name");
+    String databrowserRegionName1 = databrowserRegionNametemp1.replaceAll("[\\/]", "");
+    assertEquals(databrowserRegionName1, DataBrowserRegionName1);
+
+    String DataBrowserRegionName2 =
+        getWebDriver().findElement(By.id(DATA_BROWSER_REGIONName2)).getText();
+    String databrowserRegionNametemp2 = JMXProperties.getInstance().getProperty("region.R2.name");
+    String databrowserRegionName2 = databrowserRegionNametemp2.replaceAll("[\\/]", "");
+    assertEquals(databrowserRegionName2, DataBrowserRegionName2);
+
+    String DataBrowserRegionName3 =
+        getWebDriver().findElement(By.id(DATA_BROWSER_REGIONName3)).getText();
+    String databrowserRegionNametemp3 = JMXProperties.getInstance().getProperty("region.R3.name");
+    String databrowserRegionName3 = databrowserRegionNametemp3.replaceAll("[\\/]", "");
+    assertEquals(databrowserRegionName3, DataBrowserRegionName3);
+
+  }
+
+  @Test
+  public void testDataBrowserRegionMembersVerificaition() throws InterruptedException {
+    loadDataBrowserpage();
+    searchByIdAndClick(DATA_BROWSER_REGION1_CHECKBOX);
+    String DataBrowserMember1Name1 =
+        getWebDriver().findElement(By.xpath("//label[@for='Member0']")).getText();
+    String DataBrowserMember1Name2 =
+        getWebDriver().findElement(By.xpath("//label[@for='Member1']")).getText();
+    String DataBrowserMember1Name3 =
+        getWebDriver().findElement(By.xpath("//label[@for='Member2']")).getText();
+    String databrowserMember1Names = JMXProperties.getInstance().getProperty("region.R1.members");
+
+    String databrowserMember1Names1 = databrowserMember1Names.substring(0, 2);
+    assertEquals(databrowserMember1Names1, DataBrowserMember1Name1);
+
+    String databrowserMember1Names2 = databrowserMember1Names.substring(3, 5);
+    assertEquals(databrowserMember1Names2, DataBrowserMember1Name2);
+
+    String databrowserMember1Names3 = databrowserMember1Names.substring(6, 8);
+    assertEquals(databrowserMember1Names3, DataBrowserMember1Name3);
+    searchByIdAndClick(DATA_BROWSER_REGION1_CHECKBOX);
+
+    searchByIdAndClick(DATA_BROWSER_REGION2_CHECKBOX);
+    String DataBrowserMember2Name1 =
+        getWebDriver().findElement(By.xpath("//label[@for='Member0']")).getText();
+    String DataBrowserMember2Name2 =
+        getWebDriver().findElement(By.xpath("//label[@for='Member1']")).getText();
+    String databrowserMember2Names = JMXProperties.getInstance().getProperty("region.R2.members");
+
+    String databrowserMember2Names1 = databrowserMember2Names.substring(0, 2);
+    assertEquals(databrowserMember2Names1, DataBrowserMember2Name1);
+
+    String databrowserMember2Names2 = databrowserMember2Names.substring(3, 5);
+    assertEquals(databrowserMember2Names2, DataBrowserMember2Name2);
+    searchByIdAndClick(DATA_BROWSER_REGION2_CHECKBOX);
+
+    searchByIdAndClick(DATA_BROWSER_REGION3_CHECKBOX);
+    String DataBrowserMember3Name1 =
+        getWebDriver().findElement(By.xpath("//label[@for='Member0']")).getText();
+    String DataBrowserMember3Name2 =
+        getWebDriver().findElement(By.xpath("//label[@for='Member1']")).getText();
+    String databrowserMember3Names = JMXProperties.getInstance().getProperty("region.R3.members");
+
+    String databrowserMember3Names1 = databrowserMember3Names.substring(0, 2);
+    assertEquals(databrowserMember3Names1, DataBrowserMember3Name1);
+
+    String databrowserMember3Names2 = databrowserMember3Names.substring(3, 5);
+    assertEquals(databrowserMember3Names2, DataBrowserMember3Name2);
+    searchByIdAndClick(DATA_BROWSER_REGION3_CHECKBOX);
+  }
+
+  @Test
+  public void testDataBrowserColocatedRegions() throws InterruptedException {
+    loadDataBrowserpage();
+    String databrowserMemberNames1 = JMXProperties.getInstance().getProperty("region.R1.members");
+    String databrowserMemberNames2 = JMXProperties.getInstance().getProperty("region.R2.members");
+    String databrowserMemberNames3 = JMXProperties.getInstance().getProperty("region.R3.members");
+
+    if ((databrowserMemberNames1.matches(databrowserMemberNames2 + "(.*)"))) {
+      if ((databrowserMemberNames1.matches(databrowserMemberNames3 + "(.*)"))) {
+        if ((databrowserMemberNames2.matches(databrowserMemberNames3 + "(.*)"))) {
+          System.out.println("R1, R2 and R3 are colocated regions");
+        }
+      }
+    }
+    searchByIdAndClick(DATA_BROWSER_REGION1_CHECKBOX);
+    searchByLinkAndClick(DATA_BROWSER_COLOCATED_REGION);
+    String DataBrowserColocatedRegion1 =
+        getWebDriver().findElement(By.id(DATA_BROWSER_COLOCATED_REGION_NAME1)).getText();
+    String DataBrowserColocatedRegion2 =
+        getWebDriver().findElement(By.id(DATA_BROWSER_COLOCATED_REGION_NAME2)).getText();
+    String DataBrowserColocatedRegion3 =
+        getWebDriver().findElement(By.id(DATA_BROWSER_COLOCATED_REGION_NAME3)).getText();
+
+    String databrowserColocatedRegiontemp1 =
+        JMXProperties.getInstance().getProperty("region.R1.name");
+    String databrowserColocatedRegion1 = databrowserColocatedRegiontemp1.replaceAll("[\\/]", "");
+
+    String databrowserColocatedRegiontemp2 =
+        JMXProperties.getInstance().getProperty("region.R2.name");
+    String databrowserColocatedRegion2 = databrowserColocatedRegiontemp2.replaceAll("[\\/]", "");
+
+    String databrowserColocatedRegiontemp3 =
+        JMXProperties.getInstance().getProperty("region.R3.name");
+    String databrowserColocatedRegion3 = databrowserColocatedRegiontemp3.replaceAll("[\\/]", "");
+
+    assertEquals(databrowserColocatedRegion1, DataBrowserColocatedRegion1);
+    assertEquals(databrowserColocatedRegion2, DataBrowserColocatedRegion2);
+    assertEquals(databrowserColocatedRegion3, DataBrowserColocatedRegion3);
+
+  }
+
+  @Ignore("WIP") // clusterDetails element not found on Data Browser page. No assertions in test
+  @Test
+  public void testDataBrowserQueryValidation() throws IOException, InterruptedException {
+    loadDataBrowserpage();
+    WebElement textArea = getWebDriver().findElement(By.id("dataBrowserQueryText"));
+    textArea.sendKeys("query1");
+    WebElement executeButton = getWebDriver().findElement(By.id("btnExecuteQuery"));
+    executeButton.click();
+    String QueryResultHeader1 = getWebDriver()
+        .findElement(By.xpath("//div[@id='clusterDetails']/div/div/span[@class='n-title']"))
+        .getText();
+    double count = 0, countBuffer = 0, countLine = 0;
+    String lineNumber = "";
+    String filePath =
+        "E:\\springsource\\springsourceWS\\Pulse-Cedar\\src\\main\\resources\\testQueryResultSmall.txt";
+    BufferedReader br;
+    String line = "";
+    br = new BufferedReader(new FileReader(filePath));
+    while ((line = br.readLine()) != null) {
+      countLine++;
+      String[] words = line.split(" ");
+
+      for (String word : words) {
+        if (word.equals(QueryResultHeader1)) {
+          count++;
+          countBuffer++;
+        }
+      }
+    }
+  }
+
+  public void testTreeMapPopUpData(String S1, String gridIcon) {
+    for (int i = 1; i <= 3; i++) {
+      searchByLinkAndClick(CLUSTER_VIEW_LABEL);
+      if (gridIcon.equals(SERVER_GROUP_GRID_ID)) {
+        WebElement ServerGroupRadio =
+            getWebDriver().findElement(By.xpath("//label[@for='radio-servergroups']"));
+        ServerGroupRadio.click();
+      }
+      if (gridIcon.equals(REDUNDANCY_GRID_ID)) {
+        WebElement ServerGroupRadio =
+            getWebDriver().findElement(By.xpath("//label[@for='radio-redundancyzones']"));
+        ServerGroupRadio.click();
+      }
+      searchByIdAndClick(gridIcon);
+      WebElement TreeMapMember =
+          getWebDriver().findElement(By.xpath("//div[@id='" + S1 + "M" + (i) + "']/div"));
+      Actions builder = new Actions(getWebDriver());
+      builder.clickAndHold(TreeMapMember).perform();
+      int j = 1;
+      String CPUUsageM1temp = getWebDriver()
+          .findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div/div[2]/div")).getText();
+      String CPUUsageM1 = CPUUsageM1temp.replaceAll("[\\%]", "");
+      String cpuUsageM1 = JMXProperties.getInstance().getProperty("member.M" + (i) + ".cpuUsage");
+      assertEquals(cpuUsageM1, CPUUsageM1);
+
+      String MemoryUsageM1temp = getWebDriver()
+          .findElement(
+              By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 1) + "]/div[2]/div"))
+          .getText();
+      String MemoryUsageM1 = MemoryUsageM1temp.replaceAll("MB", "");
+      String memoryUsageM1 =
+          JMXProperties.getInstance().getProperty("member.M" + (i) + ".UsedMemory");
+      assertEquals(memoryUsageM1, MemoryUsageM1);
+
+      String LoadAvgM1 = getWebDriver()
+          .findElement(
+              By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 2) + "]/div[2]/div"))
+          .getText();
+      String loadAvgM1 = JMXProperties.getInstance().getProperty("member.M" + (i) + ".loadAverage");
+      assertEquals(new DecimalFormat(PulseConstants.DECIMAL_FORMAT_PATTERN)
+          .format(Double.valueOf(loadAvgM1)), LoadAvgM1);
+
+      String ThreadsM1 = getWebDriver()
+          .findElement(
+              By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 3) + "]/div[2]/div"))
+          .getText();
+      String threadsM1 = JMXProperties.getInstance().getProperty("member.M" + (i) + ".numThreads");
+      assertEquals(threadsM1, ThreadsM1);
+
+      String SocketsM1 = getWebDriver()
+          .findElement(
+              By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[" + (j + 4) + "]/div[2]/div"))
+          .getText();
+      String socketsM1 =
+          JMXProperties.getInstance().getProperty("member.M" + (i) + ".totalFileDescriptorOpen");
+      assertEquals(socketsM1, SocketsM1);
+      builder.moveToElement(TreeMapMember).release().perform();
+    }
+  }
+
+  @Test
+  public void testTopologyPopUpData() {
+    testTreeMapPopUpData("", CLUSTER_VIEW_GRID_ID);
+  }
+
+  @Test
+  public void testServerGroupTreeMapPopUpData() {
+    testTreeMapPopUpData("SG1(!)", SERVER_GROUP_GRID_ID);
+  }
+
+  @Test
+  public void testDataViewTreeMapPopUpData() {
+    searchByLinkAndClick(CLUSTER_VIEW_LABEL);
+    searchByLinkAndClick(DATA_DROPDOWN_ID);
+    WebElement TreeMapMember = getWebDriver().findElement(By.id("GraphTreeMapClusterData-canvas"));
+    Actions builder = new Actions(getWebDriver());
+    builder.clickAndHold(TreeMapMember).perform();
+    String RegionType = getWebDriver()
+        .findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div/div[2]/div")).getText();
+    String regionType = JMXProperties.getInstance().getProperty("region.R2.regionType");
+    assertEquals(regionType, RegionType);
+
+    String EntryCount = getWebDriver()
+        .findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[2]/div[2]/div")).getText();
+    String entryCount = JMXProperties.getInstance().getProperty("region.R2.systemRegionEntryCount");
+    assertEquals(entryCount, EntryCount);
+
+    String EntrySizetemp = getWebDriver()
+        .findElement(By.xpath("//div[@id='_tooltip']/div/div/div[2]/div[3]/div[2]/div")).getText();
+    float EntrySize = Float.parseFloat(EntrySizetemp);
+    float entrySize =
+        Float.parseFloat(JMXProperties.getInstance().getProperty("region.R2.entrySize"));
+    entrySize = entrySize / 1024 / 1024;
+    entrySize = Float.parseFloat(new DecimalFormat("##.####").format(entrySize));
+    assertEquals(entrySize, EntrySize, 0.001);
+    builder.moveToElement(TreeMapMember).release().perform();
+  }
+
+  @Test
+  public void testRegionViewTreeMapPopUpData() {
+    searchByLinkAndClick(CLUSTER_VIEW_LABEL);
+    searchByLinkAndClick(DATA_DROPDOWN_ID);
+    WebElement TreeMapMember = getWebDriver().findElement(By.id("GraphTreeMapClusterData-canvas"));
+    TreeMapMember.click();
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testNumberOfRegions() throws InterruptedException {
+
+    getWebDriver().findElement(By.xpath("//a[text()='Data Browser']")).click();
+
+    Thread.sleep(1000);
+    List<WebElement> regionList = getWebDriver().findElements(By.xpath("//ul[@id='treeDemo']/li"));
+    String regions = JMXProperties.getInstance().getProperty("regions");
+    String[] regionName = regions.split(" ");
+    for (String string : regionName) {
+    }
+    // JMXProperties.getInstance().getProperty("region.R1.regionType");
+    int i = 1;
+    for (WebElement webElement : regionList) {
+      // webElement.getAttribute(arg0)
+      i++;
+    }
+
+    getWebDriver().findElement(By.id("treeDemo_1_check")).click();
+
+    List<WebElement> memeberList =
+        getWebDriver().findElements(By.xpath("//ul[@id='membersList']/li"));
+    int j = 0;
+    for (WebElement webElement : memeberList) {
+      j++;
+    }
+  }
+
+  @Ignore("WIP")
+  @Test
+  public void testDataBrowser() {
+
+    getWebDriver().findElement(By.linkText("Data Browser")).click();
+    // WebElement dataBrowserLabel = getWebDriver().findElement(By.xpath(""));
+    WebDriverWait wait = new WebDriverWait(getWebDriver(), 20);
+    wait.until(ExpectedConditions
+        .visibilityOf(getWebDriver().findElement(By.xpath("//label[text()='Data Browser']"))));
+
+    // Verify all elements must be displayed on data browser screen
+    assertTrue(getWebDriver().findElement(By.xpath("//a[text()='Data Regions']")).isDisplayed());
+    assertTrue(getWebDriver().findElement(By.id("linkColocatedRegions")).isDisplayed());
+    assertTrue(getWebDriver().findElement(By.linkText("All Regions")).isDisplayed());
+
+    assertTrue(getWebDriver().findElement(By.xpath("//a[text()='Region Members']")).isDisplayed());
+
+    assertTrue(getWebDriver().findElement(By.xpath("//a[text()='Queries']")).isDisplayed());
+    assertTrue(
+        getWebDriver().findElement(By.xpath("//label[text()='Query Editor']")).isDisplayed());
+    assertTrue(getWebDriver().findElement(By.xpath("//label[text()='Result']")).isDisplayed());
+    assertTrue(
+        getWebDriver().findElement(By.xpath("//input[@value='Export Result']")).isDisplayed());
+    assertTrue(getWebDriver().findElement(By.id("btnExecuteQuery")).isDisplayed());
+    assertTrue(getWebDriver().findElement(By.xpath("//input[@value='Clear']")).isDisplayed());
+    assertTrue(getWebDriver().findElement(By.id("dataBrowserQueryText")).isDisplayed());
+
+    assertTrue(getWebDriver().findElement(By.id("historyIcon")).isDisplayed());
+
+    // Actual query execution
+
+    getWebDriver().findElement(By.id("dataBrowserQueryText")).sendKeys("Query1");
+
+    // Assert data regions are displayed
+    assertTrue(getWebDriver().findElement(By.id("treeDemo_1")).isDisplayed());
+  }
+
+  @Test
+  public void userCannotGetToPulseDetails() {
+    getWebDriver().get(getPulseURL() + "/pulse/pulseVersion");
+
+    assertTrue(getWebDriver().getPageSource().contains("sourceRevision"));
+  }
+}

http://git-wip-us.apache.org/repos/asf/geode/blob/190f3a21/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseBaseTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseBaseTest.java b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseBaseTest.java
deleted file mode 100644
index db6b630..0000000
--- a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseBaseTest.java
+++ /dev/null
@@ -1,730 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
- * agreements. See the NOTICE file distributed with this work for additional information regarding
- * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance with the License. You may obtain a
- * copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software distributed under the License
- * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
- * or implied. See the License for the specific language governing permissions and limitations under
- * the License.
- *
- */
-package org.apache.geode.tools.pulse.tests.ui;
-
-import static org.junit.Assert.*;
-
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.TreeMap;
-import java.util.concurrent.TimeUnit;
-
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.interactions.Actions;
-import org.openqa.selenium.support.ui.ExpectedConditions;
-import org.openqa.selenium.support.ui.WebDriverWait;
-
-import org.apache.geode.tools.pulse.tests.JMXProperties;
-import org.apache.geode.tools.pulse.tests.Member;
-import org.apache.geode.tools.pulse.tests.PulseTestData;
-import org.apache.geode.tools.pulse.tests.PulseTestLocators;
-import org.apache.geode.tools.pulse.tests.Region;
-
-public class PulseBaseTest {
-
-  public static int maxWaitTime = 20;
-
-  WebElement element = null;
-
-  public WebElement findElementUsingId(String id) {
-    return PulseAbstractTest.driver.findElement(By.id(id));
-  }
-
-  public WebElement findElementUsingXpath(String xpath) {
-    return PulseAbstractTest.driver.findElement(By.xpath(xpath));
-  }
-
-  public void clickElementUsingId(String id) {
-    findElementUsingId(id).click();
-  }
-
-  public void clickElementUsingXpath(String xpath) {
-    findElementUsingXpath(xpath).click();
-  }
-
-  public void enterTextUsingId(String id, String textToEnter) {
-    findElementUsingId(id).sendKeys(textToEnter);
-
-  }
-
-  public void enterTextUsingXpath(String xpath, String textToEnter) {
-    findElementUsingXpath(xpath).sendKeys(textToEnter);
-  }
-
-  public String getValueFromPropertiesFile(String key) {
-    return JMXProperties.getInstance().getProperty(key);
-  }
-
-  public void sendKeysUsingId(String Id, String textToEnter) {
-    findElementById(Id).sendKeys(textToEnter);
-  }
-
-  public void waitForElement(WebElement element) {
-    PulseAbstractTest.driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS);
-    WebDriverWait wait = new WebDriverWait(PulseAbstractTest.driver, 20);
-    wait.until(ExpectedConditions.visibilityOf(element));
-  }
-
-  public WebElement findElementById(String id) {
-    return PulseAbstractTest.driver.findElement(By.id(id));
-  }
-
-  public WebElement findElementByXpath(String xpath) {
-    return PulseAbstractTest.driver.findElement(By.xpath(xpath));
-  }
-
-  public String getTextUsingXpath(String xpath) {
-    return findElementByXpath(xpath).getText();
-  }
-
-  public String getTextUsingId(String id) {
-    return findElementById(id).getText();
-  }
-
-  public String getPersistanceEnabled(Region r) {
-    String persitance = null;
-
-    if (r.getPersistentEnabled()) {
-      persitance = "ON";
-    } else if (!r.getPersistentEnabled()) {
-      persitance = "OFF";
-    }
-    return persitance;
-  }
-
-  public String getPersistanceEnabled(String trueOrFalse) {
-    String persitance = null;
-
-    if (trueOrFalse.contains("true")) {
-      persitance = "ON";
-    } else if (trueOrFalse.contains("false")) {
-      persitance = "OFF";
-    }
-    return persitance;
-  }
-
-  public String HeapUsage(String valueInKB) {
-
-    return null;
-  }
-
-  // WIP - need to work on this --
-  public HashMap<String, HashMap<String, Region>> getRegionDetailsFromUI(String regionName) {
-
-    String[] regionNames = JMXProperties.getInstance().getProperty("regions").split(" ");
-    HashMap<String, HashMap<String, Region>> regionUiMap =
-        new HashMap<String, HashMap<String, Region>>();
-
-    for (String region : regionNames) {
-      HashMap<String, Region> regionMap = regionUiMap.get(region);
-    }
-
-    return regionUiMap;
-  }
-
-  public void validateServerGroupGridData() {
-    List<WebElement> serverGridRows =
-        PulseAbstractTest.driver.findElements(By.xpath("//table[@id='memberListSG']/tbody/tr"));
-    int rowsCount = serverGridRows.size();
-    String[][] gridDataFromUI = new String[rowsCount][7];
-
-    for (int j = 2, x = 0; j <= serverGridRows.size(); j++, x++) {
-      for (int i = 0; i <= 6; i++) {
-        gridDataFromUI[x][i] = PulseAbstractTest.driver
-            .findElement(
-                By.xpath("//table[@id='memberListSG']/tbody/tr[" + j + "]/td[" + (i + 1) + "]"))
-            .getText();
-      }
-    }
-
-    String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
-    HashMap<String, HashMap<String, Member>> sgMap = new HashMap<String, HashMap<String, Member>>();
-
-    for (String member : memberNames) {
-      Member thisMember = new Member(member);
-      String[] sgs = thisMember.getGroups();
-
-      for (String sgName : sgs) {
-        HashMap<String, Member> sgMembers = sgMap.get(sgName);
-        if (sgMembers == null) {
-          sgMembers = new HashMap<String, Member>();
-          sgMap.put(sgName, sgMembers);
-        }
-        sgMembers.put(thisMember.getMember(), thisMember);
-      }
-    }
-
-    for (int i = 0; i < gridDataFromUI.length - 1; i++) {
-      String sgName = gridDataFromUI[i][0];
-      String memName = gridDataFromUI[i][1];
-      Member m = sgMap.get(sgName).get(memName);
-
-      assertEquals(sgName, gridDataFromUI[i][0]);
-      assertEquals(memName, gridDataFromUI[i][1]);
-      assertEquals(m.getMember(), gridDataFromUI[i][2]);
-      assertEquals(m.getHost(), gridDataFromUI[i][3]);
-      String cupUsage = String.valueOf(m.getCpuUsage());
-      assertEquals(cupUsage, gridDataFromUI[i][5]);
-    }
-
-  }
-
-  public void validateRedundancyZonesGridData() {
-    List<WebElement> rzGridRows =
-        PulseAbstractTest.driver.findElements(By.xpath("//table[@id='memberListRZ']/tbody/tr"));
-    int rowsCount = rzGridRows.size();
-    String[][] gridDataFromUI = new String[rowsCount][7];
-
-    for (int j = 2, x = 0; j <= rzGridRows.size(); j++, x++) {
-      for (int i = 0; i <= 6; i++) {
-        gridDataFromUI[x][i] = PulseAbstractTest.driver
-            .findElement(
-                By.xpath("//table[@id='memberListRZ']/tbody/tr[" + j + "]/td[" + (i + 1) + "]"))
-            .getText();
-      }
-    }
-
-    String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
-    HashMap<String, HashMap<String, Member>> rzMap = new HashMap<String, HashMap<String, Member>>();
-
-    for (String member : memberNames) {
-      Member thisMember = new Member(member);
-      // String[] rz = thisMember.getRedundancyZone();
-      String sgName = thisMember.getRedundancyZone();
-
-      // for (String sgName : rz) {
-      HashMap<String, Member> rzMembers = rzMap.get(sgName);
-
-      if (rzMembers == null) {
-        rzMembers = new HashMap<String, Member>();
-        rzMap.put(sgName, rzMembers);
-      }
-
-      rzMembers.put(thisMember.getMember(), thisMember);
-      // }
-    }
-
-    for (int i = 0; i < gridDataFromUI.length - 1; i++) {
-      String sgName = gridDataFromUI[i][0];
-      String memName = gridDataFromUI[i][1];
-      Member m = rzMap.get(sgName).get(memName);
-
-      assertEquals(sgName, gridDataFromUI[i][0]);
-      assertEquals(memName, gridDataFromUI[i][1]);
-      assertEquals(m.getMember(), gridDataFromUI[i][2]);
-      assertEquals(m.getHost(), gridDataFromUI[i][3]);
-      String cupUsage = String.valueOf(m.getCpuUsage());
-      assertEquals(cupUsage, gridDataFromUI[i][5]);
-    }
-
-  }
-
-  public void validateTopologyGridData() {
-    List<WebElement> rzGridRows =
-        PulseAbstractTest.driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr"));
-    int rowsCount = rzGridRows.size();
-    String[][] gridDataFromUI = new String[rowsCount][8];
-
-    for (int j = 2, x = 0; j <= rzGridRows.size(); j++, x++) {
-      for (int i = 0; i <= 7; i++) {
-        gridDataFromUI[x][i] = PulseAbstractTest.driver
-            .findElement(
-                By.xpath("//table[@id='memberList']/tbody/tr[" + j + "]/td[" + (i + 1) + "]"))
-            .getText();
-      }
-    }
-
-    String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
-    HashMap<String, Member> tpMap = new HashMap<String, Member>();
-
-    for (String member : memberNames) {
-      Member thisMember = new Member(member);
-      tpMap.put(thisMember.getMember(), thisMember);
-
-    }
-
-    for (int i = 0; i < gridDataFromUI.length - 1; i++) {
-
-      String memName = gridDataFromUI[i][0];
-      Member m = tpMap.get(memName);
-
-      assertEquals(m.getMember(), gridDataFromUI[i][0]);
-      assertEquals(m.getMember(), gridDataFromUI[i][1]);
-      assertEquals(m.getHost(), gridDataFromUI[i][2]);
-      String cupUsage = String.valueOf(m.getCpuUsage());
-      assertEquals(cupUsage, gridDataFromUI[i][5]);
-    }
-  }
-
-  public void validateDataPrespectiveGridData() {
-    List<WebElement> serverGridRows =
-        PulseAbstractTest.driver.findElements(By.xpath("//table[@id='regionsList']/tbody/tr"));
-    int rowsCount = serverGridRows.size();
-    String[][] gridDataFromUI = new String[rowsCount][7];
-
-    for (int j = 2, x = 0; j <= serverGridRows.size(); j++, x++) {
-      for (int i = 0; i <= 6; i++) {
-        if (i < 5) {
-          gridDataFromUI[x][i] = PulseAbstractTest.driver
-              .findElement(
-                  By.xpath("//table[@id='regionsList']/tbody/tr[" + j + "]/td[" + (i + 1) + "]"))
-              .getText();
-        } else if (i == 5) {
-          gridDataFromUI[x][i] = PulseAbstractTest.driver
-              .findElement(
-                  By.xpath("//table[@id='regionsList']/tbody/tr[" + j + "]/td[" + (i + 4) + "]"))
-              .getText();
-        }
-      }
-    }
-
-    String[] regionNames = JMXProperties.getInstance().getProperty("regions").split(" ");
-    HashMap<String, Region> dataMap = new HashMap<String, Region>();
-
-    for (String region : regionNames) {
-      Region thisRegion = new Region(region);
-      dataMap.put(thisRegion.getName(), thisRegion);
-
-    }
-
-    for (int i = 0; i < gridDataFromUI.length - 1; i++) {
-      String memName = gridDataFromUI[i][0];
-      Region r = dataMap.get(memName);
-
-      assertEquals(r.getName(), gridDataFromUI[i][0]);
-      assertEquals(r.getRegionType(), gridDataFromUI[i][1]);
-
-      assertEquals(String.valueOf(r.getSystemRegionEntryCount()), gridDataFromUI[i][2]);
-      assertEquals(r.getFullPath(), gridDataFromUI[i][4]);
-      assertEquals(getPersistanceEnabled(r), gridDataFromUI[i][5]);
-    }
-  }
-
-  public void validateRegionDetailsGridData() {
-    List<WebElement> serverGridRows =
-        PulseAbstractTest.driver.findElements(By.xpath("//table[@id='memberList']/tbody/tr"));
-    int rowsCount = serverGridRows.size();
-    String[][] gridDataFromUI = new String[rowsCount][7];
-
-    for (int j = 2, x = 0; j <= serverGridRows.size(); j++, x++) {
-      for (int i = 0; i < 2; i++) {
-        gridDataFromUI[x][i] = PulseAbstractTest.driver
-            .findElement(
-                By.xpath("//table[@id='memberList']/tbody/tr[" + j + "]/td[" + (i + 1) + "]"))
-            .getText();
-      }
-    }
-
-    String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
-    HashMap<String, Member> tpMap = new HashMap<String, Member>();
-
-    for (String member : memberNames) {
-      Member thisMember = new Member(member);
-      tpMap.put(thisMember.getMember(), thisMember);
-    }
-
-    for (int i = 0; i < gridDataFromUI.length - 1; i++) {
-
-      String memName = gridDataFromUI[i][0];
-      Member m = tpMap.get(memName);
-      assertEquals(m.getMember(), gridDataFromUI[i][0]);
-    }
-
-  }
-
-  public void navigateToToplogyView() {
-    clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    clickElementUsingXpath(PulseTestLocators.TopologyView.radioButtonXpath);
-  }
-
-  public void navigateToServerGroupGView() {
-    clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    clickElementUsingXpath(PulseTestLocators.ServerGroups.radioButtonXpath);
-  }
-
-  public void navigateToRedundancyZoneView() {
-    clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    clickElementUsingXpath(PulseTestLocators.RedundancyZone.radioButtonXpath);
-  }
-
-  // ------ Topology / Server Group / Redundancy Group - Tree View
-
-  public void navigateToTopologyTreeView() {
-    navigateToToplogyView();
-    clickElementUsingId(PulseTestLocators.TopologyView.treeMapButtonId);
-  }
-
-  public void navigateToServerGroupTreeView() {
-    clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    clickElementUsingXpath(PulseTestLocators.ServerGroups.radioButtonXpath);
-  }
-
-  public void navigateToRedundancyZonesTreeView() {
-    clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    clickElementUsingXpath(PulseTestLocators.RedundancyZone.radioButtonXpath);
-  }
-
-  // ------ Topology / Server Group / Redundancy Group - Grid View
-
-  public void navigateToTopologyGridView() {
-    clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    clickElementUsingXpath(PulseTestLocators.TopologyView.radioButtonXpath);
-    clickElementUsingId(PulseTestLocators.TopologyView.gridButtonId);
-  }
-
-  public void navigateToServerGroupGridView() {
-    clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    clickElementUsingXpath(PulseTestLocators.ServerGroups.radioButtonXpath);
-    clickElementUsingId(PulseTestLocators.ServerGroups.gridButtonId);
-  }
-
-  public void navigateToRedundancyZonesGridView() {
-    clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    clickElementUsingXpath(PulseTestLocators.RedundancyZone.radioButtonXpath);
-    clickElementUsingId(PulseTestLocators.RedundancyZone.gridButtonId);
-  }
-
-  // ----- Data perspective / region details
-
-  public void navigateToDataPrespectiveGridView() {
-    clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    clickElementUsingXpath(PulseTestLocators.DataPerspectiveView.downarrowButtonXpath);
-    clickElementUsingXpath(PulseTestLocators.DataPerspectiveView.dataViewButtonXpath);
-    clickElementUsingId(PulseTestLocators.DataPerspectiveView.gridButtonId);
-  }
-
-  public void navigateToRegionDetailsView() {
-    clickElementUsingXpath(PulseTestLocators.TopNavigation.clusterViewLinkXpath);
-    clickElementUsingXpath(PulseTestLocators.DataPerspectiveView.downarrowButtonXpath);
-    clickElementUsingXpath(PulseTestLocators.DataPerspectiveView.dataViewButtonXpath);
-    // clickElementUsingXpath(PulseTestLocators.RegionDetailsView.regionNameXpath);
-    // // WIP - region navigation defect needs to fixed
-    clickElementUsingXpath(PulseTestLocators.RegionDetailsView.treeMapCanvasXpath);
-  }
-
-  public void navigateToRegionDetailsGridView() {
-    navigateToRegionDetailsView();
-    clickElementUsingXpath(PulseTestLocators.RegionDetailsView.gridButtonXpath);
-  }
-
-  public String getPropertyValue(String propertyKey) {
-    String propertyValue = JMXProperties.getInstance().getProperty(propertyKey);
-    return propertyValue;
-  }
-
-  public void verifyElementPresentById(String id) {
-    WebDriverWait wait = new WebDriverWait(PulseAbstractTest.driver, maxWaitTime, 500);
-    wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.id(id)));
-  }
-
-  public void verifyElementPresentByLinkText(String lnkText) {
-    WebDriverWait wait = new WebDriverWait(PulseAbstractTest.driver, maxWaitTime, 500);
-    wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.linkText(lnkText)));
-  }
-
-  public void verifyElementPresentByXpath(String xpath) {
-    WebDriverWait wait = new WebDriverWait(PulseAbstractTest.driver, maxWaitTime, 500);
-    wait.until(ExpectedConditions.presenceOfAllElementsLocatedBy(By.xpath(xpath)));
-  }
-
-  public void verifyTextPresrntById(String id, String text) {
-    WebDriverWait wait = new WebDriverWait(PulseAbstractTest.driver, maxWaitTime, 500);
-    wait.until(ExpectedConditions.textToBePresentInElementLocated(By.id(id), text));
-  }
-
-  public void verifyTextPresrntByXpath(String xpath, String text) {
-    WebDriverWait wait = new WebDriverWait(PulseAbstractTest.driver, maxWaitTime, 500);
-    wait.until(ExpectedConditions.textToBePresentInElementLocated(By.xpath(xpath), text));
-  }
-
-  public void verifyElementAttributeById(String id, String attribute, String value) {
-    String actualValue = findElementById(id).getAttribute(attribute);
-    assertTrue(actualValue.equals(value) || actualValue.contains(value));
-  }
-
-
-  public void mouseReleaseById(String id) {
-    verifyElementPresentById(id);
-    Actions action = new Actions(PulseAbstractTest.driver);
-    WebElement we = PulseAbstractTest.driver.findElement(By.id(id));
-    action.moveToElement(we).release().perform();
-  }
-
-  public void mouseClickAndHoldOverElementById(String id) {
-    verifyElementPresentById(id);
-    Actions action = new Actions(PulseAbstractTest.driver);
-    WebElement we = PulseAbstractTest.driver.findElement(By.id(id));
-    action.moveToElement(we).clickAndHold().perform();
-  }
-
-  public void mouseOverElementByXpath(String xpath) {
-    Actions action = new Actions(PulseAbstractTest.driver);
-    WebElement we = PulseAbstractTest.driver.findElement(By.xpath(xpath));
-    action.moveToElement(we).build().perform();
-  }
-
-
-  public float stringToFloat(String stringValue) {
-    float floatNum = Float.parseFloat(stringValue);
-    return floatNum;
-  }
-
-  public String floatToString(float floatValue) {
-    String stringValue = Float.toString(floatValue);
-    return stringValue;
-  }
-
-
-  public String[] splitString(String stringToSplit, String splitDelimiter) {
-    String[] stringArray = stringToSplit.split(splitDelimiter);
-    return stringArray;
-  }
-
-  public void assertMemberSortingByCpuUsage() {
-    Map<Double, String> memberMap = new TreeMap<>(Collections.reverseOrder());
-    String[] membersNames = splitString(JMXProperties.getInstance().getProperty("members"), " ");
-    for (String member : membersNames) {
-      Member thisMember = new Member(member);
-      memberMap.put(thisMember.getCpuUsage(), thisMember.getMember());
-    }
-    for (Map.Entry<Double, String> entry : memberMap.entrySet()) {
-      // here matching painting style to validation that the members are painted according to their
-      // cpu usage
-      String refMemberCPUUsage = null;
-      if (entry.getValue().equalsIgnoreCase("M1")) {
-        refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM1;
-      } else if (entry.getValue().equalsIgnoreCase("M2")) {
-        refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM2;
-      } else {
-        refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM3;
-      }
-      assertTrue(
-          findElementById(entry.getValue()).getAttribute("style").contains(refMemberCPUUsage));
-    }
-  }
-
-  public void assertMemberSortingByHeapUsage() {
-    Map<Long, String> memberMap = new TreeMap<Long, String>(Collections.reverseOrder());
-    String[] membersNames = splitString(JMXProperties.getInstance().getProperty("members"), " ");
-    for (String member : membersNames) {
-      Member thisMember = new Member(member);
-      memberMap.put(thisMember.getCurrentHeapSize(), thisMember.getMember());
-    }
-    for (Map.Entry<Long, String> entry : memberMap.entrySet()) {
-      // here matching painting style to validation that the members are painted according to their
-      // cpu usage
-      String refMemberHeapUsage = null;
-      if (entry.getValue().equalsIgnoreCase("M1")) {
-        refMemberHeapUsage = PulseTestData.Topology.heapUsagePaintStyleM1;
-      } else if (entry.getValue().equalsIgnoreCase("M2")) {
-        refMemberHeapUsage = PulseTestData.Topology.heapUsagePaintStyleM2;
-      } else {
-        refMemberHeapUsage = PulseTestData.Topology.heapUsagePaintStyleM3;
-      }
-      assertTrue(
-          findElementById(entry.getValue()).getAttribute("style").contains(refMemberHeapUsage));
-    }
-  }
-
-  public void assertMemberSortingBySGCpuUsage() {
-    Map<Double, String> memberMap = new TreeMap<>(Collections.reverseOrder());
-    String[] membersNames = splitString(JMXProperties.getInstance().getProperty("members"), " ");
-    for (String member : membersNames) {
-      Member thisMember = new Member(member);
-      memberMap.put(thisMember.getCpuUsage(), thisMember.getMember());
-    }
-    for (Map.Entry<Double, String> entry : memberMap.entrySet()) {
-      // here matching painting style to validation that the members are painted according to their
-      // cpu usage
-      String refMemberCPUUsage = null;
-      if (entry.getValue().equalsIgnoreCase("M1")) {
-        refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM1;
-      } else if (entry.getValue().equalsIgnoreCase("M2")) {
-        refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM2;
-      } else {
-        refMemberCPUUsage = PulseTestData.Topology.cpuUsagePaintStyleM3;
-      }
-      assertTrue(
-          findElementById(entry.getValue()).getAttribute("style").contains(refMemberCPUUsage));
-    }
-  }
-
-
-  public void assertMemberSortingBySgHeapUsage() {
-    String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
-    HashMap<String, HashMap<String, Member>> sgMap = new HashMap<String, HashMap<String, Member>>();
-    for (String member : memberNames) {
-      Member thisMember = new Member(member);
-      String[] sgs = thisMember.getGroups();
-
-      for (String sgName : sgs) {
-        HashMap<String, Member> sgMembers = sgMap.get(sgName);
-        if (sgMembers == null) {
-          sgMembers = new HashMap<String, Member>();
-          sgMap.put(sgName, sgMembers);
-        }
-        sgMembers.put(thisMember.getMember(), thisMember);
-      }
-    }
-    Map<Float, String> memberMap = new TreeMap<Float, String>(Collections.reverseOrder());
-
-    for (int sgId = 1; sgId <= 3; sgId++) {
-      String sgName = "SG1";
-      String memName = "M" + sgId;
-      Member m = sgMap.get(sgName).get(memName);
-      memberMap.put((float) m.getCurrentHeapSize(), m.getMember());
-    }
-
-    for (Map.Entry<Float, String> entry : memberMap.entrySet()) {
-      // here matching painting style to validation that the members are painted according to their
-      // cpu usage
-      String refMemberCPUUsage = null;
-      if (entry.getValue().equalsIgnoreCase("M1")) {
-        refMemberCPUUsage = PulseTestData.ServerGroups.heapUsagePaintStyleSG1M1;
-      } else if (entry.getValue().equalsIgnoreCase("M2")) {
-        refMemberCPUUsage = PulseTestData.ServerGroups.heapUsagePaintStyleSG1M2;
-      } else {
-        refMemberCPUUsage = PulseTestData.ServerGroups.heapUsagePaintStyleSG1M3;
-      }
-      assertTrue(findElementById("SG1(!)" + entry.getValue()).getAttribute("style")
-          .contains(refMemberCPUUsage));
-    }
-  }
-
-
-
-  public void assertMemberSortingBySgCpuUsage() {
-    String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
-    HashMap<String, HashMap<String, Member>> sgMap = new HashMap<String, HashMap<String, Member>>();
-    for (String member : memberNames) {
-      Member thisMember = new Member(member);
-      String[] sgs = thisMember.getGroups();
-
-      for (String sgName : sgs) {
-        HashMap<String, Member> sgMembers = sgMap.get(sgName);
-        if (sgMembers == null) {
-          sgMembers = new HashMap<String, Member>();
-          sgMap.put(sgName, sgMembers);
-        }
-        sgMembers.put(thisMember.getMember(), thisMember);
-      }
-    }
-    Map<Double, String> memberMap = new TreeMap<>(Collections.reverseOrder());
-    // SG3(!)M3
-    for (int sgId = 1; sgId <= 3; sgId++) {
-      String sgName = "SG1";
-      String memName = "M" + sgId;
-      Member m = sgMap.get(sgName).get(memName);
-      memberMap.put(m.getCpuUsage(), m.getMember());
-    }
-
-    for (Map.Entry<Double, String> entry : memberMap.entrySet()) {
-      // here matching painting style to validation that the members are painted according to their
-      // cpu usage
-      String refMemberCPUUsage = null;
-      if (entry.getValue().equalsIgnoreCase("M1")) {
-        refMemberCPUUsage = PulseTestData.ServerGroups.cpuUsagePaintStyleSG1M1;
-      } else if (entry.getValue().equalsIgnoreCase("M2")) {
-        refMemberCPUUsage = PulseTestData.ServerGroups.cpuUsagePaintStyleSG1M2;
-      } else {
-        refMemberCPUUsage = PulseTestData.ServerGroups.cpuUsagePaintStyleSG1M3;
-      }
-      assertTrue(findElementById("SG1(!)" + entry.getValue()).getAttribute("style")
-          .contains(refMemberCPUUsage));
-    }
-  }
-
-  public void assertMemberSortingByRzHeapUsage() {
-    String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
-    HashMap<String, HashMap<String, Member>> rzMap = new HashMap<String, HashMap<String, Member>>();
-    for (String member : memberNames) {
-      Member thisMember = new Member(member);
-      String sgName = thisMember.getRedundancyZone();
-      HashMap<String, Member> rzMembers = rzMap.get(sgName);
-
-      if (rzMembers == null) {
-        rzMembers = new HashMap<String, Member>();
-        rzMap.put(sgName, rzMembers);
-      }
-
-      rzMembers.put(thisMember.getMember(), thisMember);
-    }
-    Map<Float, String> memberMap = new TreeMap<Float, String>(Collections.reverseOrder());
-    String rzName = "RZ1 RZ2";
-    String memName = "M1";
-    Member m = rzMap.get(rzName).get(memName);
-    memberMap.put((float) m.getCurrentHeapSize(), m.getMember());
-
-    for (Map.Entry<Float, String> entry : memberMap.entrySet()) {
-      // here matching painting style to validation that the members are painted according to their
-      // cpu usage
-      String refMemberHeapUsage = null;
-      if (entry.getValue().equalsIgnoreCase("M1")) {
-        refMemberHeapUsage = PulseTestData.RedundancyZone.heapUsagePaintStyleRZ1RZ2M1;
-      } else if (entry.getValue().equalsIgnoreCase("M2")) {
-        refMemberHeapUsage = PulseTestData.RedundancyZone.heapUsagePaintStyleRZ1RZ2M2;
-      } else {
-        refMemberHeapUsage = PulseTestData.RedundancyZone.heapUsagePaintStyleRZ3M3;
-      }
-      assertTrue(findElementById("RZ1 RZ2(!)" + entry.getValue()).getAttribute("style")
-          .contains(refMemberHeapUsage));
-    }
-  }
-
-  public void assertMemeberSortingByRzCpuUsage() {
-    String[] memberNames = JMXProperties.getInstance().getProperty("members").split(" ");
-    HashMap<String, HashMap<String, Member>> rzMap = new HashMap<String, HashMap<String, Member>>();
-    for (String member : memberNames) {
-      Member thisMember = new Member(member);
-      String sgName = thisMember.getRedundancyZone();
-      HashMap<String, Member> rzMembers = rzMap.get(sgName);
-
-      if (rzMembers == null) {
-        rzMembers = new HashMap<String, Member>();
-        rzMap.put(sgName, rzMembers);
-      }
-
-      rzMembers.put(thisMember.getMember(), thisMember);
-    }
-    Map<Double, String> memberMap = new TreeMap<>(Collections.reverseOrder());
-    String rzName = "RZ1 RZ2";
-    String memName = "M1";
-    Member m = rzMap.get(rzName).get(memName);
-    memberMap.put(m.getCpuUsage(), m.getMember());
-
-    for (Map.Entry<Double, String> entry : memberMap.entrySet()) {
-      // here matching painting style to validation that the members are painted according to their
-      // cpu usage
-      String refMemberCPUUsage = null;
-      if (entry.getValue().equalsIgnoreCase("M1")) {
-        refMemberCPUUsage = PulseTestData.RedundancyZone.cpuUsagePaintStyleRZ1RZ2M1;
-      } else if (entry.getValue().equalsIgnoreCase("M2")) {
-        refMemberCPUUsage = PulseTestData.RedundancyZone.cpuUsagePaintStyleRZ1RZ2M2;
-      }
-      assertTrue(findElementById("RZ1 RZ2(!)" + entry.getValue()).getAttribute("style")
-          .contains(refMemberCPUUsage));
-    }
-  }
-
-  public List<WebElement> getRegionsFromDataBrowser() {
-    List<WebElement> regionList = PulseAbstractTest.driver
-        .findElements(By.xpath("//span[starts-with(@ID,'treeDemo_')][contains(@id,'_span')]"));
-    return regionList;
-  }
-}

http://git-wip-us.apache.org/repos/asf/geode/blob/190f3a21/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseNoAuthTest.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseNoAuthTest.java b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseNoAuthTest.java
index a96061a..adcb50f 100644
--- a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseNoAuthTest.java
+++ b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseNoAuthTest.java
@@ -16,17 +16,40 @@
 package org.apache.geode.tools.pulse.tests.ui;
 
 import org.apache.geode.test.junit.categories.UITest;
+import org.apache.geode.tools.pulse.tests.rules.ServerRule;
+import org.apache.geode.tools.pulse.tests.rules.WebDriverRule;
+import org.junit.Before;
 import org.junit.BeforeClass;
+import org.junit.ClassRule;
 import org.junit.FixMethodOrder;
+import org.junit.Rule;
 import org.junit.experimental.categories.Category;
 import org.junit.runners.MethodSorters;
+import org.openqa.selenium.WebDriver;
 
 @Category(UITest.class)
 @FixMethodOrder(MethodSorters.JVM)
-public class PulseNoAuthTest extends PulseAbstractTest {
+public class PulseNoAuthTest extends PulseBase {
 
-  @BeforeClass
-  public static void beforeClassSetup() throws Exception {
-    setUpServer("admin", "admin", null);
+  @ClassRule
+  public static ServerRule serverRule = new ServerRule(null);
+
+  @Rule
+  public WebDriverRule webDriverRule =
+      new WebDriverRule("admin", "admin", serverRule.getPulseURL());
+
+  @Override
+  public WebDriver getWebDriver() {
+    return webDriverRule.getDriver();
+  }
+
+  @Override
+  public String getPulseURL() {
+    return serverRule.getPulseURL();
+  }
+
+  @Before
+  public void setupPulseTestUtils() {
+    PulseTestUtils.setDriverProvider(() -> webDriverRule.getDriver());
   }
 }

http://git-wip-us.apache.org/repos/asf/geode/blob/190f3a21/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseTestConstants.java
----------------------------------------------------------------------
diff --git a/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseTestConstants.java b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseTestConstants.java
new file mode 100644
index 0000000..f0513bd
--- /dev/null
+++ b/geode-pulse/src/test/java/org/apache/geode/tools/pulse/tests/ui/PulseTestConstants.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ *
+ */
+
+package org.apache.geode.tools.pulse.tests.ui;
+
+public class PulseTestConstants {
+  public static final String DATA_VIEW_LABEL = "Data View";
+  public static final String CLUSTER_VIEW_MEMBERS_ID = "clusterTotalMembersText";
+  public static final String CLUSTER_VIEW_LOCATORS_ID = "clusterLocatorsText";
+  public static final String CLUSTER_VIEW_REGIONS_ID = "clusterTotalRegionsText";
+  public static final String CLUSTER_CLIENTS_ID = "clusterClientsText";
+  public static final String CLUSTER_FUNCTIONS_ID = "clusterFunctions";
+  public static final String CLUSTER_UNIQUECQS_ID = "clusterUniqueCQs";
+  public static final String CLUSTER_SUBSCRIPTION_ID = "clusterSubscriptionsText";
+  public static final String CLUSTER_GCPAUSES_ID = "currentGCPauses";
+  public static final String CLUSTER_WRITEPERSEC_ID = "writePerSec";
+  public static final String CLUSTER_READPERSEC_ID = "readPerSec";
+  public static final String CLUSTER_QUERIESPERSEC_ID = "queriesPerSec";
+  public static final String MEMBER_VIEW_REGION_ID = "memberRegionsCount";
+  public static final String MEMBER_VIEW_THREAD_ID = "threads";
+  public static final String MEMBER_VIEW_SOCKETS_ID = "sockets";
+  public static final String MEMBER_VIEW_LOADAVG_ID = "loadAverage";
+  public static final String MEMBER_VIEW_JVMPAUSES_ID = "memberGcPausesAvg";
+  public static final String MEMBER_VIEW_CPUUSAGE_ID = "memberCPUUsageValue";
+  public static final String MEMBER_VIEW_READPERSEC_ID = "memberGetsPerSecValue";
+  public static final String MEMBER_VIEW_WRITEPERSEC_ID = "memberPutsPerSecValue";
+  public static final String MEMBER_VIEW_OFFHEAPFREESIZE_ID = "offHeapFreeSize";
+  public static final String MEMBER_VIEW_OFFHEAPUSEDSIZE_ID = "offHeapUsedSize";
+
+  public static final String REGION_NAME_LABEL = "regionName";
+  public static final String REGION_PATH_LABEL = "regionPath";
+  public static final String REGION_TYPE_LABEL = "regionType";
+  public static final String DATA_VIEW_WRITEPERSEC = "regionWrites";
+  public static final String DATA_VIEW_READPERSEC = "regionReads";
+  public static final String DATA_VIEW_EMPTYNODES = "regionEmptyNodes";
+  public static final String DATA_VIEW_ENTRYCOUNT = "regionEntryCount";
+  public static final String REGION_PERSISTENCE_LABEL = "regionPersistence";
+  public static final String DATA_VIEW_USEDMEMORY = "memoryUsed";
+
+  public static final String DATA_BROWSER_LABEL = "Data Browser";
+  public static final String DATA_BROWSER_REGIONName1 = "treeDemo_1_span";
+  public static final String DATA_BROWSER_REGIONName2 = "treeDemo_2_span";
+  public static final String DATA_BROWSER_REGIONName3 = "treeDemo_3_span";
+  public static final String DATA_BROWSER_REGION1_CHECKBOX = "treeDemo_1_check";
+  public static final String DATA_BROWSER_REGION2_CHECKBOX = "treeDemo_2_check";
+  public static final String DATA_BROWSER_REGION3_CHECKBOX = "treeDemo_3_check";
+  public static final String DATA_BROWSER_COLOCATED_REGION = "Colocated Regions";
+  public static final String DATA_BROWSER_COLOCATED_REGION_NAME1 = "treeDemo_1_span";
+  public static final String DATA_BROWSER_COLOCATED_REGION_NAME2 = "treeDemo_2_span";
+  public static final String DATA_BROWSER_COLOCATED_REGION_NAME3 = "treeDemo_3_span";
+
+  public static final String QUERY_STATISTICS_LABEL = "Query Statistics";
+  public static final String CLUSTER_VIEW_LABEL = "Cluster View";
+  public static final String CLUSTER_VIEW_GRID_ID = "default_treemap_button";
+  public static final String SERVER_GROUP_GRID_ID = "servergroups_treemap_button";
+  public static final String REDUNDANCY_GRID_ID = "redundancyzones_treemap_button";
+  public static final String DATA_DROPDOWN_ID = "Data";
+}


Mime
View raw message