You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by pr...@apache.org on 2018/01/11 03:41:41 UTC

[1/6] zeppelin git commit: [ZEPPELIN-3127] Upgrade selenium version

Repository: zeppelin
Updated Branches:
  refs/heads/master dd1be03de -> 7bff131a5


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
deleted file mode 100644
index 6c7dfa6..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
+++ /dev/null
@@ -1,888 +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.zeppelin.integration;
-
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.zeppelin.AbstractZeppelinIT;
-import org.apache.zeppelin.WebDriverManager;
-import org.apache.zeppelin.ZeppelinITUtils;
-import org.hamcrest.CoreMatchers;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
-import org.openqa.selenium.By;
-import org.openqa.selenium.Keys;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.interactions.Actions;
-import org.openqa.selenium.support.ui.Select;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class ParagraphActionsIT extends AbstractZeppelinIT {
-  private static final Logger LOG = LoggerFactory.getLogger(ParagraphActionsIT.class);
-
-
-  @Rule
-  public ErrorCollector collector = new ErrorCollector();
-
-  @Before
-  public void startUp() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    driver = WebDriverManager.getWebDriver();
-  }
-
-  @After
-  public void tearDown() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-
-    driver.quit();
-  }
-
-  @Test
-  public void testCreateNewButton() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-      Actions action = new Actions(driver);
-      waitForParagraph(1, "READY");
-      Integer oldNosOfParas = driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
-      collector.checkThat("Before Insert New : the number of  paragraph ",
-          oldNosOfParas,
-          CoreMatchers.equalTo(1));
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]")).click();
-      waitForParagraph(2, "READY");
-      Integer newNosOfParas = driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
-      collector.checkThat("After Insert New (using Insert New button) :  number of  paragraph",
-          oldNosOfParas + 1,
-          CoreMatchers.equalTo(newNosOfParas));
-
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='removeParagraph(paragraph)']")).click();
-      ZeppelinITUtils.sleep(1000, false);
-      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'delete this paragraph')]" +
-          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
-      ZeppelinITUtils.sleep(1000, false);
-
-      setTextOfParagraph(1, " original paragraph ");
-
-      WebElement newPara = driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class,'new-paragraph')][1]"));
-      action.moveToElement(newPara).click().build().perform();
-      ZeppelinITUtils.sleep(1000, false);
-      waitForParagraph(1, "READY");
-
-      collector.checkThat("Paragraph is created above",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo(StringUtils.EMPTY));
-      setTextOfParagraph(1, " this is above ");
-
-      newPara = driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class,'new-paragraph')][2]"));
-      action.moveToElement(newPara).click().build().perform();
-
-      waitForParagraph(3, "READY");
-
-      collector.checkThat("Paragraph is created below",
-          driver.findElement(By.xpath(getParagraphXPath(3) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo(StringUtils.EMPTY));
-      setTextOfParagraph(3, " this is below ");
-
-      collector.checkThat("The output field of paragraph1 contains",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo(" this is above "));
-      collector.checkThat("The output field paragraph2 contains",
-          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo(" original paragraph "));
-      collector.checkThat("The output field paragraph3 contains",
-          driver.findElement(By.xpath(getParagraphXPath(3) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo(" this is below "));
-      collector.checkThat("The current number of paragraphs after creating  paragraph above and below",
-          driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size(),
-          CoreMatchers.equalTo(3));
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testCreateNewButton ", e);
-    }
-
-  }
-
-  @Test
-  public void testRemoveButton() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      waitForParagraph(1, "READY");
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]"))
-          .click();
-      waitForParagraph(2, "READY");
-      Integer oldNosOfParas = driver.findElements(By.xpath
-          ("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
-      collector.checkThat("Before Remove : Number of paragraphs are ",
-          oldNosOfParas,
-          CoreMatchers.equalTo(2));
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-
-      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='removeParagraph(paragraph)']"));
-
-      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'delete this paragraph')" +
-          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
-
-      Integer newNosOfParas = driver.findElements(By.xpath
-          ("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
-      collector.checkThat("After Remove : Number of paragraphs are",
-          newNosOfParas,
-          CoreMatchers.equalTo(oldNosOfParas - 1));
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testRemoveButton ", e);
-    }
-  }
-
-  @Test
-  public void testMoveUpAndDown() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      waitForParagraph(1, "READY");
-      setTextOfParagraph(1, "1");
-
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]")).click();
-
-
-      waitForParagraph(2, "READY");
-      setTextOfParagraph(2, "2");
-
-
-      collector.checkThat("The paragraph1 value contains",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo("1"));
-      collector.checkThat("The paragraph1 value contains",
-          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo("2"));
-
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='moveDown(paragraph)']"));
-
-      collector.checkThat("The paragraph1 value contains",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo("2"));
-      collector.checkThat("The paragraph1 value contains",
-          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo("1"));
-
-      driver.findElement(By.xpath(getParagraphXPath(2) + "//span[@class='icon-settings']")).click();
-      clickAndWait(By.xpath(getParagraphXPath(2) + "//ul/li/a[@ng-click='moveUp(paragraph)']"));
-
-      collector.checkThat("The paragraph1 value contains",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo("1"));
-      collector.checkThat("The paragraph1 value contains",
-          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
-          CoreMatchers.equalTo("2"));
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testMoveUpAndDown ", e);
-    }
-
-  }
-
-  @Test
-  public void testDisableParagraphRunButton() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      waitForParagraph(1, "READY");
-      setTextOfParagraph(1, "println (\"abcd\")");
-
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='toggleEnableDisable(paragraph)']"));
-      collector.checkThat("The play button class was ",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-control-play shortcut-icon']")).isDisplayed(), CoreMatchers.equalTo(false)
-      );
-
-      driver.findElement(By.xpath(".//*[@id='main']//button[contains(@ng-click, 'runAllParagraphs')]")).sendKeys(Keys.ENTER);
-      ZeppelinITUtils.sleep(1000, true);
-      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'Run all paragraphs?')]" +
-          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
-      ZeppelinITUtils.sleep(2000, false);
-
-      collector.checkThat("Paragraph status is ",
-          getParagraphStatus(1), CoreMatchers.equalTo("READY")
-      );
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testDisableParagraphRunButton ", e);
-    }
-  }
-
-  @Test
-  public void testRunOnSelectionChange() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      String xpathToRunOnSelectionChangeCheckbox = getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]";
-      String xpathToDropdownMenu = getParagraphXPath(1) + "//select";
-      String xpathToResultText = getParagraphXPath(1) + "//div[contains(@id,\"_html\")]";
-
-      createNewNote();
-
-      waitForParagraph(1, "READY");
-      setTextOfParagraph(1, "%md My selection is ${my selection=1,1|2|3}");
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-
-      // 1. 'RunOnSelectionChange' is true by default
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      collector.checkThat("'Run on selection change' checkbox will be shown under dropdown menu ",
-        driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-click, 'turnOnAutoRun(paragraph)')]")).isDisplayed(),
-        CoreMatchers.equalTo(true));
-
-      Select dropDownMenu = new Select(driver.findElement(By.xpath((xpathToDropdownMenu))));
-      dropDownMenu.selectByVisibleText("2");
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("If 'RunOnSelectionChange' is true, the paragraph result will be updated right after click any options in the dropdown menu ",
-        driver.findElement(By.xpath(xpathToResultText)).getText(),
-        CoreMatchers.equalTo("My selection is 2"));
-
-      // 2. set 'RunOnSelectionChange' to false
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      driver.findElement(By.xpath(xpathToRunOnSelectionChangeCheckbox)).click();
-      collector.checkThat("If 'Run on selection change' checkbox is unchecked, 'paragraph.config.runOnSelectionChange' will be false ",
-        driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/span[contains(@ng-if, 'paragraph.config.runOnSelectionChange == false')]")).isDisplayed(),
-        CoreMatchers.equalTo(true));
-
-      Select sameDropDownMenu = new Select(driver.findElement(By.xpath((xpathToDropdownMenu))));
-      sameDropDownMenu.selectByVisibleText("1");
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("If 'RunOnSelectionChange' is false, the paragraph result won't be updated even if we select any options in the dropdown menu ",
-        driver.findElement(By.xpath(xpathToResultText)).getText(),
-        CoreMatchers.equalTo("My selection is 2"));
-
-      // run paragraph manually by pressing ENTER
-      driver.findElement(By.xpath(xpathToDropdownMenu)).sendKeys(Keys.ENTER);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("Even if 'RunOnSelectionChange' is set as false, still can run the paragraph by pressing ENTER ",
-        driver.findElement(By.xpath(xpathToResultText)).getText(),
-        CoreMatchers.equalTo("My selection is 1"));
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testRunOnSelectionChange ", e);
-    }
-  }
-
-  @Test
-  public void testClearOutputButton() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      waitForParagraph(1, "READY");
-      String xpathToOutputField = getParagraphXPath(1) + "//div[contains(@id,\"_text\")]";
-      setTextOfParagraph(1, "println (\"abcd\")");
-      collector.checkThat("Before Run Output field contains ",
-          driver.findElements(By.xpath(xpathToOutputField)).size(),
-          CoreMatchers.equalTo(0));
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("After Run Output field contains  ",
-          driver.findElement(By.xpath(xpathToOutputField)).getText(),
-          CoreMatchers.equalTo("abcd"));
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(By.xpath(getParagraphXPath(1) +
-          "//ul/li/a[@ng-click='clearParagraphOutput(paragraph)']"));
-      collector.checkThat("After Clear  Output field contains ",
-          driver.findElements(By.xpath(xpathToOutputField)).size(),
-          CoreMatchers.equalTo(0));
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testClearOutputButton ", e);
-    }
-  }
-
-  @Test
-  public void testWidth() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-      waitForParagraph(1, "READY");
-
-      collector.checkThat("Default Width is 12 ",
-          driver.findElement(By.xpath("//div[contains(@class,'col-md-12')]")).isDisplayed(),
-          CoreMatchers.equalTo(true));
-      for (Integer newWidth = 1; newWidth <= 11; newWidth++) {
-        clickAndWait(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']"));
-        String visibleText = newWidth.toString();
-        new Select(driver.findElement(By.xpath(getParagraphXPath(1)
-            + "//ul/li/a/select[(@ng-model='paragraph.config.colWidth')]"))).selectByVisibleText(visibleText);
-        collector.checkThat("New Width is : " + newWidth,
-            driver.findElement(By.xpath("//div[contains(@class,'col-md-" + newWidth + "')]")).isDisplayed(),
-            CoreMatchers.equalTo(true));
-      }
-      deleteTestNotebook(driver);
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testWidth ", e);
-    }
-  }
-
-  @Test
-  public void testFontSize() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-      waitForParagraph(1, "READY");
-      Float height = Float.valueOf(driver.findElement(By.xpath("//div[contains(@class,'ace_content')]"))
-          .getCssValue("height").replace("px", ""));
-      for (Integer newFontSize = 10; newFontSize <= 20; newFontSize++) {
-        clickAndWait(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']"));
-        String visibleText = newFontSize.toString();
-        new Select(driver.findElement(By.xpath(getParagraphXPath(1)
-            + "//ul/li/a/select[(@ng-model='paragraph.config.fontSize')]"))).selectByVisibleText(visibleText);
-        Float newHeight = Float.valueOf(driver.findElement(By.xpath("//div[contains(@class,'ace_content')]"))
-            .getCssValue("height").replace("px", ""));
-        collector.checkThat("New Font size is : " + newFontSize,
-            newHeight > height,
-            CoreMatchers.equalTo(true));
-        height = newHeight;
-      }
-      deleteTestNotebook(driver);
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testFontSize ", e);
-    }
-  }
-
-  @Test
-  public void testTitleButton() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      waitForParagraph(1, "READY");
-
-      String xpathToTitle = getParagraphXPath(1) + "//div[contains(@class, 'title')]/div";
-      String xpathToSettingIcon = getParagraphXPath(1) + "//span[@class='icon-settings']";
-      String xpathToShowTitle = getParagraphXPath(1) + "//ul/li/a[@ng-show='!paragraph.config.title']";
-      String xpathToHideTitle = getParagraphXPath(1) + "//ul/li/a[@ng-show='paragraph.config.title']";
-
-      ZeppelinITUtils.turnOffImplicitWaits(driver);
-      Integer titleElems = driver.findElements(By.xpath(xpathToTitle)).size();
-      collector.checkThat("Before Show Title : The title doesn't exist",
-          titleElems,
-          CoreMatchers.equalTo(0));
-      ZeppelinITUtils.turnOnImplicitWaits(driver);
-
-      clickAndWait(By.xpath(xpathToSettingIcon));
-      collector.checkThat("Before Show Title : The title option in option panel of paragraph is labeled as",
-          driver.findElement(By.xpath(xpathToShowTitle)).getText(),
-          CoreMatchers.allOf(CoreMatchers.endsWith("Show title"), CoreMatchers.containsString("Ctrl+"),
-              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
-              CoreMatchers.containsString("+T")));
-
-      clickAndWait(By.xpath(xpathToShowTitle));
-      collector.checkThat("After Show Title : The title field contains",
-          driver.findElement(By.xpath(xpathToTitle)).getText(),
-          CoreMatchers.equalTo("Untitled"));
-
-      clickAndWait(By.xpath(xpathToSettingIcon));
-      collector.checkThat("After Show Title : The title option in option panel of paragraph is labeled as",
-          driver.findElement(By.xpath(xpathToHideTitle)).getText(),
-          CoreMatchers.allOf(CoreMatchers.endsWith("Hide title"), CoreMatchers.containsString("Ctrl+"),
-              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
-              CoreMatchers.containsString("+T")));
-
-      clickAndWait(By.xpath(xpathToHideTitle));
-      ZeppelinITUtils.turnOffImplicitWaits(driver);
-      titleElems = driver.findElements(By.xpath(xpathToTitle)).size();
-      collector.checkThat("After Hide Title : The title field is hidden",
-          titleElems,
-          CoreMatchers.equalTo(0));
-      ZeppelinITUtils.turnOnImplicitWaits(driver);
-
-      driver.findElement(By.xpath(xpathToSettingIcon)).click();
-      driver.findElement(By.xpath(xpathToShowTitle)).click();
-
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'title')]")).click();
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//input")).sendKeys("NEW TITLE" + Keys.ENTER);
-      ZeppelinITUtils.sleep(500, false);
-      collector.checkThat("After Editing the Title : The title field contains ",
-          driver.findElement(By.xpath(xpathToTitle)).getText(),
-          CoreMatchers.equalTo("NEW TITLE"));
-      driver.navigate().refresh();
-      ZeppelinITUtils.sleep(1000, false);
-      collector.checkThat("After Page Refresh : The title field contains ",
-          driver.findElement(By.xpath(xpathToTitle)).getText(),
-          CoreMatchers.equalTo("NEW TITLE"));
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testTitleButton  ", e);
-    }
-
-  }
-
-  @Test
-  public void testShowAndHideLineNumbers() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      waitForParagraph(1, "READY");
-      String xpathToLineNumberField = getParagraphXPath(1) + "//div[contains(@class, 'ace_gutter-layer')]";
-      String xpathToShowLineNumberButton = getParagraphXPath(1) + "//ul/li/a[@ng-click='showLineNumbers(paragraph)']";
-      String xpathToHideLineNumberButton = getParagraphXPath(1) + "//ul/li/a[@ng-click='hideLineNumbers(paragraph)']";
-
-      collector.checkThat("Before \"Show line number\" the Line Number is Enabled ",
-          driver.findElement(By.xpath(xpathToLineNumberField)).isDisplayed(),
-          CoreMatchers.equalTo(false));
-
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      collector.checkThat("Before \"Show line number\" The option panel in paragraph has button labeled ",
-          driver.findElement(By.xpath(xpathToShowLineNumberButton)).getText(),
-          CoreMatchers.allOf(CoreMatchers.endsWith("Show line numbers"), CoreMatchers.containsString("Ctrl+"),
-              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
-              CoreMatchers.containsString("+M")));
-
-
-      clickAndWait(By.xpath(xpathToShowLineNumberButton));
-      collector.checkThat("After \"Show line number\" the Line Number is Enabled ",
-          driver.findElement(By.xpath(xpathToLineNumberField)).isDisplayed(),
-          CoreMatchers.equalTo(true));
-
-      clickAndWait(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']"));
-      collector.checkThat("After \"Show line number\" The option panel in paragraph has button labeled ",
-          driver.findElement(By.xpath(xpathToHideLineNumberButton)).getText(),
-          CoreMatchers.allOf(CoreMatchers.endsWith("Hide line numbers"), CoreMatchers.containsString("Ctrl+"),
-              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
-              CoreMatchers.containsString("+M")));
-
-      clickAndWait(By.xpath(xpathToHideLineNumberButton));
-      collector.checkThat("After \"Hide line number\" the Line Number is Enabled",
-          driver.findElement(By.xpath(xpathToLineNumberField)).isDisplayed(),
-          CoreMatchers.equalTo(false));
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testShowAndHideLineNumbers ", e);
-    }
-  }
-
-  @Test
-  public void testEditOnDoubleClick() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-      Actions action = new Actions(driver);
-
-      waitForParagraph(1, "READY");
-
-      setTextOfParagraph(1, "%md");
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//textarea")).sendKeys(Keys.ARROW_RIGHT);
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//textarea")).sendKeys(Keys.ENTER);
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//textarea")).sendKeys(Keys.SHIFT + "3");
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//textarea")).sendKeys(" abc");
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-
-      collector.checkThat("Markdown editor is hidden after run ",
-          driver.findElements(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-if, 'paragraph.config.editorHide')]")).size(),
-          CoreMatchers.equalTo(0));
-
-      collector.checkThat("Markdown editor is shown after run ",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-show, 'paragraph.config.tableHide')]")).isDisplayed(),
-          CoreMatchers.equalTo(true));
-
-      // to check if editOnDblClick field is fetched correctly after refresh
-      driver.navigate().refresh();
-      waitForParagraph(1, "FINISHED");
-
-      action.doubleClick(driver.findElement(By.xpath(getParagraphXPath(1)))).perform();
-      ZeppelinITUtils.sleep(1000, false);
-      collector.checkThat("Markdown editor is shown after double click ",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-if, 'paragraph.config.editorHide')]")).isDisplayed(),
-          CoreMatchers.equalTo(true));
-
-      collector.checkThat("Markdown editor is hidden after double click ",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-show, 'paragraph.config.tableHide')]")).isDisplayed(),
-          CoreMatchers.equalTo(false));
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testEditOnDoubleClick ", e);
-    }
-  }
-
-  @Test
-  public void testSingleDynamicFormTextInput() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      setTextOfParagraph(1, "%spark println(\"Hello \"+z.textbox(\"name\", \"world\")) ");
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("Output text is equal to value specified initially",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.equalTo("Hello world"));
-
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//input")).clear();
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//input")).sendKeys("Zeppelin");
-
-      collector.checkThat("After new data in text input form, output should not be changed",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.equalTo("Hello world"));
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("Only after running the paragraph, we can see the newly updated output",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.equalTo("Hello Zeppelin"));
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testSingleDynamicFormTextInput  ", e);
-    }
-  }
-
-  @Test
-  public void testSingleDynamicFormSelectForm() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      setTextOfParagraph(1, "%spark println(\"Howdy \"+z.select(\"names\", Seq((\"1\",\"Alice\"), " +
-              "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("Output text should not display any of the options in select form",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.equalTo("Howdy "));
-
-      Select dropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
-
-      dropDownMenu.selectByVisibleText("Alice");
-      collector.checkThat("After selection in drop down menu, output should display the newly selected option",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.equalTo("Howdy 1"));
-
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
-
-      Select sameDropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
-      sameDropDownMenu.selectByVisibleText("Bob");
-      collector.checkThat("After 'Run on selection change' checkbox is unchecked, the paragraph should not run if selecting a different option",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.equalTo("Howdy 1"));
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testSingleDynamicFormSelectForm  ", e);
-    }
-  }
-
-  @Test
-  public void testSingleDynamicFormCheckboxForm() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      setTextOfParagraph(1, "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), " +
-              "(\"luke\",\"Luke\")); println(\"Greetings \"+z.checkbox(\"skywalkers\",options).mkString(\" and \"))");
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("Output text should display all of the options included in check boxes",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.containsString("Greetings han and leia and luke"));
-
-      WebElement firstCheckbox = driver.findElement(By.xpath("(" + getParagraphXPath(1) + "//input[@type='checkbox'])[1]"));
-      firstCheckbox.click();
-      collector.checkThat("After unchecking one of the boxes, we can see the newly updated output without the option we unchecked",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.containsString("Greetings leia and luke"));
-
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
-
-      WebElement secondCheckbox = driver.findElement(By.xpath("(" + getParagraphXPath(1) + "//input[@type='checkbox'])[2]"));
-      secondCheckbox.click();
-      collector.checkThat("After 'Run on selection change' checkbox is unchecked, the paragraph should not run if check box state is modified",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.containsString("Greetings leia and luke"));
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testSingleDynamicFormCheckboxForm  ", e);
-    }
-  }
-
-  @Test
-  public void testMultipleDynamicFormsSameType() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      setTextOfParagraph(1, "%spark println(\"Howdy \"+z.select(\"fruits\", Seq((\"1\",\"Apple\")," +
-              "(\"2\",\"Orange\"),(\"3\",\"Peach\")))); println(\"Howdy \"+z.select(\"planets\", " +
-              "Seq((\"1\",\"Venus\"),(\"2\",\"Earth\"),(\"3\",\"Mars\"))))");
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("Output text should not display any of the options in select form",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.equalTo("Howdy \nHowdy "));
-
-      Select dropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
-      dropDownMenu.selectByVisibleText("Apple");
-      collector.checkThat("After selection in drop down menu, output should display the new option we selected",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.equalTo("Howdy 1\nHowdy "));
-
-      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
-      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
-
-      Select sameDropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[2]"))));
-      sameDropDownMenu.selectByVisibleText("Earth");
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("After 'Run on selection change' checkbox is unchecked, the paragraph should not run if selecting a different option",
-              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-              CoreMatchers.equalTo("Howdy 1\nHowdy "));
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testMultipleDynamicFormsSameType  ", e);
-    }
-  }
-
-  @Test
-  public void testNoteDynamicFormTextInput() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      setTextOfParagraph(1, "%spark println(\"Hello \"+z.noteTextbox(\"name\", \"world\")) ");
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("Output text is equal to value specified initially", driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(), CoreMatchers.equalTo("Hello world"));
-      driver.findElement(By.xpath(getNoteFormsXPath() + "//input")).clear();
-      driver.findElement(By.xpath(getNoteFormsXPath() + "//input")).sendKeys("Zeppelin");
-      driver.findElement(By.xpath(getNoteFormsXPath() + "//input")).sendKeys(Keys.RETURN);
-
-      collector.checkThat("After new data in text input form, output should not be changed",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("Hello world"));
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("Only after running the paragraph, we can see the newly updated output",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("Hello Zeppelin"));
-
-      setTextOfParagraph(2, "%spark println(\"Hello \"+z.noteTextbox(\"name\", \"world\")) ");
-      runParagraph(2);
-      waitForParagraph(2, "FINISHED");
-      collector.checkThat("Running the another paragraph with same form, we can see value from note form",
-      driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-      CoreMatchers.equalTo("Hello Zeppelin"));
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testNoteDynamicFormTextInput  ", e);
-    }
-  }
-
-  @Test
-  public void testNoteDynamicFormSelect() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      setTextOfParagraph(1, "%spark println(\"Howdy \"+z.noteSelect(\"names\", Seq((\"1\",\"Alice\"), " +
-          "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("Output text should not display any of the options in select form",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("Howdy "));
-
-      Select dropDownMenu = new Select(driver.findElement(By.xpath("(" + (getNoteFormsXPath() + "//select)[1]"))));
-
-      dropDownMenu.selectByVisibleText("Bob");
-      collector.checkThat("After selection in drop down menu, output should not be changed",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("Howdy "));
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-
-      collector.checkThat("After run paragraph again, we can see the newly updated output",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("Howdy 2"));
-
-      setTextOfParagraph(2, "%spark println(\"Howdy \"+z.noteSelect(\"names\", Seq((\"1\",\"Alice\"), " +
-          "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
-
-      runParagraph(2);
-      waitForParagraph(2, "FINISHED");
-
-      collector.checkThat("Running the another paragraph with same form, we can see value from note form",
-          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("Howdy 2"));
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testNoteDynamicFormSelect  ", e);
-    }
-  }
-
-  @Test
-  public void testDynamicNoteFormCheckbox() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      setTextOfParagraph(1, "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), " +
-          "(\"luke\",\"Luke\")); println(\"Greetings \"+z.noteCheckbox(\"skywalkers\",options).mkString(\" and \"))");
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      collector.checkThat("Output text should display all of the options included in check boxes",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.containsString("Greetings han and leia and luke"));
-
-      WebElement firstCheckbox = driver.findElement(By.xpath("(" + getNoteFormsXPath() + "//input[@type='checkbox'])[1]"));
-      firstCheckbox.click();
-      collector.checkThat("After unchecking one of the boxes, output should not be changed",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.containsString("Greetings han and leia and luke"));
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-
-      collector.checkThat("After run paragraph again, we can see the newly updated output",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.containsString("Greetings leia and luke"));
-
-      setTextOfParagraph(2, "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), " +
-          "(\"luke\",\"Luke\")); println(\"Greetings \"+z.noteCheckbox(\"skywalkers\",options).mkString(\" and \"))");
-
-      runParagraph(2);
-      waitForParagraph(2, "FINISHED");
-
-      collector.checkThat("Running the another paragraph with same form, we can see value from note form",
-          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.containsString("Greetings leia and luke"));
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testDynamicNoteFormCheckbox  ", e);
-    }
-  }
-
-  @Test
-  public void testWithNoteAndParagraphDynamicFormTextInput() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      setTextOfParagraph(1, "%spark println(z.noteTextbox(\"name\", \"note\") + \" \" + z.textbox(\"name\", \"paragraph\")) ");
-
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-
-      collector.checkThat("After run paragraph, we can see computed output from two forms",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("note paragraph"));
-
-      deleteTestNotebook(driver);
-
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testWithNoteAndParagraphDynamicFormTextInput  ", e);
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
deleted file mode 100644
index dc07435..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
+++ /dev/null
@@ -1,354 +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.zeppelin.integration;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.zeppelin.AbstractZeppelinIT;
-import org.apache.zeppelin.integration.AuthenticationIT;
-import org.apache.zeppelin.WebDriverManager;
-import org.apache.zeppelin.ZeppelinITUtils;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
-import org.hamcrest.CoreMatchers;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
-
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.ui.WebDriverWait;
-import org.openqa.selenium.support.ui.ExpectedConditions;
-import org.openqa.selenium.TimeoutException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.commons.io.FileUtils;
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-
-import static org.junit.Assert.assertTrue;
-
-public class PersonalizeActionsIT extends AbstractZeppelinIT {
-  private static final Logger LOG = LoggerFactory.getLogger(PersonalizeActionsIT.class);
-
-  @Rule
-  public ErrorCollector collector = new ErrorCollector();
-  static String shiroPath;
-  static String authShiro = "[users]\n" +
-      "admin = password1, admin\n" +
-      "user1 = password2, user\n" +
-      "[main]\n" +
-      "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
-      "securityManager.sessionManager = $sessionManager\n" +
-      "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
-      "shiro.loginUrl = /api/login\n" +
-      "[roles]\n" +
-      "admin = *\n" +
-      "user = *\n" +
-      "[urls]\n" +
-      "/api/version = anon\n" +
-      "/** = authc";
-
-  static String originalShiro = "";
-
-  @BeforeClass
-  public static void startUp() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), new File("../").getAbsolutePath());
-      ZeppelinConfiguration conf = ZeppelinConfiguration.create();
-      shiroPath = conf.getRelativeDir(String.format("%s/shiro.ini", conf.getConfDir()));
-      File file = new File(shiroPath);
-      if (file.exists()) {
-        originalShiro = StringUtils.join(FileUtils.readLines(file, "UTF-8"), "\n");
-      }
-      FileUtils.write(file, authShiro, "UTF-8");
-    } catch (IOException e) {
-      LOG.error("Error in PersonalizeActionsIT startUp::", e);
-    }
-    ZeppelinITUtils.restartZeppelin();
-    driver = WebDriverManager.getWebDriver();
-  }
-
-  @AfterClass
-  public static void tearDown() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      if (!StringUtils.isBlank(shiroPath)) {
-        File file = new File(shiroPath);
-        if (StringUtils.isBlank(originalShiro)) {
-          FileUtils.deleteQuietly(file);
-        } else {
-          FileUtils.write(file, originalShiro, "UTF-8");
-        }
-      }
-    } catch (IOException e) {
-      LOG.error("Error in PersonalizeActionsIT tearDown::", e);
-    }
-    ZeppelinITUtils.restartZeppelin();
-    driver.quit();
-  }
-
-  private void setParagraphText(String text) {
-    setTextOfParagraph(1, "%md\\n # " + text);
-    runParagraph(1);
-    waitForParagraph(1, "FINISHED");
-  }
-
-  @Test
-  public void testSimpleAction() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      // step 1 : (admin) create a new note, run a paragraph and turn on personalized mode
-      AuthenticationIT authenticationIT = new AuthenticationIT();
-      PersonalizeActionsIT personalizeActionsIT = new PersonalizeActionsIT();
-      authenticationIT.authenticationUser("admin", "password1");
-      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
-          " note')]");
-      WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
-      WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        createNewNote();
-      }
-      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
-      waitForParagraph(1, "READY");
-      personalizeActionsIT.setParagraphText("Before");
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
-          CoreMatchers.equalTo("Before"));
-      pollingWait(By.xpath("//*[@id='actionbar']" +
-          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
-      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
-          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
-      authenticationIT.logoutUser("admin");
-
-      // step 2 : (user1) make sure it is on personalized mode and 'Before' in result of paragraph
-      authenticationIT.authenticationUser("user1", "password2");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
-      wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
-      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      collector.checkThat("The personalized mode enables",
-          driver.findElement(By.xpath("//*[@id='actionbar']" +
-              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
-          CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
-      waitForParagraph(1, "READY");
-      runParagraph(1);
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
-          CoreMatchers.equalTo("Before"));
-      authenticationIT.logoutUser("user1");
-
-      // step 3 : (admin) change paragraph contents to 'After' and check result of paragraph
-      authenticationIT.authenticationUser("admin", "password1");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
-      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"), MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      waitForParagraph(1, "FINISHED");
-      personalizeActionsIT.setParagraphText("After");
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
-          CoreMatchers.equalTo("After"));
-      authenticationIT.logoutUser("admin");
-
-      // step 4 : (user1) check whether result is 'Before' or not
-      authenticationIT.authenticationUser("user1", "password2");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
-      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"), MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
-          CoreMatchers.equalTo("Before"));
-      authenticationIT.logoutUser("user1");
-    } catch (Exception e) {
-      handleException("Exception in PersonalizeActionsIT while testSimpleAction ", e);
-    }
-  }
-
-  @Test
-  public void testGraphAction() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      // step 1 : (admin) create a new note, run a paragraph, change active graph to 'Bar chart', turn on personalized mode
-      AuthenticationIT authenticationIT = new AuthenticationIT();
-      authenticationIT.authenticationUser("admin", "password1");
-      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
-          " note')]");
-      WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
-      WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        createNewNote();
-      }
-      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
-      setTextOfParagraph(1, "print(s\"\"\"%table\\n" +
-          "name\\tsize\\n" +
-          "sun\\t100\\n" +
-          "moon\\t10\"\"\")");
-
-      runParagraph(1);
-      try {
-        waitForParagraph(1, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(1, "ERROR");
-        collector.checkThat("Exception in PersonalizeActionsIT while testGraphAction, status of 1st Spark Paragraph ",
-            "ERROR", CoreMatchers.equalTo("FINISHED"));
-      }
-
-      pollingWait(By.xpath(getParagraphXPath(1) +
-          "//button[contains(@uib-tooltip, 'Bar Chart')]"), MAX_BROWSER_TIMEOUT_SEC).click();
-      collector.checkThat("The output of graph mode is changed",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
-              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
-          CoreMatchers.equalTo("fa fa-bar-chart"));
-
-      pollingWait(By.xpath("//*[@id='actionbar']" +
-          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
-      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
-          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
-      authenticationIT.logoutUser("admin");
-
-      // step 2 : (user1) make sure it is on personalized mode and active graph is 'Bar chart',
-      // try to change active graph to 'Table' and then check result
-      authenticationIT.authenticationUser("user1", "password2");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
-      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      collector.checkThat("The personalized mode enables",
-          driver.findElement(By.xpath("//*[@id='actionbar']" +
-              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
-          CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
-
-      collector.checkThat("Make sure the output of graph mode is",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
-              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
-          CoreMatchers.equalTo("fa fa-bar-chart"));
-
-      pollingWait(By.xpath(getParagraphXPath(1) +
-          "//button[contains(@uib-tooltip, 'Table')]"), MAX_BROWSER_TIMEOUT_SEC).click();
-      collector.checkThat("The output of graph mode is not changed",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
-              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
-          CoreMatchers.equalTo("fa fa-bar-chart"));
-      authenticationIT.logoutUser("user1");
-
-    } catch (Exception e) {
-      handleException("Exception in PersonalizeActionsIT while testGraphAction ", e);
-    }
-  }
-
-  @Test
-  public void testDynamicFormAction() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      // step 1 : (admin) login, create a new note, run a paragraph with data of spark tutorial, logout.
-      AuthenticationIT authenticationIT = new AuthenticationIT();
-      authenticationIT.authenticationUser("admin", "password1");
-      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
-          " note')]");
-      WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
-      WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        createNewNote();
-      }
-      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
-      setTextOfParagraph(1, "%spark println(\"Status: \"+z.textbox(\"name\", \"Before\")) ");
-      runParagraph(1);
-      try {
-        waitForParagraph(1, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(1, "ERROR");
-        collector.checkThat("Exception in PersonalizeActionsIT while testDynamicFormAction, status of 1st Spark Paragraph ",
-            "ERROR", CoreMatchers.equalTo("FINISHED"));
-      }
-
-      collector.checkThat("The output of graph mode is changed",
-          driver.findElement(By.xpath(getParagraphXPath(1) +
-              "//input[contains(@name, 'name')]")).getAttribute("value"),
-          CoreMatchers.equalTo("Before"));
-
-      pollingWait(By.xpath("//*[@id='actionbar']" +
-          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
-      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
-          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
-      authenticationIT.logoutUser("admin");
-
-      // step 2 : (user1) make sure it is on personalized mode and  dynamic form value is 'Before',
-      // try to change dynamic form value to 'After' and then check result
-      authenticationIT.authenticationUser("user1", "password2");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
-      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      collector.checkThat("The personalized mode enables",
-          driver.findElement(By.xpath("//*[@id='actionbar']" +
-              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
-          CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
-
-      collector.checkThat("The output of graph mode is changed",
-          driver.findElement(By.xpath(getParagraphXPath(1) +
-              "//input[contains(@name, 'name')]")).getAttribute("value"),
-          CoreMatchers.equalTo("Before"));
-
-      pollingWait(By.xpath(getParagraphXPath(1) +
-          "//input[contains(@name, 'name')]"), MAX_BROWSER_TIMEOUT_SEC).clear();
-      pollingWait(By.xpath(getParagraphXPath(1) +
-          "//input[contains(@name, 'name')]"), MAX_BROWSER_TIMEOUT_SEC).sendKeys("After");
-
-      runParagraph(1);
-      try {
-        waitForParagraph(1, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(1, "ERROR");
-        collector.checkThat("Exception in PersonalizeActionsIT while testDynamicFormAction, status of 1st Spark Paragraph ",
-            "ERROR", CoreMatchers.equalTo("FINISHED"));
-      }
-
-      collector.checkThat("The output of graph mode is changed",
-          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("Status: Before"));
-      authenticationIT.logoutUser("user1");
-
-    } catch (Exception e) {
-      handleException("Exception in PersonalizeActionsIT while testGraphAction ", e);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java
deleted file mode 100644
index 8afdb9b..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java
+++ /dev/null
@@ -1,250 +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.zeppelin.integration;
-
-
-import org.apache.zeppelin.AbstractZeppelinIT;
-import org.apache.zeppelin.WebDriverManager;
-import org.hamcrest.CoreMatchers;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
-import org.openqa.selenium.By;
-import org.openqa.selenium.TimeoutException;
-import org.openqa.selenium.WebElement;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.util.List;
-
-public class SparkParagraphIT extends AbstractZeppelinIT {
-  private static final Logger LOG = LoggerFactory.getLogger(SparkParagraphIT.class);
-
-  @Rule
-  public ErrorCollector collector = new ErrorCollector();
-
-  @Before
-  public void startUp() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    driver = WebDriverManager.getWebDriver();
-    createNewNote();
-    waitForParagraph(1, "READY");
-  }
-
-  @After
-  public void tearDown() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    deleteTestNotebook(driver);
-    driver.quit();
-  }
-
-  @Test
-  public void testSpark() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      setTextOfParagraph(1, "sc.version");
-      runParagraph(1);
-
-      waitForParagraph(1, "FINISHED");
-
-      /*
-      equivalent of
-      import org.apache.commons.io.IOUtils
-      import java.net.URL
-      import java.nio.charset.Charset
-      val bankText = sc.parallelize(IOUtils.toString(new URL("https://s3.amazonaws.com/apache-zeppelin/tutorial/bank/bank.csv"),Charset.forName("utf8")).split("\n"))
-      case class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)
-
-      val bank = bankText.map(s => s.split(";")).filter(s => s(0) != "\"age\"").map(s => Bank(s(0).toInt,s(1).replaceAll("\"", ""),s(2).replaceAll("\"", ""),s(3).replaceAll("\"", ""),s(5).replaceAll("\"", "").toInt)).toDF()
-      bank.registerTempTable("bank")
-       */
-      setTextOfParagraph(2, "import org.apache.commons.io.IOUtils\\n" +
-          "import java.net.URL\\n" +
-          "import java.nio.charset.Charset\\n" +
-          "val bankText = sc.parallelize(IOUtils.toString(new URL(\"https://s3.amazonaws.com/apache-zeppelin/tutorial/bank/bank.csv\"),Charset.forName(\"utf8\")).split(\"\\\\n\"))\\n" +
-          "case class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)\\n" +
-          "\\n" +
-          "val bank = bankText.map(s => s.split(\";\")).filter(s => s(0) != \"\\\\\"age\\\\\"\").map(s => Bank(s(0).toInt,s(1).replaceAll(\"\\\\\"\", \"\"),s(2).replaceAll(\"\\\\\"\", \"\"),s(3).replaceAll(\"\\\\\"\", \"\"),s(5).replaceAll(\"\\\\\"\", \"\").toInt)).toDF()\\n" +
-          "bank.registerTempTable(\"bank\")");
-      runParagraph(2);
-
-      try {
-        waitForParagraph(2, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(2, "ERROR");
-        collector.checkThat("2nd Paragraph from SparkParagraphIT of testSpark status:",
-            "ERROR", CoreMatchers.equalTo("FINISHED")
-        );
-      }
-
-      WebElement paragraph2Result = driver.findElement(By.xpath(
-          getParagraphXPath(2) + "//div[contains(@id,\"_text\")]"));
-
-      collector.checkThat("2nd Paragraph from SparkParagraphIT of testSpark result: ",
-          paragraph2Result.getText().toString(), CoreMatchers.containsString(
-              "import org.apache.commons.io.IOUtils"
-          )
-      );
-
-    } catch (Exception e) {
-      handleException("Exception in SparkParagraphIT while testSpark", e);
-    }
-  }
-
-  @Test
-  public void testPySpark() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      setTextOfParagraph(1, "%pyspark\\n" +
-          "for x in range(0, 3):\\n" +
-          "    print \"test loop %d\" % (x)");
-
-      runParagraph(1);
-
-      try {
-        waitForParagraph(1, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(1, "ERROR");
-        collector.checkThat("Paragraph from SparkParagraphIT of testPySpark status: ",
-            "ERROR", CoreMatchers.equalTo("FINISHED")
-        );
-      }
-
-      WebElement paragraph1Result = driver.findElement(By.xpath(
-          getParagraphXPath(1) + "//div[contains(@id,\"_text\")]"));
-      collector.checkThat("Paragraph from SparkParagraphIT of testPySpark result: ",
-          paragraph1Result.getText().toString(), CoreMatchers.containsString("test loop 0\ntest loop 1\ntest loop 2")
-      );
-
-      // the last statement's evaluation result is printed
-      setTextOfParagraph(2, "%pyspark\\n" +
-          "sc.version\\n" +
-          "1+1");
-      runParagraph(2);
-      try {
-        waitForParagraph(2, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(2, "ERROR");
-        collector.checkThat("Paragraph from SparkParagraphIT of testPySpark status: ",
-                "ERROR", CoreMatchers.equalTo("FINISHED")
-        );
-      }
-      WebElement paragraph2Result = driver.findElement(By.xpath(
-              getParagraphXPath(2) + "//div[contains(@id,\"_text\")]"));
-      collector.checkThat("Paragraph from SparkParagraphIT of testPySpark result: ",
-          paragraph2Result.getText().toString(), CoreMatchers.equalTo("2")
-      );
-
-    } catch (Exception e) {
-      handleException("Exception in SparkParagraphIT while testPySpark", e);
-    }
-  }
-
-  @Test
-  public void testSqlSpark() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      setTextOfParagraph(1,"%sql\\n" +
-          "select * from bank limit 1");
-      runParagraph(1);
-
-      try {
-        waitForParagraph(1, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(1, "ERROR");
-        collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark status: ",
-            "ERROR", CoreMatchers.equalTo("FINISHED")
-        );
-      }
-
-      // Age, Job, Marital, Education, Balance
-      List<WebElement> tableHeaders = driver.findElements(By.cssSelector("span.ui-grid-header-cell-label"));
-      String headerNames = "";
-
-      for(WebElement header : tableHeaders) {
-        headerNames += header.getText().toString() + "|";
-      }
-
-      collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark result: ",
-          headerNames, CoreMatchers.equalTo("age|job|marital|education|balance|"));
-    } catch (Exception e) {
-      handleException("Exception in SparkParagraphIT while testSqlSpark", e);
-    }
-  }
-
-  @Test
-  public void testDep() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      // restart spark interpreter before running %dep
-      clickAndWait(By.xpath("//span[@uib-tooltip='Interpreter binding']"));
-      clickAndWait(By.xpath("//div[font[contains(text(), 'spark')]]/preceding-sibling::a[@uib-tooltip='Restart']"));
-      clickAndWait(By.xpath("//button[contains(.,'OK')]"));
-
-      setTextOfParagraph(1,"%dep z.load(\"org.apache.commons:commons-csv:1.1\")");
-      runParagraph(1);
-
-      try {
-        waitForParagraph(1, "FINISHED");
-        WebElement paragraph1Result = driver.findElement(By.xpath(getParagraphXPath(1) +
-            "//div[contains(@id,'_text')]"));
-        collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark result: ",
-            paragraph1Result.getText(), CoreMatchers.containsString("res0: org.apache.zeppelin.dep.Dependency = org.apache.zeppelin.dep.Dependency"));
-
-        setTextOfParagraph(2, "import org.apache.commons.csv.CSVFormat");
-        runParagraph(2);
-
-        try {
-          waitForParagraph(2, "FINISHED");
-          WebElement paragraph2Result = driver.findElement(By.xpath(getParagraphXPath(2) +
-              "//div[contains(@id,'_text')]"));
-          collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark result: ",
-              paragraph2Result.getText(), CoreMatchers.equalTo("import org.apache.commons.csv.CSVFormat"));
-
-        } catch (TimeoutException e) {
-          waitForParagraph(2, "ERROR");
-          collector.checkThat("Second paragraph from SparkParagraphIT of testDep status: ",
-              "ERROR", CoreMatchers.equalTo("FINISHED")
-          );
-        }
-
-      } catch (TimeoutException e) {
-        waitForParagraph(1, "ERROR");
-        collector.checkThat("First paragraph from SparkParagraphIT of testDep status: ",
-            "ERROR", CoreMatchers.equalTo("FINISHED")
-        );
-      }
-    } catch (Exception e) {
-      handleException("Exception in SparkParagraphIT while testDep", e);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
deleted file mode 100644
index afdae10..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
+++ /dev/null
@@ -1,343 +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.zeppelin.integration;
-
-import org.apache.zeppelin.AbstractZeppelinIT;
-import org.apache.zeppelin.WebDriverManager;
-import org.apache.zeppelin.ZeppelinITUtils;
-import org.hamcrest.CoreMatchers;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
-import org.openqa.selenium.By;
-import org.openqa.selenium.Keys;
-import org.openqa.selenium.StaleElementReferenceException;
-import org.openqa.selenium.TimeoutException;
-import org.openqa.selenium.WebElement;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.apache.commons.lang3.StringUtils.isNotBlank;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
-/**
- * Test Zeppelin with web browser.
- *
- * To test, ZeppelinServer should be running on port 8080
- * On OSX, you'll need firefox 42.0 installed, then you can run with
- *
- * PATH=~/Applications/Firefox.app/Contents/MacOS/:$PATH TEST_SELENIUM="" \
- *    mvn -Dtest=org.apache.zeppelin.integration.ZeppelinIT -Denforcer.skip=true \
- *    test -pl zeppelin-server
- *
- */
-public class ZeppelinIT extends AbstractZeppelinIT {
-  private static final Logger LOG = LoggerFactory.getLogger(ZeppelinIT.class);
-
-  @Rule
-  public ErrorCollector collector = new ErrorCollector();
-
-  @Before
-  public void startUp() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    driver = WebDriverManager.getWebDriver();
-  }
-
-  @After
-  public void tearDown() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-
-    driver.quit();
-  }
-
-  @Test
-  public void testAngularDisplay() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      createNewNote();
-
-      // wait for first paragraph's " READY " status text
-      waitForParagraph(1, "READY");
-
-      /*
-       * print angular template
-       * %angular <div id='angularTestButton' ng-click='myVar=myVar+1'>BindingTest_{{myVar}}_</div>
-       */
-      setTextOfParagraph(1, "println(\"%angular <div id=\\'angularTestButton\\' ng-click=\\'myVar=myVar+1\\'>BindingTest_{{myVar}}_</div>\")");
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-
-      // check expected text
-      waitForText("BindingTest__", By.xpath(
-              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
-
-      /*
-       * Bind variable
-       * z.angularBind("myVar", 1)
-       */
-      assertEquals(1, driver.findElements(By.xpath(getParagraphXPath(2) + "//textarea")).size());
-      setTextOfParagraph(2, "z.angularBind(\"myVar\", 1)");
-      runParagraph(2);
-      waitForParagraph(2, "FINISHED");
-
-      // check expected text
-      waitForText("BindingTest_1_", By.xpath(
-              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
-
-
-      /*
-       * print variable
-       * print("myVar="+z.angular("myVar"))
-       */
-      setTextOfParagraph(3, "print(\"myVar=\"+z.angular(\"myVar\"))");
-      runParagraph(3);
-      waitForParagraph(3, "FINISHED");
-
-      // check expected text
-      waitForText("myVar=1", By.xpath(
-              getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
-
-      /*
-       * Click element
-       */
-      driver.findElement(By.xpath(
-              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]")).click();
-
-      // check expected text
-      waitForText("BindingTest_2_", By.xpath(
-              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
-
-      /*
-       * Register watcher
-       * z.angularWatch("myVar", (before:Object, after:Object, context:org.apache.zeppelin.interpreter.InterpreterContext) => {
-       *   z.run(2, context)
-       * }
-       */
-      setTextOfParagraph(4, "z.angularWatch(\"myVar\", (before:Object, after:Object, context:org.apache.zeppelin.interpreter.InterpreterContext)=>{ z.run(2, false)})");
-      runParagraph(4);
-      waitForParagraph(4, "FINISHED");
-
-
-      /*
-       * Click element, again and see watcher works
-       */
-      driver.findElement(By.xpath(
-              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]")).click();
-
-      // check expected text
-      waitForText("BindingTest_3_", By.xpath(
-              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
-      waitForParagraph(3, "FINISHED");
-
-      // check expected text by watcher
-      waitForText("myVar=3", By.xpath(
-              getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
-
-
-      /*
-       * Click element, again and see watcher still works
-       */
-      driver.findElement(By.xpath(
-          getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]")).click();
-      // check expected text
-      waitForText("BindingTest_4_", By.xpath(
-          getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
-      waitForParagraph(3, "FINISHED");
-
-      // check expected text by watcher
-      waitForText("myVar=4", By.xpath(
-          getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
-
-      /*
-       * Unbind
-       * z.angularUnbind("myVar")
-       */
-      setTextOfParagraph(5, "z.angularUnbind(\"myVar\")");
-      runParagraph(5);
-      waitForParagraph(5, "FINISHED");
-
-      // check expected text
-      waitForText("BindingTest__",
-          By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
-
-      /*
-       * Bind again and see rebind works.
-       */
-      runParagraph(2);
-      waitForParagraph(2, "FINISHED");
-
-      // check expected text
-      waitForText("BindingTest_1_",
-          By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
-
-      driver.findElement(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']"))
-          .sendKeys(Keys.ENTER);
-      ZeppelinITUtils.sleep(1000, true);
-      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'This note will be moved to trash')]" +
-          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
-      ZeppelinITUtils.sleep(100, true);
-
-      LOG.info("testCreateNotebook Test executed");
-    } catch (Exception e) {
-      handleException("Exception in ZeppelinIT while testAngularDisplay ", e);
-    }
-  }
-
-  @Test
-  public void testSparkInterpreterDependencyLoading() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      // navigate to interpreter page
-      WebElement settingButton = driver.findElement(By.xpath("//button[@class='nav-btn dropdown-toggle ng-scope']"));
-      settingButton.click();
-      WebElement interpreterLink = driver.findElement(By.xpath("//a[@href='#/interpreter']"));
-      interpreterLink.click();
-
-      // add new dependency to spark interpreter
-      driver.findElement(By.xpath("//div[@id='spark']//button[contains(.,'edit')]")).sendKeys(Keys.ENTER);
-
-      WebElement depArtifact = pollingWait(By.xpath("//input[@ng-model='setting.depArtifact']"),
-          MAX_BROWSER_TIMEOUT_SEC);
-      String artifact = "org.apache.commons:commons-csv:1.1";
-      depArtifact.sendKeys(artifact);
-      driver.findElement(By.xpath("//div[@id='spark']//form//button[1]")).click();
-      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to update this interpreter and restart with new settings?')]" +
-          "//div[@class='modal-footer']//button[contains(.,'OK')]"));
-
-      try {
-        clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to " +
-            "update this interpreter and restart with new settings?')]//" +
-            "div[@class='bootstrap-dialog-close-button']/button"));
-      } catch (TimeoutException | StaleElementReferenceException e) {
-        //Modal dialog got closed earlier than expected nothing to worry.
-      }
-
-      driver.navigate().back();
-      createNewNote();
-
-      // wait for first paragraph's " READY " status text
-      waitForParagraph(1, "READY");
-
-      setTextOfParagraph(1, "import org.apache.commons.csv.CSVFormat");
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-
-      // check expected text
-      WebElement paragraph1Result = driver.findElement(By.xpath(
-          getParagraphXPath(1) + "//div[contains(@id,\"_text\")]"));
-
-      collector.checkThat("Paragraph from ZeppelinIT of testSparkInterpreterDependencyLoading result: ",
-          paragraph1Result.getText().toString(), CoreMatchers.containsString(
-              "import org.apache.commons.csv.CSVFormat"
-          )
-      );
-
-      //delete created notebook for cleanup.
-      deleteTestNotebook(driver);
-      ZeppelinITUtils.sleep(1000, false);
-
-      // reset dependency
-      settingButton.click();
-      interpreterLink.click();
-      driver.findElement(By.xpath("//div[@id='spark']//button[contains(.,'edit')]")).sendKeys(Keys.ENTER);
-      WebElement testDepRemoveBtn = pollingWait(By.xpath("//tr[descendant::text()[contains(.,'" +
-          artifact + "')]]/td[3]/button"), MAX_IMPLICIT_WAIT);
-      testDepRemoveBtn.sendKeys(Keys.ENTER);
-      driver.findElement(By.xpath("//div[@id='spark']//form//button[1]")).click();
-      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to update this interpreter and restart with new settings?')]" +
-          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
-    } catch (Exception e) {
-      handleException("Exception in ZeppelinIT while testSparkInterpreterDependencyLoading ", e);
-    }
-  }
-
-  @Test
-  public void testAngularRunParagraph() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-
-    try {
-      createNewNote();
-
-      // wait for first paragraph's " READY " status text
-      waitForParagraph(1, "READY");
-
-      // Create 1st paragraph
-      setTextOfParagraph(1,
-              "%angular <div id=\\'angularRunParagraph\\'>Run second paragraph</div>");
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-      waitForText("Run second paragraph", By.xpath(
-              getParagraphXPath(1) + "//div[@id=\"angularRunParagraph\"]"));
-
-      // Create 2nd paragraph
-      setTextOfParagraph(2, "%sh echo TEST");
-      runParagraph(2);
-      waitForParagraph(2, "FINISHED");
-
-      // Get 2nd paragraph id
-      final String secondParagraphId = driver.findElement(By.xpath(getParagraphXPath(2)
-              + "//div[@class=\"control ng-scope\"]//ul[@class=\"dropdown-menu dropdown-menu-right\"]/li[1]"))
-              .getAttribute("textContent");
-
-      assertTrue("Cannot find paragraph id for the 2nd paragraph", isNotBlank(secondParagraphId));
-
-      // Update first paragraph to call z.runParagraph() with 2nd paragraph id
-      setTextOfParagraph(1,
-              "%angular <div id=\\'angularRunParagraph\\' ng-click=\\'z.runParagraph(\""
-                      + secondParagraphId.trim()
-                      + "\")\\'>Run second paragraph</div>");
-      runParagraph(1);
-      waitForParagraph(1, "FINISHED");
-
-      // Set new text value for 2nd paragraph
-      setTextOfParagraph(2, "%sh echo NEW_VALUE");
-
-      // Click on 1 paragraph to trigger z.runParagraph() function
-      driver.findElement(By.xpath(
-              getParagraphXPath(1) + "//div[@id=\"angularRunParagraph\"]")).click();
-
-      waitForParagraph(2, "FINISHED");
-
-      // Check that 2nd paragraph has been executed
-      waitForText("NEW_VALUE", By.xpath(
-              getParagraphXPath(2) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
-
-      //delete created notebook for cleanup.
-      deleteTestNotebook(driver);
-      ZeppelinITUtils.sleep(1000, true);
-
-      LOG.info("testAngularRunParagraph Test executed");
-    }  catch (Exception e) {
-      handleException("Exception in ZeppelinIT while testAngularRunParagraph", e);
-    }
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/scala/org/apache/zeppelin/AbstractFunctionalSuite.scala
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/scala/org/apache/zeppelin/AbstractFunctionalSuite.scala b/zeppelin-server/src/test/scala/org/apache/zeppelin/AbstractFunctionalSuite.scala
deleted file mode 100644
index 2f773c6..0000000
--- a/zeppelin-server/src/test/scala/org/apache/zeppelin/AbstractFunctionalSuite.scala
+++ /dev/null
@@ -1,84 +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.zeppelin
-
-import org.apache.zeppelin.AbstractFunctionalSuite.SERVER_ADDRESS
-import org.openqa.selenium.WebDriver
-import org.openqa.selenium.chrome.ChromeDriver
-import org.openqa.selenium.firefox.{FirefoxBinary, FirefoxDriver, FirefoxProfile}
-import org.openqa.selenium.safari.SafariDriver
-import org.scalatest.concurrent.Eventually._
-import org.scalatest.time._
-import org.scalatest.selenium.WebBrowser
-import org.scalatest.{BeforeAndAfterAll, FunSuite, Suite}
-
-import scala.sys.process._
-import scala.util.Try
-
-object AbstractFunctionalSuite {
-  val SERVER_ADDRESS = "http://localhost:8080"
-}
-
-class AbstractFunctionalSuite extends FunSuite with WebBrowser with BeforeAndAfterAll {
-
-  implicit val webDriver = getDriver()
-
-  override def beforeAll() = {
-    "../bin/zeppelin-daemon.sh start" !
-
-    eventually (timeout(Span(180, Seconds))) {
-      go to SERVER_ADDRESS
-      assert(find("welcome").isDefined)
-    }
-  }
-
-  override def nestedSuites =
-    List[Suite](new WelcomePageSuite).toIndexedSeq
-
-  override def afterAll() = {
-    "../bin/zeppelin-daemon.sh stop" !
-
-    webDriver.close()
-  }
-
-  def getDriver(): WebDriver = {
-    val possibleDrivers = List[() => WebDriver](safari, chrome, firefox)
-    val createdDriver = possibleDrivers.map(driverFactory => Try(driverFactory.apply())).find(_.isSuccess)
-    createdDriver match {
-      case Some(driver) => driver.get
-      case None => throw new RuntimeException("Could not initialize any driver")
-    }
-  }
-
-  def safari(): WebDriver = {
-    new SafariDriver()
-  }
-
-  def chrome(): WebDriver = {
-    new ChromeDriver()
-  }
-
-  def firefox(): WebDriver = {
-    val ffox: FirefoxBinary = new FirefoxBinary
-    if ("true" == System.getenv("TRAVIS")) {
-      ffox.setEnvironmentProperty("DISPLAY", ":99")
-    }
-    val profile: FirefoxProfile = new FirefoxProfile
-    new FirefoxDriver(ffox, profile)
-  }
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/scala/org/apache/zeppelin/WelcomePageSuite.scala
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/scala/org/apache/zeppelin/WelcomePageSuite.scala b/zeppelin-server/src/test/scala/org/apache/zeppelin/WelcomePageSuite.scala
deleted file mode 100644
index 1798214..0000000
--- a/zeppelin-server/src/test/scala/org/apache/zeppelin/WelcomePageSuite.scala
+++ /dev/null
@@ -1,37 +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.zeppelin
-
-import org.openqa.selenium.WebDriver
-import org.scalatest.concurrent.Eventually._
-import org.scalatest.time._
-import org.scalatest.selenium.WebBrowser
-import org.scalatest.{DoNotDiscover, FunSuite}
-import AbstractFunctionalSuite.SERVER_ADDRESS
-
-@DoNotDiscover
-class WelcomePageSuite(implicit driver: WebDriver) extends FunSuite with WebBrowser {
-
-  test("Welcome sign is correct") {
-    eventually (timeout(Span(180, Seconds))) {
-      go to SERVER_ADDRESS
-      assert(find("welcome").isDefined)
-    }
-  }
-
-}


[3/6] zeppelin git commit: [ZEPPELIN-3127] Upgrade selenium version

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/com/webautomation/ScreenCaptureHtmlUnitDriver.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/com/webautomation/ScreenCaptureHtmlUnitDriver.java b/zeppelin-server/src/test/java/com/webautomation/ScreenCaptureHtmlUnitDriver.java
deleted file mode 100644
index adad807..0000000
--- a/zeppelin-server/src/test/java/com/webautomation/ScreenCaptureHtmlUnitDriver.java
+++ /dev/null
@@ -1,224 +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 com.webautomation;
-
-import java.io.ByteArrayOutputStream;
-import java.io.File;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.net.URL;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.LinkedList;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.zip.ZipEntry;
-import java.util.zip.ZipOutputStream;
-
-import org.apache.commons.io.FilenameUtils;
-import org.apache.commons.io.IOUtils;
-import org.openqa.selenium.Capabilities;
-import org.openqa.selenium.OutputType;
-import org.openqa.selenium.TakesScreenshot;
-import org.openqa.selenium.WebDriverException;
-import org.openqa.selenium.htmlunit.HtmlUnitDriver;
-import org.openqa.selenium.internal.Base64Encoder;
-import org.openqa.selenium.remote.CapabilityType;
-import org.openqa.selenium.remote.DesiredCapabilities;
-
-import com.gargoylesoftware.htmlunit.BrowserVersion;
-import com.gargoylesoftware.htmlunit.WebClient;
-import com.gargoylesoftware.htmlunit.WebRequest;
-import com.gargoylesoftware.htmlunit.WebWindow;
-import com.gargoylesoftware.htmlunit.html.HtmlElement;
-import com.gargoylesoftware.htmlunit.html.HtmlPage;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-/**
- * from https://code.google.com/p/selenium/issues/detail?id=1361
- */
-public class ScreenCaptureHtmlUnitDriver extends HtmlUnitDriver implements TakesScreenshot {
-
-    private static Map<String, byte[]> imagesCache = Collections.synchronizedMap(new HashMap<String, byte[]>());
-
-    private static Map<String, String> cssjsCache = Collections.synchronizedMap(new HashMap<String, String>());
-
-    // http://stackoverflow.com/questions/4652777/java-regex-to-get-the-urls-from-css
-    private final static Pattern cssUrlPattern = Pattern.compile("background(-image)?[\\s]*:[^url]*url[\\s]*\\([\\s]*([^\\)]*)[\\s]*\\)[\\s]*");// ?<url>
-
-    static Logger LOGGER = LoggerFactory.getLogger(ScreenCaptureHtmlUnitDriver.class);
-
-    public ScreenCaptureHtmlUnitDriver() {
-        super();
-    }
-
-    public ScreenCaptureHtmlUnitDriver(boolean enableJavascript) {
-        super(enableJavascript);
-    }
-
-    public ScreenCaptureHtmlUnitDriver(Capabilities capabilities) {
-        super(capabilities);
-    }
-
-    public ScreenCaptureHtmlUnitDriver(BrowserVersion version) {
-        super(version);
-        DesiredCapabilities var = ((DesiredCapabilities) getCapabilities());
-        var.setCapability(CapabilityType.TAKES_SCREENSHOT, true);
-    }
-
-    @Override
-    @SuppressWarnings("unchecked")
-    public <X> X getScreenshotAs(OutputType<X> target) throws WebDriverException {
-        byte[] archive = new byte[0];
-        try {
-            archive = downloadCssAndImages(getWebClient(), (HtmlPage) getCurrentWindow().getEnclosedPage());
-        } catch (Exception e) {
-            LOGGER.error("Exception in ScreenCaptureHtmlUnitDriver while getScreenshotAs ", e);
-        }
-        if(target.equals(OutputType.BASE64)){
-            return target.convertFromBase64Png(new Base64Encoder().encode(archive));
-        }
-        if(target.equals(OutputType.FILE)){
-            File f = new File("screen.tmp");
-            try {
-                FileOutputStream scr = new FileOutputStream(f);
-                scr.write(archive);
-                scr.close();
-            } catch (IOException e) {
-                throw new WebDriverException(e);
-            }
-            return (X) f;
-        }
-        return (X) archive;
-    }
-
-    // http://stackoverflow.com/questions/2244272/how-can-i-tell-htmlunits-webclient-to-download-images-and-css
-    protected byte[] downloadCssAndImages(WebClient webClient, HtmlPage page) throws Exception {
-        WebWindow currentWindow = webClient.getCurrentWindow();
-        Map<String, String> urlMapping = new HashMap<>();
-        Map<String, byte[]> files = new HashMap<>();
-        WebWindow window = null;
-        try {
-            window = webClient.getWebWindowByName(page.getUrl().toString()+"_screenshot");
-            webClient.getPage(window, new WebRequest(page.getUrl()));
-        } catch (Exception e) {
-            LOGGER.error("Exception in ScreenCaptureHtmlUnitDriver while downloadCssAndImages ", e);
-            window = webClient.openWindow(page.getUrl(), page.getUrl().toString()+"_screenshot");
-        }
-
-        String xPathExpression = "//*[name() = 'img' or name() = 'link' and (@type = 'text/css' or @type = 'image/x-icon') or  @type = 'text/javascript']";
-        List<?> resultList = page.getByXPath(xPathExpression);
-
-        Iterator<?> i = resultList.iterator();
-        while (i.hasNext()) {
-            try {
-                HtmlElement el = (HtmlElement) i.next();
-                String resourceSourcePath = el.getAttribute("src").equals("") ? el.getAttribute("href") : el
-                        .getAttribute("src");
-                if (resourceSourcePath == null || resourceSourcePath.equals(""))
-                    continue;
-                URL resourceRemoteLink = page.getFullyQualifiedUrl(resourceSourcePath);
-                String resourceLocalPath = mapLocalUrl(page, resourceRemoteLink, resourceSourcePath, urlMapping);
-                urlMapping.put(resourceSourcePath, resourceLocalPath);
-                if (!resourceRemoteLink.toString().endsWith(".css")) {
-                    byte[] image = downloadImage(webClient, window, resourceRemoteLink);
-                    files.put(resourceLocalPath, image);
-                } else {
-                    String css = downloadCss(webClient, window, resourceRemoteLink);
-                    for (String cssImagePath : getLinksFromCss(css)) {
-                        URL cssImagelink = page.getFullyQualifiedUrl(cssImagePath.replace("\"", "").replace("\'", "")
-                                .replace(" ", ""));
-                        String cssImageLocalPath = mapLocalUrl(page, cssImagelink, cssImagePath, urlMapping);
-                        files.put(cssImageLocalPath, downloadImage(webClient, window, cssImagelink));
-                    }
-                    files.put(resourceLocalPath, replaceRemoteUrlsWithLocal(css, urlMapping)
-                            .replace("resources/", "./").getBytes());
-                }
-            } catch (Exception e) {
-                LOGGER.error("Exception in ScreenCaptureHtmlUnitDriver while resultList.iterator ", e);
-            }
-        }
-        String pagesrc = replaceRemoteUrlsWithLocal(page.getWebResponse().getContentAsString(), urlMapping);
-        files.put("page.html", pagesrc.getBytes());
-        webClient.setCurrentWindow(currentWindow);
-        return createZip(files);
-    }
-
-    String downloadCss(WebClient webClient, WebWindow window, URL resourceUrl) throws Exception {
-        if (cssjsCache.get(resourceUrl.toString()) == null) {
-            cssjsCache.put(resourceUrl.toString(), webClient.getPage(window, new WebRequest(resourceUrl))
-                    .getWebResponse().getContentAsString());
-
-        }
-        return cssjsCache.get(resourceUrl.toString());
-    }
-
-    byte[] downloadImage(WebClient webClient, WebWindow window, URL resourceUrl) throws Exception {
-        if (imagesCache.get(resourceUrl.toString()) == null) {
-            imagesCache.put(
-                    resourceUrl.toString(),
-                    IOUtils.toByteArray(webClient.getPage(window, new WebRequest(resourceUrl)).getWebResponse()
-                            .getContentAsStream()));
-        }
-        return imagesCache.get(resourceUrl.toString());
-    }
-
-    public static byte[] createZip(Map<String, byte[]> files) throws IOException {
-        ByteArrayOutputStream bos = new ByteArrayOutputStream();
-        ZipOutputStream zipfile = new ZipOutputStream(bos);
-        Iterator<String> i = files.keySet().iterator();
-        String fileName = null;
-        ZipEntry zipentry = null;
-        while (i.hasNext()) {
-            fileName = i.next();
-            zipentry = new ZipEntry(fileName);
-            zipfile.putNextEntry(zipentry);
-            zipfile.write(files.get(fileName));
-        }
-        zipfile.close();
-        return bos.toByteArray();
-    }
-
-    List<String> getLinksFromCss(String css) {
-        List<String> result = new LinkedList<>();
-        Matcher m = cssUrlPattern.matcher(css);
-        while (m.find()) { // find next match
-            result.add( m.group(2));
-        }
-        return result;
-    }
-
-    String replaceRemoteUrlsWithLocal(String source, Map<String, String> replacement) {
-        for (String object : replacement.keySet()) {
-            // background:url(http://org.com/images/image.gif)
-            source = source.replace(object, replacement.get(object));
-        }
-        return source;
-    }
-
-    String mapLocalUrl(HtmlPage page, URL link, String path, Map<String, String> replacementToAdd) throws Exception {
-        String resultingFileName = "resources/" + FilenameUtils.getName(link.getFile());
-        replacementToAdd.put(path, resultingFileName);
-        return resultingFileName;
-    }
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
deleted file mode 100644
index d2b38ea..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
+++ /dev/null
@@ -1,146 +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.zeppelin;
-
-
-import com.google.common.base.Function;
-import org.apache.commons.codec.binary.Base64;
-import org.apache.commons.io.FileUtils;
-import org.openqa.selenium.*;
-import org.openqa.selenium.logging.LogEntries;
-import org.openqa.selenium.logging.LogEntry;
-import org.openqa.selenium.logging.LogType;
-import org.openqa.selenium.support.ui.ExpectedConditions;
-import org.openqa.selenium.support.ui.FluentWait;
-import org.openqa.selenium.support.ui.Wait;
-import org.openqa.selenium.support.ui.WebDriverWait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.util.Date;
-import java.util.concurrent.TimeUnit;
-
-abstract public class AbstractZeppelinIT {
-  protected static WebDriver driver;
-
-  protected final static Logger LOG = LoggerFactory.getLogger(AbstractZeppelinIT.class);
-  protected static final long MIN_IMPLICIT_WAIT = 5;
-  protected static final long MAX_IMPLICIT_WAIT = 30;
-  protected static final long MAX_BROWSER_TIMEOUT_SEC = 30;
-  protected static final long MAX_PARAGRAPH_TIMEOUT_SEC = 120;
-
-  protected void setTextOfParagraph(int paragraphNo, String text) {
-    String editorId = driver.findElement(By.xpath(getParagraphXPath(paragraphNo) + "//div[contains(@class, 'editor')]")).getAttribute("id");
-    if (driver instanceof JavascriptExecutor) {
-      ((JavascriptExecutor) driver).executeScript("ace.edit('" + editorId + "'). setValue('" + text + "')");
-    } else {
-      throw new IllegalStateException("This driver does not support JavaScript!");
-    }
-  }
-
-  protected void runParagraph(int paragraphNo) {
-    driver.findElement(By.xpath(getParagraphXPath(paragraphNo) + "//span[@class='icon-control-play']")).click();
-  }
-
-
-  protected String getParagraphXPath(int paragraphNo) {
-    return "(//div[@ng-controller=\"ParagraphCtrl\"])[" + paragraphNo + "]";
-  }
-
-  protected String getNoteFormsXPath() {
-    return "(//div[@id='noteForms'])";
-  }
-
-  protected boolean waitForParagraph(final int paragraphNo, final String state) {
-    By locator = By.xpath(getParagraphXPath(paragraphNo)
-        + "//div[contains(@class, 'control')]//span[2][contains(.,'" + state + "')]");
-    WebElement element = pollingWait(locator, MAX_PARAGRAPH_TIMEOUT_SEC);
-    return element.isDisplayed();
-  }
-
-  protected String getParagraphStatus(final int paragraphNo) {
-    By locator = By.xpath(getParagraphXPath(paragraphNo)
-        + "//div[contains(@class, 'control')]/span[2]");
-
-    return driver.findElement(locator).getText();
-  }
-
-  protected boolean waitForText(final String txt, final By locator) {
-    try {
-      WebElement element = pollingWait(locator, MAX_BROWSER_TIMEOUT_SEC);
-      return txt.equals(element.getText());
-    } catch (TimeoutException e) {
-      return false;
-    }
-  }
-
-  protected WebElement pollingWait(final By locator, final long timeWait) {
-    Wait<WebDriver> wait = new FluentWait<>(driver)
-        .withTimeout(timeWait, TimeUnit.SECONDS)
-        .pollingEvery(1, TimeUnit.SECONDS)
-        .ignoring(NoSuchElementException.class);
-
-    return wait.until(new Function<WebDriver, WebElement>() {
-      public WebElement apply(WebDriver driver) {
-        return driver.findElement(locator);
-      }
-    });
-  }
-
-  protected static boolean endToEndTestEnabled() {
-    return null != System.getenv("TEST_SELENIUM");
-  }
-
-  protected void createNewNote() {
-    clickAndWait(By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
-        " note')]"));
-
-    WebDriverWait block = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
-    block.until(ExpectedConditions.visibilityOfElementLocated(By.id("noteCreateModal")));
-    clickAndWait(By.id("createNoteButton"));
-    block.until(ExpectedConditions.invisibilityOfElementLocated(By.className("pull-right")));
-  }
-
-  protected void deleteTestNotebook(final WebDriver driver) {
-    WebDriverWait block = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
-    driver.findElement(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']"))
-        .sendKeys(Keys.ENTER);
-    block.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']")));
-    driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'This note will be moved to trash')]" +
-        "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
-    ZeppelinITUtils.sleep(100, true);
-  }
-
-  protected void clickAndWait(final By locator) {
-    pollingWait(locator, MAX_IMPLICIT_WAIT).click();
-    ZeppelinITUtils.sleep(1000, true);
-  }
-
-  protected void handleException(String message, Exception e) throws Exception {
-    LOG.error(message, e);
-    LogEntries logEntries = driver.manage().logs().get(LogType.BROWSER);
-    for (LogEntry entry : logEntries) {
-      LOG.error(new Date(entry.getTimestamp()) + " " + entry.getLevel() + " " + entry.getMessage());
-    }
-    File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
-    LOG.error("ScreenShot::\ndata:image/png;base64," + new String(Base64.encodeBase64(FileUtils.readFileToByteArray(scrFile))));
-    throw e;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/CommandExecutor.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/CommandExecutor.java b/zeppelin-server/src/test/java/org/apache/zeppelin/CommandExecutor.java
deleted file mode 100644
index 6a55f3e..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/CommandExecutor.java
+++ /dev/null
@@ -1,74 +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.zeppelin;
-
-import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class CommandExecutor {
-
-  public final static Logger LOG = LoggerFactory.getLogger(CommandExecutor.class);
-
-  public enum IGNORE_ERRORS {
-    TRUE,
-    FALSE
-  }
-
-  public static int NORMAL_EXIT = 0;
-
-  private static IGNORE_ERRORS DEFAULT_BEHAVIOUR_ON_ERRORS = IGNORE_ERRORS.TRUE;
-
-  public static Object executeCommandLocalHost(String[] command, boolean printToConsole, ProcessData.Types_Of_Data type, IGNORE_ERRORS ignore_errors) {
-    List<String> subCommandsAsList = new ArrayList<>(Arrays.asList(command));
-    String mergedCommand = StringUtils.join(subCommandsAsList, " ");
-
-    LOG.info("Sending command \"" + mergedCommand + "\" to localhost");
-
-    ProcessBuilder processBuilder = new ProcessBuilder(command);
-    Process process = null;
-    try {
-      process = processBuilder.start();
-    } catch (IOException e) {
-      throw new RuntimeException(e);
-    }
-
-    ProcessData data_of_process = new ProcessData(process, printToConsole);
-    Object output_of_process = data_of_process.getData(type);
-    int exit_code = data_of_process.getExitCodeValue();
-
-    if (!printToConsole)
-      LOG.trace(output_of_process.toString());
-    else
-      LOG.debug(output_of_process.toString());
-    if (ignore_errors == IGNORE_ERRORS.FALSE && exit_code != NORMAL_EXIT) {
-      LOG.error(String.format("*********************Command '%s' failed with exitcode %s *********************", mergedCommand, exit_code));
-    }
-    return output_of_process;
-  }
-
-  public static Object executeCommandLocalHost(String command, boolean printToConsole, ProcessData.Types_Of_Data type) {
-    return executeCommandLocalHost(new String[]{"bash", "-c", command}, printToConsole, type, DEFAULT_BEHAVIOUR_ON_ERRORS);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/ProcessData.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/ProcessData.java b/zeppelin-server/src/test/java/org/apache/zeppelin/ProcessData.java
deleted file mode 100644
index 83f5f4c..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/ProcessData.java
+++ /dev/null
@@ -1,249 +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.zeppelin;
-
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.*;
-import java.util.concurrent.TimeUnit;
-
-public class ProcessData {
-  public enum Types_Of_Data {
-    OUTPUT,
-    ERROR,
-    EXIT_CODE,
-    STREAMS_MERGED,
-    PROCESS_DATA_OBJECT
-  }
-
-  public final static Logger LOG = LoggerFactory.getLogger(ProcessData.class);
-
-  private Process checked_process;
-  private boolean printToConsole = false;
-  private boolean removeRedundantOutput = true;
-
-  public ProcessData(Process connected_process, boolean printToConsole, int silenceTimeout, TimeUnit timeUnit) {
-    this.checked_process = connected_process;
-    this.printToConsole = printToConsole;
-    this.silenceTimeout = TimeUnit.MILLISECONDS.convert(silenceTimeout, timeUnit);
-  }
-
-  public ProcessData(Process connected_process, boolean printToConsole, int silenceTimeoutSec) {
-    this.checked_process = connected_process;
-    this.printToConsole = printToConsole;
-    this.silenceTimeout = TimeUnit.MILLISECONDS.convert(silenceTimeoutSec, TimeUnit.SECONDS);
-  }
-
-  public ProcessData(Process connected_process, boolean printToConsole) {
-    this.checked_process = connected_process;
-    this.printToConsole = printToConsole;
-  }
-
-  public ProcessData(Process connected_process) {
-    this.checked_process = connected_process;
-    this.printToConsole = true;
-  }
-
-
-  boolean returnCodeRetrieved = false;
-
-  private String outPutStream = null;
-  private String errorStream = null;
-  private int returnCode;
-  private long silenceTimeout = 10 * 60 * 1000;
-  private final long unconditionalExitDelayMinutes = 30;
-
-  public static boolean isRunning(Process process) {
-    try {
-      process.exitValue();
-      return false;
-    } catch (IllegalThreadStateException e) {
-      return true;
-    }
-  }
-
-  public Object getData(Types_Of_Data type) {
-    //TODO get rid of Pseudo-terminal will not be allocated because stdin is not a terminal.
-    switch (type) {
-      case OUTPUT: {
-        return this.getOutPutStream();
-      }
-      case ERROR: {
-        return this.getErrorStream();
-      }
-      case EXIT_CODE: {
-        return this.getExitCodeValue();
-      }
-      case STREAMS_MERGED: {
-        return this.getOutPutStream() + "\n" + this.getErrorStream();
-      }
-      case PROCESS_DATA_OBJECT: {
-        this.getErrorStream();
-        return this;
-      }
-      default: {
-        throw new IllegalArgumentException("Data Type " + type + " not supported yet!");
-      }
-    }
-  }
-
-  public int getExitCodeValue() {
-    try {
-      if (!returnCodeRetrieved) {
-        this.checked_process.waitFor();
-        this.returnCode = this.checked_process.exitValue();
-        this.returnCodeRetrieved = true;
-        this.checked_process.destroy();
-      }
-    } catch (Exception inter) {
-      throw new RuntimeException("Couldn't finish waiting for process " + this.checked_process + " termination", inter);
-    }
-    return this.returnCode;
-  }
-
-  public String getOutPutStream() {
-    if (this.outPutStream == null) {
-      try {
-        buildOutputAndErrorStreamData();
-      } catch (Exception e) {
-        throw new RuntimeException("Couldn't retrieve Output Stream data from process: " + this.checked_process.toString(), e);
-
-      }
-    }
-    this.outPutStream = this.outPutStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
-    this.errorStream = this.errorStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
-    return this.outPutStream;
-  }
-
-  public String getErrorStream() {
-    if (this.errorStream == null) {
-      try {
-        buildOutputAndErrorStreamData();
-      } catch (Exception e) {
-        throw new RuntimeException("Couldn't retrieve Error Stream data from process: " + this.checked_process.toString(), e);
-
-      }
-    }
-    this.outPutStream = this.outPutStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
-    this.errorStream = this.errorStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
-    return this.errorStream;
-  }
-
-  public String toString() {
-    StringBuilder result = new StringBuilder();
-    result.append(String.format("[OUTPUT STREAM]\n%s\n", this.outPutStream));
-    result.append(String.format("[ERROR STREAM]\n%s\n", this.errorStream));
-    result.append(String.format("[EXIT CODE]\n%d", this.returnCode));
-    return result.toString();
-  }
-
-  private void buildOutputAndErrorStreamData() throws IOException {
-    StringBuilder sbInStream = new StringBuilder();
-    StringBuilder sbErrorStream = new StringBuilder();
-
-    try {
-      InputStream in = this.checked_process.getInputStream();
-      InputStream inErrors = this.checked_process.getErrorStream();
-      BufferedReader inReader = new BufferedReader(new InputStreamReader(in));
-      BufferedReader inReaderErrors = new BufferedReader(new InputStreamReader(inErrors));
-      LOG.trace("Started retrieving data from streams of attached process: " + this.checked_process);
-
-      long lastStreamDataTime = System.currentTimeMillis();   //Store start time to be able to finish method if command hangs
-      long unconditionalExitTime = System.currentTimeMillis() + TimeUnit.MILLISECONDS.convert(unconditionalExitDelayMinutes, TimeUnit.MINUTES); // Stop after 'unconditionalExitDelayMinutes' even if process is alive and sending output
-      final int BUFFER_LEN = 300;
-      char charBuffer[] = new char[BUFFER_LEN];     //Use char buffer to read output, size can be tuned.
-      boolean outputProduced = true;                //Flag to check if previous iteration produced any output
-      while (isRunning(this.checked_process) || outputProduced) {   //Continue if process is alive or some output was produced on previous iteration and there may be still some data to read.
-        outputProduced = false;
-        ZeppelinITUtils.sleep(100, false);                                  //Some local commands can exit fast, but immediate stream reading will give no output and after iteration, 'while' condition will be false so we will not read out any output while it is still there, just need to wait for some time for it to appear in streams.
-
-        StringBuilder tempSB = new StringBuilder();
-        while (inReader.ready()) {
-          tempSB.setLength(0);                                // clean temporary StringBuilder
-          int readCount = inReader.read(charBuffer, 0, BUFFER_LEN); //read up to 'BUFFER_LEN' chars to buffer
-          if (readCount < 1) {                                     // if nothing read or error occurred
-            break;
-          }
-          tempSB.append(charBuffer, 0, readCount);
-
-          sbInStream.append(tempSB);
-          if (tempSB.length() > 0) {
-            outputProduced = true;                                //set flag to know that we read something and there may be moire data, even if process already exited
-          }
-
-          lastStreamDataTime = System.currentTimeMillis();        //remember last time data was read from streams to be sure we are not looping infinitely
-        }
-
-        tempSB = new StringBuilder();                               //Same, but for error stream
-        while (inReaderErrors.ready()) {
-          tempSB.setLength(0);
-          int readCount = inReaderErrors.read(charBuffer, 0, BUFFER_LEN);
-          if (readCount < 1) {
-            break;
-          }
-          tempSB.append(charBuffer, 0, readCount);
-          sbErrorStream.append(tempSB);
-          if (tempSB.length() > 0) {
-            outputProduced = true;
-            String temp = new String(tempSB);
-            temp = temp.replaceAll("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
-            //TODO : error stream output need to be improved, because it outputs downloading information.
-            if (printToConsole) {
-              if (!temp.trim().equals("")) {
-                if (temp.toLowerCase().contains("error") || temp.toLowerCase().contains("failed")) {
-                  LOG.warn(temp.trim());
-                } else {
-                  LOG.debug(temp.trim());
-                }
-              }
-            }
-          }
-          lastStreamDataTime = System.currentTimeMillis();
-        }
-
-
-        if ((System.currentTimeMillis() - lastStreamDataTime > silenceTimeout) ||     //Exit if silenceTimeout ms has passed from last stream read. Means process is alive but not sending any data.
-            (System.currentTimeMillis() > unconditionalExitTime)) {                    //Exit unconditionally - guards against alive process continuously sending data.
-          LOG.info("Conditions: " + (System.currentTimeMillis() - lastStreamDataTime > silenceTimeout) + " " +
-              (System.currentTimeMillis() > unconditionalExitTime));
-          this.checked_process.destroy();
-          try {
-            if ((System.currentTimeMillis() > unconditionalExitTime))
-              LOG.error("!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Unconditional exit occured@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@!\nsome process hag up for more than " + unconditionalExitDelayMinutes + " minutes.");
-            LOG.error("!##################################!");
-            StringWriter sw = new StringWriter();
-            new Exception("Exited from buildOutputAndErrorStreamData by timeout").printStackTrace(new PrintWriter(sw)); //Get stack trace
-            String exceptionAsString = sw.toString();
-            LOG.error(exceptionAsString);
-          } catch (Exception ignore) {
-            LOG.info("Exception in ProcessData while buildOutputAndErrorStreamData ", ignore);
-          }
-          break;
-        }
-      }
-
-      in.close();
-      inErrors.close();
-    } finally {
-      this.outPutStream = sbInStream.toString();
-      this.errorStream = sbErrorStream.toString();
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/WebDriverManager.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/WebDriverManager.java b/zeppelin-server/src/test/java/org/apache/zeppelin/WebDriverManager.java
deleted file mode 100644
index 82dc9cc..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/WebDriverManager.java
+++ /dev/null
@@ -1,195 +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.zeppelin;
-
-import org.apache.commons.io.FileUtils;
-import org.openqa.selenium.By;
-import org.openqa.selenium.TimeoutException;
-import org.openqa.selenium.WebDriver;
-import org.openqa.selenium.chrome.ChromeDriver;
-import org.openqa.selenium.firefox.FirefoxBinary;
-import org.openqa.selenium.firefox.FirefoxDriver;
-import org.openqa.selenium.firefox.FirefoxProfile;
-import org.openqa.selenium.safari.SafariDriver;
-import org.openqa.selenium.support.ui.ExpectedCondition;
-import org.openqa.selenium.support.ui.WebDriverWait;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URL;
-import java.util.concurrent.TimeUnit;
-
-import static org.junit.Assert.fail;
-
-
-public class WebDriverManager {
-
-  public final static Logger LOG = LoggerFactory.getLogger(WebDriverManager.class);
-
-  private static String downLoadsDir = "";
-
-  public static WebDriver getWebDriver() {
-    WebDriver driver = null;
-
-    if (driver == null) {
-      try {
-        FirefoxBinary ffox = new FirefoxBinary();
-        if ("true".equals(System.getenv("TRAVIS"))) {
-          ffox.setEnvironmentProperty("DISPLAY", ":99"); // xvfb is supposed to
-          // run with DISPLAY 99
-        }
-        int firefoxVersion = WebDriverManager.getFirefoxVersion();
-        LOG.info("Firefox version " + firefoxVersion + " detected");
-
-        downLoadsDir = FileUtils.getTempDirectory().toString();
-
-        String tempPath = downLoadsDir + "/firebug/";
-
-        downloadFireBug(firefoxVersion, tempPath);
-
-        final String firebugPath = tempPath + "firebug.xpi";
-        final String firepathPath = tempPath + "firepath.xpi";
-
-        FirefoxProfile profile = new FirefoxProfile();
-        profile.setPreference("browser.download.folderList", 2);
-        profile.setPreference("browser.download.dir", downLoadsDir);
-        profile.setPreference("browser.helperApps.alwaysAsk.force", false);
-        profile.setPreference("browser.download.manager.showWhenStarting", false);
-        profile.setPreference("browser.download.manager.showAlertOnComplete", false);
-        profile.setPreference("browser.download.manager.closeWhenDone", true);
-        profile.setPreference("app.update.auto", false);
-        profile.setPreference("app.update.enabled", false);
-        profile.setPreference("dom.max_script_run_time", 0);
-        profile.setPreference("dom.max_chrome_script_run_time", 0);
-        profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/x-ustar,application/octet-stream,application/zip,text/csv,text/plain");
-        profile.setPreference("network.proxy.type", 0);
-
-        // Commenting out installing extensions. See ZEPPELIN-2962.
-        // profile.addExtension(new File(firebugPath));
-        // profile.addExtension(new File(firepathPath));
-
-        driver = new FirefoxDriver(ffox, profile);
-      } catch (Exception e) {
-        LOG.error("Exception in WebDriverManager while FireFox Driver ", e);
-      }
-    }
-
-    if (driver == null) {
-      try {
-        driver = new ChromeDriver();
-      } catch (Exception e) {
-        LOG.error("Exception in WebDriverManager while ChromeDriver ", e);
-      }
-    }
-
-    if (driver == null) {
-      try {
-        driver = new SafariDriver();
-      } catch (Exception e) {
-        LOG.error("Exception in WebDriverManager while SafariDriver ", e);
-      }
-    }
-
-    String url;
-    if (System.getenv("url") != null) {
-      url = System.getenv("url");
-    } else {
-      url = "http://localhost:8080";
-    }
-
-    long start = System.currentTimeMillis();
-    boolean loaded = false;
-    driver.manage().timeouts().implicitlyWait(AbstractZeppelinIT.MAX_IMPLICIT_WAIT,
-        TimeUnit.SECONDS);
-    driver.get(url);
-
-    while (System.currentTimeMillis() - start < 60 * 1000) {
-      // wait for page load
-      try {
-        (new WebDriverWait(driver, 30)).until(new ExpectedCondition<Boolean>() {
-          @Override
-          public Boolean apply(WebDriver d) {
-            return d.findElement(By.xpath("//i[@uib-tooltip='WebSocket Connected']"))
-                .isDisplayed();
-          }
-        });
-        loaded = true;
-        break;
-      } catch (TimeoutException e) {
-        LOG.info("Exception in WebDriverManager while WebDriverWait ", e);
-        driver.navigate().to(url);
-      }
-    }
-
-    if (loaded == false) {
-      fail();
-    }
-
-    driver.manage().window().maximize();
-    return driver;
-  }
-
-  private static void downloadFireBug(int firefoxVersion, String tempPath) {
-    String firebugUrlString = null;
-    if (firefoxVersion < 23)
-      firebugUrlString = "http://getfirebug.com/releases/firebug/1.11/firebug-1.11.4.xpi";
-    else if (firefoxVersion >= 23 && firefoxVersion < 30)
-      firebugUrlString = "http://getfirebug.com/releases/firebug/1.12/firebug-1.12.8.xpi";
-    else if (firefoxVersion >= 30 && firefoxVersion < 33)
-      firebugUrlString = "http://getfirebug.com/releases/firebug/2.0/firebug-2.0.7.xpi";
-    else if (firefoxVersion >= 33)
-      firebugUrlString = "http://getfirebug.com/releases/firebug/2.0/firebug-2.0.17.xpi";
-
-
-    LOG.info("firebug version: " + firefoxVersion + ", will be downloaded to " + tempPath);
-    try {
-      File firebugFile = new File(tempPath + "firebug.xpi");
-      URL firebugUrl = new URL(firebugUrlString);
-      if (!firebugFile.exists()) {
-        FileUtils.copyURLToFile(firebugUrl, firebugFile);
-      }
-
-
-      File firepathFile = new File(tempPath + "firepath.xpi");
-      URL firepathUrl = new URL("https://addons.cdn.mozilla.net/user-media/addons/11900/firepath-0.9.7.1-fx.xpi");
-      if (!firepathFile.exists()) {
-        FileUtils.copyURLToFile(firepathUrl, firepathFile);
-      }
-
-    } catch (IOException e) {
-      LOG.error("Download of firebug version: " + firefoxVersion + ", falied in path " + tempPath);
-    }
-    LOG.info("Download of firebug version: " + firefoxVersion + ", successful");
-  }
-
-  public static int getFirefoxVersion() {
-    try {
-      String firefoxVersionCmd = "firefox -v";
-      if (System.getProperty("os.name").startsWith("Mac OS")) {
-        firefoxVersionCmd = "/Applications/Firefox.app/Contents/MacOS/" + firefoxVersionCmd;
-      }
-      String versionString = (String) CommandExecutor.executeCommandLocalHost(firefoxVersionCmd, false, ProcessData.Types_Of_Data.OUTPUT);
-      return Integer.valueOf(versionString.replaceAll("Mozilla Firefox", "").trim().substring(0, 2));
-    } catch (Exception e) {
-      LOG.error("Exception in WebDriverManager while getWebDriver ", e);
-      return -1;
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java b/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
index 402a18d..74ae495 100644
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
+++ b/zeppelin-server/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
@@ -41,20 +41,4 @@ public class ZeppelinITUtils {
       LOG.info("Finished.");
     }
   }
-
-  public static void restartZeppelin() {
-    CommandExecutor.executeCommandLocalHost("../bin/zeppelin-daemon.sh restart",
-        false, ProcessData.Types_Of_Data.OUTPUT);
-    //wait for server to start.
-    sleep(5000, false);
-  }
-
-  public static void turnOffImplicitWaits(WebDriver driver) {
-    driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS);
-  }
-
-  public static void turnOnImplicitWaits(WebDriver driver) {
-    driver.manage().timeouts().implicitlyWait(AbstractZeppelinIT.MAX_IMPLICIT_WAIT,
-        TimeUnit.SECONDS);
-  }
 }

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
deleted file mode 100644
index 3d1406a..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
+++ /dev/null
@@ -1,321 +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.zeppelin.integration;
-
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.List;
-import org.apache.commons.io.FileUtils;
-import org.apache.commons.lang3.StringUtils;
-import org.apache.zeppelin.AbstractZeppelinIT;
-import org.apache.zeppelin.WebDriverManager;
-import org.apache.zeppelin.ZeppelinITUtils;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
-import org.hamcrest.CoreMatchers;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
-import org.openqa.selenium.By;
-import org.openqa.selenium.Keys;
-import org.openqa.selenium.TimeoutException;
-import org.openqa.selenium.WebElement;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * Created for org.apache.zeppelin.integration on 13/06/16.
- */
-public class AuthenticationIT extends AbstractZeppelinIT {
-  private static final Logger LOG = LoggerFactory.getLogger(AuthenticationIT.class);
-
-  @Rule
-  public ErrorCollector collector = new ErrorCollector();
-  static String shiroPath;
-  static String authShiro = "[users]\n" +
-      "admin = password1, admin\n" +
-      "finance1 = finance1, finance\n" +
-      "finance2 = finance2, finance\n" +
-      "hr1 = hr1, hr\n" +
-      "hr2 = hr2, hr\n" +
-      "[main]\n" +
-      "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
-      "securityManager.sessionManager = $sessionManager\n" +
-      "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
-      "shiro.loginUrl = /api/login\n" +
-      "anyofroles = org.apache.zeppelin.utils.AnyOfRolesAuthorizationFilter\n" +
-      "[roles]\n" +
-      "admin = *\n" +
-      "hr = *\n" +
-      "finance = *\n" +
-      "[urls]\n" +
-      "/api/version = anon\n" +
-      "/api/interpreter/** = authc, anyofroles[admin, finance]\n" +
-      "/** = authc";
-
-  static String originalShiro = "";
-
-
-  @BeforeClass
-  public static void startUp() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-
-    try {
-      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), new File("../").getAbsolutePath());
-      ZeppelinConfiguration conf = ZeppelinConfiguration.create();
-      shiroPath = conf.getRelativeDir(String.format("%s/shiro.ini", conf.getConfDir()));
-      File file = new File(shiroPath);
-      if (file.exists()) {
-        originalShiro = StringUtils.join(FileUtils.readLines(file, "UTF-8"), "\n");
-      }
-      FileUtils.write(file, authShiro, "UTF-8");
-    } catch (IOException e) {
-      LOG.error("Error in AuthenticationIT startUp::", e);
-    }
-    ZeppelinITUtils.restartZeppelin();
-    driver = WebDriverManager.getWebDriver();
-  }
-
-
-  @AfterClass
-  public static void tearDown() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      if (!StringUtils.isBlank(shiroPath)) {
-        File file = new File(shiroPath);
-        if (StringUtils.isBlank(originalShiro)) {
-          FileUtils.deleteQuietly(file);
-        } else {
-          FileUtils.write(file, originalShiro, "UTF-8");
-        }
-      }
-    } catch (IOException e) {
-      LOG.error("Error in AuthenticationIT tearDown::", e);
-    }
-    ZeppelinITUtils.restartZeppelin();
-    driver.quit();
-  }
-
-  public void authenticationUser(String userName, String password) {
-    pollingWait(By.xpath(
-        "//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"),
-        MAX_BROWSER_TIMEOUT_SEC).click();
-    ZeppelinITUtils.sleep(1000, false);
-    pollingWait(By.xpath("//*[@id='userName']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(userName);
-    pollingWait(By.xpath("//*[@id='password']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(password);
-    pollingWait(By.xpath("//*[@id='loginModalContent']//button[contains(.,'Login')]"),
-        MAX_BROWSER_TIMEOUT_SEC).click();
-    ZeppelinITUtils.sleep(1000, false);
-  }
-
-  private void testShowNotebookListOnNavbar() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-      assertTrue(driver.findElements(By.xpath("//a[@class=\"notebook-list-item ng-scope\"]")).size() > 0);
-      pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
-              MAX_BROWSER_TIMEOUT_SEC).click();
-      pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
-              MAX_BROWSER_TIMEOUT_SEC).click();
-    } catch (Exception e) {
-      handleException("Exception in ParagraphActionsIT while testShowNotebookListOnNavbar ", e);
-    }
-  }
-
-  public void logoutUser(String userName) throws URISyntaxException {
-    ZeppelinITUtils.sleep(500, false);
-    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
-        userName + "')]")).click();
-    ZeppelinITUtils.sleep(500, false);
-    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
-        userName + "')]//a[@ng-click='navbar.logout()']")).click();
-    ZeppelinITUtils.sleep(2000, false);
-    if (driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button"))
-        .isDisplayed()) {
-      driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button")).click();
-    }
-    driver.get(new URI(driver.getCurrentUrl()).resolve("/#/").toString());
-    ZeppelinITUtils.sleep(500, false);
-  }
-
-  //  @Test
-  public void testSimpleAuthentication() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      AuthenticationIT authenticationIT = new AuthenticationIT();
-      authenticationIT.authenticationUser("admin", "password1");
-
-      collector.checkThat("Check is user logged in", true,
-          CoreMatchers.equalTo(driver.findElement(By.partialLinkText("Create new note"))
-              .isDisplayed()));
-
-      authenticationIT.logoutUser("admin");
-    } catch (Exception e) {
-      handleException("Exception in AuthenticationIT while testCreateNewButton ", e);
-    }
-  }
-
-  @Test
-  public void testAnyOfRoles() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      AuthenticationIT authenticationIT = new AuthenticationIT();
-      authenticationIT.authenticationUser("admin", "password1");
-
-      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-
-      collector.checkThat("Check is user has permission to view this page", true,
-          CoreMatchers.equalTo(pollingWait(By.xpath(
-              "//div[@id='main']/div/div[2]"),
-              MIN_IMPLICIT_WAIT).isDisplayed())
-      );
-
-      authenticationIT.logoutUser("admin");
-
-      authenticationIT.authenticationUser("finance1", "finance1");
-
-      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-
-      collector.checkThat("Check is user has permission to view this page", true,
-          CoreMatchers.equalTo(pollingWait(By.xpath(
-              "//div[@id='main']/div/div[2]"),
-              MIN_IMPLICIT_WAIT).isDisplayed())
-      );
-      
-      authenticationIT.logoutUser("finance1");
-
-      authenticationIT.authenticationUser("hr1", "hr1");
-
-      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-
-      try {
-        collector.checkThat("Check is user has permission to view this page",
-            true, CoreMatchers.equalTo(
-                pollingWait(By.xpath("//li[contains(@class, 'ng-toast__message')]//span/span"),
-                    MIN_IMPLICIT_WAIT).isDisplayed()));
-      } catch (TimeoutException e) {
-        throw new Exception("Expected ngToast not found", e);
-      }
-      authenticationIT.logoutUser("hr1");
-
-    } catch (Exception e) {
-      handleException("Exception in AuthenticationIT while testAnyOfRoles ", e);
-    }
-  }
-
-  @Test
-  public void testGroupPermission() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      AuthenticationIT authenticationIT = new AuthenticationIT();
-      authenticationIT.authenticationUser("finance1", "finance1");
-      createNewNote();
-
-      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
-
-      pollingWait(By.xpath("//span[@uib-tooltip='Note permissions']"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-      pollingWait(By.xpath(".//*[@id='selectOwners']/following::span//input"),
-          MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
-      pollingWait(By.xpath(".//*[@id='selectReaders']/following::span//input"),
-          MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
-      pollingWait(By.xpath(".//*[@id='selectRunners']/following::span//input"),
-              MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
-      pollingWait(By.xpath(".//*[@id='selectWriters']/following::span//input"),
-          MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
-      pollingWait(By.xpath("//button[@ng-click='savePermissions()']"), MAX_BROWSER_TIMEOUT_SEC)
-          .sendKeys(Keys.ENTER);
-
-      pollingWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Permissions Saved ')]" +
-              "//div[@class='modal-footer']//button[contains(.,'OK')]"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-      authenticationIT.logoutUser("finance1");
-
-      authenticationIT.authenticationUser("hr1", "hr1");
-      try {
-        WebElement element = pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC);
-        collector.checkThat("Check is user has permission to view this note link", false,
-            CoreMatchers.equalTo(element.isDisplayed()));
-      } catch (Exception e) {
-        //This should have failed, nothing to worry.
-      }
-
-      driver.get(new URI(driver.getCurrentUrl()).resolve("/#/notebook/" + noteId).toString());
-
-      List<WebElement> privilegesModal = driver.findElements(
-          By.xpath("//div[@class='modal-content']//div[@class='bootstrap-dialog-header']" +
-              "//div[contains(.,'Insufficient privileges')]"));
-      collector.checkThat("Check is user has permission to view this note", 1,
-          CoreMatchers.equalTo(privilegesModal.size()));
-      driver.findElement(
-          By.xpath("//div[@class='modal-content'][contains(.,'Insufficient privileges')]" +
-              "//div[@class='modal-footer']//button[2]")).click();
-      authenticationIT.logoutUser("hr1");
-
-      authenticationIT.authenticationUser("finance2", "finance2");
-      try {
-        WebElement element = pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC);
-        collector.checkThat("Check is user has permission to view this note link", true,
-            CoreMatchers.equalTo(element.isDisplayed()));
-      } catch (Exception e) {
-        //This should have failed, nothing to worry.
-      }
-
-      driver.get(new URI(driver.getCurrentUrl()).resolve("/#/notebook/" + noteId).toString());
-
-      privilegesModal = driver.findElements(
-          By.xpath("//div[@class='modal-content']//div[@class='bootstrap-dialog-header']" +
-              "//div[contains(.,'Insufficient privileges')]"));
-      collector.checkThat("Check is user has permission to view this note", 0,
-          CoreMatchers.equalTo(privilegesModal.size()));
-      deleteTestNotebook(driver);
-      authenticationIT.logoutUser("finance2");
-
-
-    } catch (Exception e) {
-      handleException("Exception in AuthenticationIT while testGroupPermission ", e);
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java
deleted file mode 100644
index 6adc1f7..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java
+++ /dev/null
@@ -1,82 +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.zeppelin.integration;
-
-import org.apache.zeppelin.AbstractZeppelinIT;
-import org.apache.zeppelin.WebDriverManager;
-import org.hamcrest.CoreMatchers;
-import org.junit.After;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.ui.Select;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-public class InterpreterIT extends AbstractZeppelinIT {
-  private static final Logger LOG = LoggerFactory.getLogger(InterpreterIT.class);
-
-  @Rule
-  public ErrorCollector collector = new ErrorCollector();
-
-  @Before
-  public void startUp() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    driver = WebDriverManager.getWebDriver();
-  }
-
-  @After
-  public void tearDown() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    driver.quit();
-  }
-
-  @Test
-  public void testShowDescriptionOnInterpreterCreate() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      // navigate to interpreter page
-      WebElement settingButton = driver.findElement(By.xpath("//button[@class='nav-btn dropdown-toggle ng-scope']"));
-      settingButton.click();
-      WebElement interpreterLink = driver.findElement(By.xpath("//a[@href='#/interpreter']"));
-      interpreterLink.click();
-
-      WebElement createButton = driver.findElement(By.xpath("//button[contains(., 'Create')]"));
-      createButton.click();
-
-      Select select = new Select(driver.findElement(By.xpath("//select[@ng-change='newInterpreterGroupChange()']")));
-      select.selectByVisibleText("spark");
-
-      collector.checkThat("description of interpreter property is displayed",
-          driver.findElement(By.xpath("//tr/td[contains(text(), 'spark.app.name')]/following-sibling::td[3]")).getText(),
-          CoreMatchers.equalTo("The name of spark application."));
-
-    } catch (Exception e) {
-      handleException("Exception in InterpreterIT while testShowDescriptionOnInterpreterCreate ", e);
-    }
-  }
-}
\ No newline at end of file


[4/6] zeppelin git commit: [ZEPPELIN-3127] Upgrade selenium version

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
new file mode 100644
index 0000000..c47cc42
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ParagraphActionsIT.java
@@ -0,0 +1,824 @@
+/*
+ * 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.zeppelin.integration;
+
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.zeppelin.AbstractZeppelinIT;
+import org.apache.zeppelin.WebDriverManager;
+import org.apache.zeppelin.ZeppelinITUtils;
+import org.hamcrest.CoreMatchers;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+import org.openqa.selenium.By;
+import org.openqa.selenium.Keys;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.interactions.Actions;
+import org.openqa.selenium.support.ui.Select;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ParagraphActionsIT extends AbstractZeppelinIT {
+  private static final Logger LOG = LoggerFactory.getLogger(ParagraphActionsIT.class);
+
+
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
+
+  @Before
+  public void startUp() {
+    driver = WebDriverManager.getWebDriver();
+  }
+
+  @After
+  public void tearDown() {
+    driver.quit();
+  }
+
+  @Test
+  public void testCreateNewButton() throws Exception {
+    try {
+      createNewNote();
+      Actions action = new Actions(driver);
+      waitForParagraph(1, "READY");
+      Integer oldNosOfParas = driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
+      collector.checkThat("Before Insert New : the number of  paragraph ",
+          oldNosOfParas,
+          CoreMatchers.equalTo(1));
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]")).click();
+      waitForParagraph(2, "READY");
+      Integer newNosOfParas = driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
+      collector.checkThat("After Insert New (using Insert New button) :  number of  paragraph",
+          oldNosOfParas + 1,
+          CoreMatchers.equalTo(newNosOfParas));
+
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='removeParagraph(paragraph)']")).click();
+      ZeppelinITUtils.sleep(1000, false);
+      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'delete this paragraph')]" +
+          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
+      ZeppelinITUtils.sleep(1000, false);
+
+      setTextOfParagraph(1, " original paragraph ");
+
+      WebElement newPara = driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class,'new-paragraph')][1]"));
+      action.moveToElement(newPara).click().build().perform();
+      ZeppelinITUtils.sleep(1000, false);
+      waitForParagraph(1, "READY");
+
+      collector.checkThat("Paragraph is created above",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo(StringUtils.EMPTY));
+      setTextOfParagraph(1, " this is above ");
+
+      newPara = driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class,'new-paragraph')][2]"));
+      action.moveToElement(newPara).click().build().perform();
+
+      waitForParagraph(3, "READY");
+
+      collector.checkThat("Paragraph is created below",
+          driver.findElement(By.xpath(getParagraphXPath(3) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo(StringUtils.EMPTY));
+      setTextOfParagraph(3, " this is below ");
+
+      collector.checkThat("The output field of paragraph1 contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo(" this is above "));
+      collector.checkThat("The output field paragraph2 contains",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo(" original paragraph "));
+      collector.checkThat("The output field paragraph3 contains",
+          driver.findElement(By.xpath(getParagraphXPath(3) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo(" this is below "));
+      collector.checkThat("The current number of paragraphs after creating  paragraph above and below",
+          driver.findElements(By.xpath("//div[@ng-controller=\"ParagraphCtrl\"]")).size(),
+          CoreMatchers.equalTo(3));
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testCreateNewButton ", e);
+    }
+
+  }
+
+  @Test
+  public void testRemoveButton() throws Exception {
+    try {
+      createNewNote();
+
+      waitForParagraph(1, "READY");
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]"))
+          .click();
+      waitForParagraph(2, "READY");
+      Integer oldNosOfParas = driver.findElements(By.xpath
+          ("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
+      collector.checkThat("Before Remove : Number of paragraphs are ",
+          oldNosOfParas,
+          CoreMatchers.equalTo(2));
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='removeParagraph(paragraph)']"));
+
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'delete this paragraph')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+
+      Integer newNosOfParas = driver.findElements(By.xpath
+          ("//div[@ng-controller=\"ParagraphCtrl\"]")).size();
+      collector.checkThat("After Remove : Number of paragraphs are",
+          newNosOfParas,
+          CoreMatchers.equalTo(oldNosOfParas - 1));
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testRemoveButton ", e);
+    }
+  }
+
+  @Test
+  public void testMoveUpAndDown() throws Exception {
+    try {
+      createNewNote();
+
+      waitForParagraph(1, "READY");
+      setTextOfParagraph(1, "1");
+
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click=\"insertNew('below')\"]")).click();
+
+
+      waitForParagraph(2, "READY");
+      setTextOfParagraph(2, "2");
+
+
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo("1"));
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo("2"));
+
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='moveDown(paragraph)']"));
+
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo("2"));
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo("1"));
+
+      driver.findElement(By.xpath(getParagraphXPath(2) + "//span[@class='icon-settings']")).click();
+      clickAndWait(By.xpath(getParagraphXPath(2) + "//ul/li/a[@ng-click='moveUp(paragraph)']"));
+
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo("1"));
+      collector.checkThat("The paragraph1 value contains",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'editor')]")).getText(),
+          CoreMatchers.equalTo("2"));
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testMoveUpAndDown ", e);
+    }
+
+  }
+
+  @Test
+  public void testDisableParagraphRunButton() throws Exception {
+    try {
+      createNewNote();
+
+      waitForParagraph(1, "READY");
+      setTextOfParagraph(1, "println (\"abcd\")");
+
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/a[@ng-click='toggleEnableDisable(paragraph)']"));
+      collector.checkThat("The play button class was ",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-control-play shortcut-icon']")).isDisplayed(), CoreMatchers.equalTo(false)
+      );
+
+      driver.findElement(By.xpath(".//*[@id='main']//button[contains(@ng-click, 'runAllParagraphs')]")).sendKeys(Keys.ENTER);
+      ZeppelinITUtils.sleep(1000, true);
+      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'Run all paragraphs?')]" +
+          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
+      ZeppelinITUtils.sleep(2000, false);
+
+      collector.checkThat("Paragraph status is ",
+          getParagraphStatus(1), CoreMatchers.equalTo("READY")
+      );
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testDisableParagraphRunButton ", e);
+    }
+  }
+
+  @Test
+  public void testRunOnSelectionChange() throws Exception {
+    try {
+      String xpathToRunOnSelectionChangeCheckbox = getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]";
+      String xpathToDropdownMenu = getParagraphXPath(1) + "//select";
+      String xpathToResultText = getParagraphXPath(1) + "//div[contains(@id,\"_html\")]";
+
+      createNewNote();
+
+      waitForParagraph(1, "READY");
+      setTextOfParagraph(1, "%md My selection is ${my selection=1,1|2|3}");
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+
+      // 1. 'RunOnSelectionChange' is true by default
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      collector.checkThat("'Run on selection change' checkbox will be shown under dropdown menu ",
+        driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-click, 'turnOnAutoRun(paragraph)')]")).isDisplayed(),
+        CoreMatchers.equalTo(true));
+
+      Select dropDownMenu = new Select(driver.findElement(By.xpath((xpathToDropdownMenu))));
+      dropDownMenu.selectByVisibleText("2");
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("If 'RunOnSelectionChange' is true, the paragraph result will be updated right after click any options in the dropdown menu ",
+        driver.findElement(By.xpath(xpathToResultText)).getText(),
+        CoreMatchers.equalTo("My selection is 2"));
+
+      // 2. set 'RunOnSelectionChange' to false
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      driver.findElement(By.xpath(xpathToRunOnSelectionChangeCheckbox)).click();
+      collector.checkThat("If 'Run on selection change' checkbox is unchecked, 'paragraph.config.runOnSelectionChange' will be false ",
+        driver.findElement(By.xpath(getParagraphXPath(1) + "//ul/li/span[contains(@ng-if, 'paragraph.config.runOnSelectionChange == false')]")).isDisplayed(),
+        CoreMatchers.equalTo(true));
+
+      Select sameDropDownMenu = new Select(driver.findElement(By.xpath((xpathToDropdownMenu))));
+      sameDropDownMenu.selectByVisibleText("1");
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("If 'RunOnSelectionChange' is false, the paragraph result won't be updated even if we select any options in the dropdown menu ",
+        driver.findElement(By.xpath(xpathToResultText)).getText(),
+        CoreMatchers.equalTo("My selection is 2"));
+
+      // run paragraph manually by pressing ENTER
+      driver.findElement(By.xpath(xpathToDropdownMenu)).sendKeys(Keys.ENTER);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("Even if 'RunOnSelectionChange' is set as false, still can run the paragraph by pressing ENTER ",
+        driver.findElement(By.xpath(xpathToResultText)).getText(),
+        CoreMatchers.equalTo("My selection is 1"));
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testRunOnSelectionChange ", e);
+    }
+  }
+
+  @Test
+  public void testClearOutputButton() throws Exception {
+    try {
+      createNewNote();
+
+      waitForParagraph(1, "READY");
+      String xpathToOutputField = getParagraphXPath(1) + "//div[contains(@id,\"_text\")]";
+      setTextOfParagraph(1, "println (\"abcd\")");
+      collector.checkThat("Before Run Output field contains ",
+          driver.findElements(By.xpath(xpathToOutputField)).size(),
+          CoreMatchers.equalTo(0));
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("After Run Output field contains  ",
+          driver.findElement(By.xpath(xpathToOutputField)).getText(),
+          CoreMatchers.equalTo("abcd"));
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      clickAndWait(By.xpath(getParagraphXPath(1) +
+          "//ul/li/a[@ng-click='clearParagraphOutput(paragraph)']"));
+      collector.checkThat("After Clear  Output field contains ",
+          driver.findElements(By.xpath(xpathToOutputField)).size(),
+          CoreMatchers.equalTo(0));
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testClearOutputButton ", e);
+    }
+  }
+
+  @Test
+  public void testWidth() throws Exception {
+    try {
+      createNewNote();
+      waitForParagraph(1, "READY");
+
+      collector.checkThat("Default Width is 12 ",
+          driver.findElement(By.xpath("//div[contains(@class,'col-md-12')]")).isDisplayed(),
+          CoreMatchers.equalTo(true));
+      for (Integer newWidth = 1; newWidth <= 11; newWidth++) {
+        clickAndWait(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']"));
+        String visibleText = newWidth.toString();
+        new Select(driver.findElement(By.xpath(getParagraphXPath(1)
+            + "//ul/li/a/select[(@ng-model='paragraph.config.colWidth')]"))).selectByVisibleText(visibleText);
+        collector.checkThat("New Width is : " + newWidth,
+            driver.findElement(By.xpath("//div[contains(@class,'col-md-" + newWidth + "')]")).isDisplayed(),
+            CoreMatchers.equalTo(true));
+      }
+      deleteTestNotebook(driver);
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testWidth ", e);
+    }
+  }
+
+  @Test
+  public void testFontSize() throws Exception {
+    try {
+      createNewNote();
+      waitForParagraph(1, "READY");
+      Float height = Float.valueOf(driver.findElement(By.xpath("//div[contains(@class,'ace_content')]"))
+          .getCssValue("height").replace("px", ""));
+      for (Integer newFontSize = 10; newFontSize <= 20; newFontSize++) {
+        clickAndWait(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']"));
+        String visibleText = newFontSize.toString();
+        new Select(driver.findElement(By.xpath(getParagraphXPath(1)
+            + "//ul/li/a/select[(@ng-model='paragraph.config.fontSize')]"))).selectByVisibleText(visibleText);
+        Float newHeight = Float.valueOf(driver.findElement(By.xpath("//div[contains(@class,'ace_content')]"))
+            .getCssValue("height").replace("px", ""));
+        collector.checkThat("New Font size is : " + newFontSize,
+            newHeight > height,
+            CoreMatchers.equalTo(true));
+        height = newHeight;
+      }
+      deleteTestNotebook(driver);
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testFontSize ", e);
+    }
+  }
+
+  @Test
+  public void testTitleButton() throws Exception {
+    try {
+      createNewNote();
+
+      waitForParagraph(1, "READY");
+
+      String xpathToTitle = getParagraphXPath(1) + "//div[contains(@class, 'title')]/div";
+      String xpathToSettingIcon = getParagraphXPath(1) + "//span[@class='icon-settings']";
+      String xpathToShowTitle = getParagraphXPath(1) + "//ul/li/a[@ng-show='!paragraph.config.title']";
+      String xpathToHideTitle = getParagraphXPath(1) + "//ul/li/a[@ng-show='paragraph.config.title']";
+
+      ZeppelinITUtils.turnOffImplicitWaits(driver);
+      Integer titleElems = driver.findElements(By.xpath(xpathToTitle)).size();
+      collector.checkThat("Before Show Title : The title doesn't exist",
+          titleElems,
+          CoreMatchers.equalTo(0));
+      ZeppelinITUtils.turnOnImplicitWaits(driver);
+
+      clickAndWait(By.xpath(xpathToSettingIcon));
+      collector.checkThat("Before Show Title : The title option in option panel of paragraph is labeled as",
+          driver.findElement(By.xpath(xpathToShowTitle)).getText(),
+          CoreMatchers.allOf(CoreMatchers.endsWith("Show title"), CoreMatchers.containsString("Ctrl+"),
+              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
+              CoreMatchers.containsString("+T")));
+
+      clickAndWait(By.xpath(xpathToShowTitle));
+      collector.checkThat("After Show Title : The title field contains",
+          driver.findElement(By.xpath(xpathToTitle)).getText(),
+          CoreMatchers.equalTo("Untitled"));
+
+      clickAndWait(By.xpath(xpathToSettingIcon));
+      collector.checkThat("After Show Title : The title option in option panel of paragraph is labeled as",
+          driver.findElement(By.xpath(xpathToHideTitle)).getText(),
+          CoreMatchers.allOf(CoreMatchers.endsWith("Hide title"), CoreMatchers.containsString("Ctrl+"),
+              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
+              CoreMatchers.containsString("+T")));
+
+      clickAndWait(By.xpath(xpathToHideTitle));
+      ZeppelinITUtils.turnOffImplicitWaits(driver);
+      titleElems = driver.findElements(By.xpath(xpathToTitle)).size();
+      collector.checkThat("After Hide Title : The title field is hidden",
+          titleElems,
+          CoreMatchers.equalTo(0));
+      ZeppelinITUtils.turnOnImplicitWaits(driver);
+
+      driver.findElement(By.xpath(xpathToSettingIcon)).click();
+      driver.findElement(By.xpath(xpathToShowTitle)).click();
+
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'title')]")).click();
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//input")).sendKeys("NEW TITLE" + Keys.ENTER);
+      ZeppelinITUtils.sleep(500, false);
+      collector.checkThat("After Editing the Title : The title field contains ",
+          driver.findElement(By.xpath(xpathToTitle)).getText(),
+          CoreMatchers.equalTo("NEW TITLE"));
+      driver.navigate().refresh();
+      ZeppelinITUtils.sleep(1000, false);
+      collector.checkThat("After Page Refresh : The title field contains ",
+          driver.findElement(By.xpath(xpathToTitle)).getText(),
+          CoreMatchers.equalTo("NEW TITLE"));
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testTitleButton  ", e);
+    }
+
+  }
+
+  @Test
+  public void testShowAndHideLineNumbers() throws Exception {
+    try {
+      createNewNote();
+
+      waitForParagraph(1, "READY");
+      String xpathToLineNumberField = getParagraphXPath(1) + "//div[contains(@class, 'ace_gutter-layer')]";
+      String xpathToShowLineNumberButton = getParagraphXPath(1) + "//ul/li/a[@ng-click='showLineNumbers(paragraph)']";
+      String xpathToHideLineNumberButton = getParagraphXPath(1) + "//ul/li/a[@ng-click='hideLineNumbers(paragraph)']";
+
+      collector.checkThat("Before \"Show line number\" the Line Number is Enabled ",
+          driver.findElement(By.xpath(xpathToLineNumberField)).isDisplayed(),
+          CoreMatchers.equalTo(false));
+
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      collector.checkThat("Before \"Show line number\" The option panel in paragraph has button labeled ",
+          driver.findElement(By.xpath(xpathToShowLineNumberButton)).getText(),
+          CoreMatchers.allOf(CoreMatchers.endsWith("Show line numbers"), CoreMatchers.containsString("Ctrl+"),
+              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
+              CoreMatchers.containsString("+M")));
+
+
+      clickAndWait(By.xpath(xpathToShowLineNumberButton));
+      collector.checkThat("After \"Show line number\" the Line Number is Enabled ",
+          driver.findElement(By.xpath(xpathToLineNumberField)).isDisplayed(),
+          CoreMatchers.equalTo(true));
+
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']"));
+      collector.checkThat("After \"Show line number\" The option panel in paragraph has button labeled ",
+          driver.findElement(By.xpath(xpathToHideLineNumberButton)).getText(),
+          CoreMatchers.allOf(CoreMatchers.endsWith("Hide line numbers"), CoreMatchers.containsString("Ctrl+"),
+              CoreMatchers.anyOf(CoreMatchers.containsString("Option"), CoreMatchers.containsString("Alt")),
+              CoreMatchers.containsString("+M")));
+
+      clickAndWait(By.xpath(xpathToHideLineNumberButton));
+      collector.checkThat("After \"Hide line number\" the Line Number is Enabled",
+          driver.findElement(By.xpath(xpathToLineNumberField)).isDisplayed(),
+          CoreMatchers.equalTo(false));
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testShowAndHideLineNumbers ", e);
+    }
+  }
+
+  @Test
+  public void testEditOnDoubleClick() throws Exception {
+    try {
+      createNewNote();
+      Actions action = new Actions(driver);
+
+      waitForParagraph(1, "READY");
+
+      setTextOfParagraph(1, "%md");
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//textarea")).sendKeys(Keys.ARROW_RIGHT);
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//textarea")).sendKeys(Keys.ENTER);
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//textarea")).sendKeys(Keys.SHIFT + "3");
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//textarea")).sendKeys(" abc");
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+
+      collector.checkThat("Markdown editor is hidden after run ",
+          driver.findElements(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-if, 'paragraph.config.editorHide')]")).size(),
+          CoreMatchers.equalTo(0));
+
+      collector.checkThat("Markdown editor is shown after run ",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-show, 'paragraph.config.tableHide')]")).isDisplayed(),
+          CoreMatchers.equalTo(true));
+
+      // to check if editOnDblClick field is fetched correctly after refresh
+      driver.navigate().refresh();
+      waitForParagraph(1, "FINISHED");
+
+      action.doubleClick(driver.findElement(By.xpath(getParagraphXPath(1)))).perform();
+      ZeppelinITUtils.sleep(1000, false);
+      collector.checkThat("Markdown editor is shown after double click ",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-if, 'paragraph.config.editorHide')]")).isDisplayed(),
+          CoreMatchers.equalTo(true));
+
+      collector.checkThat("Markdown editor is hidden after double click ",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@ng-show, 'paragraph.config.tableHide')]")).isDisplayed(),
+          CoreMatchers.equalTo(false));
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testEditOnDoubleClick ", e);
+    }
+  }
+
+  @Test
+  public void testSingleDynamicFormTextInput() throws Exception {
+    try {
+      createNewNote();
+
+      setTextOfParagraph(1, "%spark println(\"Hello \"+z.textbox(\"name\", \"world\")) ");
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("Output text is equal to value specified initially",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Hello world"));
+
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//input")).clear();
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//input")).sendKeys("Zeppelin");
+
+      collector.checkThat("After new data in text input form, output should not be changed",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Hello world"));
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("Only after running the paragraph, we can see the newly updated output",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Hello Zeppelin"));
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testSingleDynamicFormTextInput  ", e);
+    }
+  }
+
+  @Test
+  public void testSingleDynamicFormSelectForm() throws Exception {
+    try {
+      createNewNote();
+
+      setTextOfParagraph(1, "%spark println(\"Howdy \"+z.select(\"names\", Seq((\"1\",\"Alice\"), " +
+              "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("Output text should not display any of the options in select form",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy "));
+
+      Select dropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
+
+      dropDownMenu.selectByVisibleText("Alice");
+      collector.checkThat("After selection in drop down menu, output should display the newly selected option",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy 1"));
+
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
+
+      Select sameDropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
+      sameDropDownMenu.selectByVisibleText("Bob");
+      collector.checkThat("After 'Run on selection change' checkbox is unchecked, the paragraph should not run if selecting a different option",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy 1"));
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testSingleDynamicFormSelectForm  ", e);
+    }
+  }
+
+  @Test
+  public void testSingleDynamicFormCheckboxForm() throws Exception {
+    try {
+      createNewNote();
+
+      setTextOfParagraph(1, "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), " +
+              "(\"luke\",\"Luke\")); println(\"Greetings \"+z.checkbox(\"skywalkers\",options).mkString(\" and \"))");
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("Output text should display all of the options included in check boxes",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.containsString("Greetings han and leia and luke"));
+
+      WebElement firstCheckbox = driver.findElement(By.xpath("(" + getParagraphXPath(1) + "//input[@type='checkbox'])[1]"));
+      firstCheckbox.click();
+      collector.checkThat("After unchecking one of the boxes, we can see the newly updated output without the option we unchecked",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.containsString("Greetings leia and luke"));
+
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
+
+      WebElement secondCheckbox = driver.findElement(By.xpath("(" + getParagraphXPath(1) + "//input[@type='checkbox'])[2]"));
+      secondCheckbox.click();
+      collector.checkThat("After 'Run on selection change' checkbox is unchecked, the paragraph should not run if check box state is modified",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.containsString("Greetings leia and luke"));
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testSingleDynamicFormCheckboxForm  ", e);
+    }
+  }
+
+  @Test
+  public void testMultipleDynamicFormsSameType() throws Exception {
+    try {
+      createNewNote();
+
+      setTextOfParagraph(1, "%spark println(\"Howdy \"+z.select(\"fruits\", Seq((\"1\",\"Apple\")," +
+              "(\"2\",\"Orange\"),(\"3\",\"Peach\")))); println(\"Howdy \"+z.select(\"planets\", " +
+              "Seq((\"1\",\"Venus\"),(\"2\",\"Earth\"),(\"3\",\"Mars\"))))");
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("Output text should not display any of the options in select form",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy \nHowdy "));
+
+      Select dropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[1]"))));
+      dropDownMenu.selectByVisibleText("Apple");
+      collector.checkThat("After selection in drop down menu, output should display the new option we selected",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy 1\nHowdy "));
+
+      driver.findElement(By.xpath(getParagraphXPath(1) + "//span[@class='icon-settings']")).click();
+      clickAndWait(By.xpath(getParagraphXPath(1) + "//ul/li/form/input[contains(@ng-checked, 'true')]"));
+
+      Select sameDropDownMenu = new Select(driver.findElement(By.xpath("(" + (getParagraphXPath(1) + "//select)[2]"))));
+      sameDropDownMenu.selectByVisibleText("Earth");
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("After 'Run on selection change' checkbox is unchecked, the paragraph should not run if selecting a different option",
+              driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+              CoreMatchers.equalTo("Howdy 1\nHowdy "));
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testMultipleDynamicFormsSameType  ", e);
+    }
+  }
+
+  @Test
+  public void testNoteDynamicFormTextInput() throws Exception {
+    try {
+      createNewNote();
+
+      setTextOfParagraph(1, "%spark println(\"Hello \"+z.noteTextbox(\"name\", \"world\")) ");
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("Output text is equal to value specified initially", driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(), CoreMatchers.equalTo("Hello world"));
+      driver.findElement(By.xpath(getNoteFormsXPath() + "//input")).clear();
+      driver.findElement(By.xpath(getNoteFormsXPath() + "//input")).sendKeys("Zeppelin");
+      driver.findElement(By.xpath(getNoteFormsXPath() + "//input")).sendKeys(Keys.RETURN);
+
+      collector.checkThat("After new data in text input form, output should not be changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("Hello world"));
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("Only after running the paragraph, we can see the newly updated output",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("Hello Zeppelin"));
+
+      setTextOfParagraph(2, "%spark println(\"Hello \"+z.noteTextbox(\"name\", \"world\")) ");
+      runParagraph(2);
+      waitForParagraph(2, "FINISHED");
+      collector.checkThat("Running the another paragraph with same form, we can see value from note form",
+      driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+      CoreMatchers.equalTo("Hello Zeppelin"));
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testNoteDynamicFormTextInput  ", e);
+    }
+  }
+
+  @Test
+  public void testNoteDynamicFormSelect() throws Exception {
+    try {
+      createNewNote();
+
+      setTextOfParagraph(1, "%spark println(\"Howdy \"+z.noteSelect(\"names\", Seq((\"1\",\"Alice\"), " +
+          "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("Output text should not display any of the options in select form",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("Howdy "));
+
+      Select dropDownMenu = new Select(driver.findElement(By.xpath("(" + (getNoteFormsXPath() + "//select)[1]"))));
+
+      dropDownMenu.selectByVisibleText("Bob");
+      collector.checkThat("After selection in drop down menu, output should not be changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("Howdy "));
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+
+      collector.checkThat("After run paragraph again, we can see the newly updated output",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("Howdy 2"));
+
+      setTextOfParagraph(2, "%spark println(\"Howdy \"+z.noteSelect(\"names\", Seq((\"1\",\"Alice\"), " +
+          "(\"2\",\"Bob\"),(\"3\",\"stranger\"))))");
+
+      runParagraph(2);
+      waitForParagraph(2, "FINISHED");
+
+      collector.checkThat("Running the another paragraph with same form, we can see value from note form",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("Howdy 2"));
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testNoteDynamicFormSelect  ", e);
+    }
+  }
+
+  @Test
+  public void testDynamicNoteFormCheckbox() throws Exception {
+    try {
+      createNewNote();
+
+      setTextOfParagraph(1, "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), " +
+          "(\"luke\",\"Luke\")); println(\"Greetings \"+z.noteCheckbox(\"skywalkers\",options).mkString(\" and \"))");
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      collector.checkThat("Output text should display all of the options included in check boxes",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.containsString("Greetings han and leia and luke"));
+
+      WebElement firstCheckbox = driver.findElement(By.xpath("(" + getNoteFormsXPath() + "//input[@type='checkbox'])[1]"));
+      firstCheckbox.click();
+      collector.checkThat("After unchecking one of the boxes, output should not be changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.containsString("Greetings han and leia and luke"));
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+
+      collector.checkThat("After run paragraph again, we can see the newly updated output",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.containsString("Greetings leia and luke"));
+
+      setTextOfParagraph(2, "%spark val options = Seq((\"han\",\"Han\"), (\"leia\",\"Leia\"), " +
+          "(\"luke\",\"Luke\")); println(\"Greetings \"+z.noteCheckbox(\"skywalkers\",options).mkString(\" and \"))");
+
+      runParagraph(2);
+      waitForParagraph(2, "FINISHED");
+
+      collector.checkThat("Running the another paragraph with same form, we can see value from note form",
+          driver.findElement(By.xpath(getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.containsString("Greetings leia and luke"));
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testDynamicNoteFormCheckbox  ", e);
+    }
+  }
+
+  @Test
+  public void testWithNoteAndParagraphDynamicFormTextInput() throws Exception {
+    try {
+      createNewNote();
+
+      setTextOfParagraph(1, "%spark println(z.noteTextbox(\"name\", \"note\") + \" \" + z.textbox(\"name\", \"paragraph\")) ");
+
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+
+      collector.checkThat("After run paragraph, we can see computed output from two forms",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("note paragraph"));
+
+      deleteTestNotebook(driver);
+
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testWithNoteAndParagraphDynamicFormTextInput  ", e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
new file mode 100644
index 0000000..3133564
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/PersonalizeActionsIT.java
@@ -0,0 +1,339 @@
+/*
+ * 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.zeppelin.integration;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.zeppelin.AbstractZeppelinIT;
+import org.apache.zeppelin.integration.AuthenticationIT;
+import org.apache.zeppelin.WebDriverManager;
+import org.apache.zeppelin.ZeppelinITUtils;
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.hamcrest.CoreMatchers;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.WebDriverWait;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.TimeoutException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.commons.io.FileUtils;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+
+import static org.junit.Assert.assertTrue;
+
+public class PersonalizeActionsIT extends AbstractZeppelinIT {
+  private static final Logger LOG = LoggerFactory.getLogger(PersonalizeActionsIT.class);
+
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
+  static String shiroPath;
+  static String authShiro = "[users]\n" +
+      "admin = password1, admin\n" +
+      "user1 = password2, user\n" +
+      "[main]\n" +
+      "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
+      "securityManager.sessionManager = $sessionManager\n" +
+      "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
+      "shiro.loginUrl = /api/login\n" +
+      "[roles]\n" +
+      "admin = *\n" +
+      "user = *\n" +
+      "[urls]\n" +
+      "/api/version = anon\n" +
+      "/** = authc";
+
+  static String originalShiro = "";
+
+  @BeforeClass
+  public static void startUp() {
+    try {
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), new File("../").getAbsolutePath());
+      ZeppelinConfiguration conf = ZeppelinConfiguration.create();
+      shiroPath = conf.getRelativeDir(String.format("%s/shiro.ini", conf.getConfDir()));
+      File file = new File(shiroPath);
+      if (file.exists()) {
+        originalShiro = StringUtils.join(FileUtils.readLines(file, "UTF-8"), "\n");
+      }
+      FileUtils.write(file, authShiro, "UTF-8");
+    } catch (IOException e) {
+      LOG.error("Error in PersonalizeActionsIT startUp::", e);
+    }
+    ZeppelinITUtils.restartZeppelin();
+    driver = WebDriverManager.getWebDriver();
+  }
+
+  @AfterClass
+  public static void tearDown() {
+    try {
+      if (!StringUtils.isBlank(shiroPath)) {
+        File file = new File(shiroPath);
+        if (StringUtils.isBlank(originalShiro)) {
+          FileUtils.deleteQuietly(file);
+        } else {
+          FileUtils.write(file, originalShiro, "UTF-8");
+        }
+      }
+    } catch (IOException e) {
+      LOG.error("Error in PersonalizeActionsIT tearDown::", e);
+    }
+    ZeppelinITUtils.restartZeppelin();
+    driver.quit();
+  }
+
+  private void setParagraphText(String text) {
+    setTextOfParagraph(1, "%md\\n # " + text);
+    runParagraph(1);
+    waitForParagraph(1, "FINISHED");
+  }
+
+  @Test
+  public void testSimpleAction() throws Exception {
+    try {
+      // step 1 : (admin) create a new note, run a paragraph and turn on personalized mode
+      AuthenticationIT authenticationIT = new AuthenticationIT();
+      PersonalizeActionsIT personalizeActionsIT = new PersonalizeActionsIT();
+      authenticationIT.authenticationUser("admin", "password1");
+      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
+      WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      waitForParagraph(1, "READY");
+      personalizeActionsIT.setParagraphText("Before");
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
+          CoreMatchers.equalTo("Before"));
+      pollingWait(By.xpath("//*[@id='actionbar']" +
+          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      authenticationIT.logoutUser("admin");
+
+      // step 2 : (user1) make sure it is on personalized mode and 'Before' in result of paragraph
+      authenticationIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
+      wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
+      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      collector.checkThat("The personalized mode enables",
+          driver.findElement(By.xpath("//*[@id='actionbar']" +
+              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
+          CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
+      waitForParagraph(1, "READY");
+      runParagraph(1);
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
+          CoreMatchers.equalTo("Before"));
+      authenticationIT.logoutUser("user1");
+
+      // step 3 : (admin) change paragraph contents to 'After' and check result of paragraph
+      authenticationIT.authenticationUser("admin", "password1");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
+      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      waitForParagraph(1, "FINISHED");
+      personalizeActionsIT.setParagraphText("After");
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
+          CoreMatchers.equalTo("After"));
+      authenticationIT.logoutUser("admin");
+
+      // step 4 : (user1) check whether result is 'Before' or not
+      authenticationIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
+      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'markdown-body')]")).getText(),
+          CoreMatchers.equalTo("Before"));
+      authenticationIT.logoutUser("user1");
+    } catch (Exception e) {
+      handleException("Exception in PersonalizeActionsIT while testSimpleAction ", e);
+    }
+  }
+
+  @Test
+  public void testGraphAction() throws Exception {
+    try {
+      // step 1 : (admin) create a new note, run a paragraph, change active graph to 'Bar chart', turn on personalized mode
+      AuthenticationIT authenticationIT = new AuthenticationIT();
+      authenticationIT.authenticationUser("admin", "password1");
+      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
+      WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      setTextOfParagraph(1, "print(s\"\"\"%table\\n" +
+          "name\\tsize\\n" +
+          "sun\\t100\\n" +
+          "moon\\t10\"\"\")");
+
+      runParagraph(1);
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Exception in PersonalizeActionsIT while testGraphAction, status of 1st Spark Paragraph ",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//button[contains(@uib-tooltip, 'Bar Chart')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
+              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
+          CoreMatchers.equalTo("fa fa-bar-chart"));
+
+      pollingWait(By.xpath("//*[@id='actionbar']" +
+          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      authenticationIT.logoutUser("admin");
+
+      // step 2 : (user1) make sure it is on personalized mode and active graph is 'Bar chart',
+      // try to change active graph to 'Table' and then check result
+      authenticationIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
+      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      collector.checkThat("The personalized mode enables",
+          driver.findElement(By.xpath("//*[@id='actionbar']" +
+              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
+          CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
+
+      collector.checkThat("Make sure the output of graph mode is",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
+              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
+          CoreMatchers.equalTo("fa fa-bar-chart"));
+
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//button[contains(@uib-tooltip, 'Table')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      collector.checkThat("The output of graph mode is not changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//button[contains(@class," +
+              "'btn btn-default btn-sm ng-binding ng-scope active')]//i")).getAttribute("class"),
+          CoreMatchers.equalTo("fa fa-bar-chart"));
+      authenticationIT.logoutUser("user1");
+
+    } catch (Exception e) {
+      handleException("Exception in PersonalizeActionsIT while testGraphAction ", e);
+    }
+  }
+
+  @Test
+  public void testDynamicFormAction() throws Exception {
+    try {
+      // step 1 : (admin) login, create a new note, run a paragraph with data of spark tutorial, logout.
+      AuthenticationIT authenticationIT = new AuthenticationIT();
+      authenticationIT.authenticationUser("admin", "password1");
+      By locator = By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebDriverWait wait = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
+      WebElement element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      setTextOfParagraph(1, "%spark println(\"Status: \"+z.textbox(\"name\", \"Before\")) ");
+      runParagraph(1);
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Exception in PersonalizeActionsIT while testDynamicFormAction, status of 1st Spark Paragraph ",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) +
+              "//input[contains(@name, 'name')]")).getAttribute("value"),
+          CoreMatchers.equalTo("Before"));
+
+      pollingWait(By.xpath("//*[@id='actionbar']" +
+          "//button[contains(@uib-tooltip, 'Switch to personal mode')]"), MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to personalize your analysis?')" +
+          "]//div[@class='modal-footer']//button[contains(.,'OK')]"));
+      authenticationIT.logoutUser("admin");
+
+      // step 2 : (user1) make sure it is on personalized mode and  dynamic form value is 'Before',
+      // try to change dynamic form value to 'After' and then check result
+      authenticationIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]");
+      element = wait.until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      collector.checkThat("The personalized mode enables",
+          driver.findElement(By.xpath("//*[@id='actionbar']" +
+              "//button[contains(@class, 'btn btn-default btn-xs ng-scope ng-hide')]")).getAttribute("uib-tooltip"),
+          CoreMatchers.equalTo("Switch to personal mode (owner can change)"));
+
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) +
+              "//input[contains(@name, 'name')]")).getAttribute("value"),
+          CoreMatchers.equalTo("Before"));
+
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//input[contains(@name, 'name')]"), MAX_BROWSER_TIMEOUT_SEC).clear();
+      pollingWait(By.xpath(getParagraphXPath(1) +
+          "//input[contains(@name, 'name')]"), MAX_BROWSER_TIMEOUT_SEC).sendKeys("After");
+
+      runParagraph(1);
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Exception in PersonalizeActionsIT while testDynamicFormAction, status of 1st Spark Paragraph ",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+
+      collector.checkThat("The output of graph mode is changed",
+          driver.findElement(By.xpath(getParagraphXPath(1) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("Status: Before"));
+      authenticationIT.logoutUser("user1");
+
+    } catch (Exception e) {
+      handleException("Exception in PersonalizeActionsIT while testGraphAction ", e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java
new file mode 100644
index 0000000..f7bb776
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/SparkParagraphIT.java
@@ -0,0 +1,232 @@
+/*
+ * 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.zeppelin.integration;
+
+
+import org.apache.zeppelin.AbstractZeppelinIT;
+import org.apache.zeppelin.WebDriverManager;
+import org.hamcrest.CoreMatchers;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+import org.openqa.selenium.By;
+import org.openqa.selenium.TimeoutException;
+import org.openqa.selenium.WebElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.List;
+
+public class SparkParagraphIT extends AbstractZeppelinIT {
+  private static final Logger LOG = LoggerFactory.getLogger(SparkParagraphIT.class);
+
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
+
+  @Before
+  public void startUp() {
+    driver = WebDriverManager.getWebDriver();
+    createNewNote();
+    waitForParagraph(1, "READY");
+  }
+
+  @After
+  public void tearDown() {
+    deleteTestNotebook(driver);
+    driver.quit();
+  }
+
+  @Test
+  public void testSpark() throws Exception {
+    try {
+      setTextOfParagraph(1, "sc.version");
+      runParagraph(1);
+
+      waitForParagraph(1, "FINISHED");
+
+      /*
+      equivalent of
+      import org.apache.commons.io.IOUtils
+      import java.net.URL
+      import java.nio.charset.Charset
+      val bankText = sc.parallelize(IOUtils.toString(new URL("https://s3.amazonaws.com/apache-zeppelin/tutorial/bank/bank.csv"),Charset.forName("utf8")).split("\n"))
+      case class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)
+
+      val bank = bankText.map(s => s.split(";")).filter(s => s(0) != "\"age\"").map(s => Bank(s(0).toInt,s(1).replaceAll("\"", ""),s(2).replaceAll("\"", ""),s(3).replaceAll("\"", ""),s(5).replaceAll("\"", "").toInt)).toDF()
+      bank.registerTempTable("bank")
+       */
+      setTextOfParagraph(2, "import org.apache.commons.io.IOUtils\\n" +
+          "import java.net.URL\\n" +
+          "import java.nio.charset.Charset\\n" +
+          "val bankText = sc.parallelize(IOUtils.toString(new URL(\"https://s3.amazonaws.com/apache-zeppelin/tutorial/bank/bank.csv\"),Charset.forName(\"utf8\")).split(\"\\\\n\"))\\n" +
+          "case class Bank(age: Integer, job: String, marital: String, education: String, balance: Integer)\\n" +
+          "\\n" +
+          "val bank = bankText.map(s => s.split(\";\")).filter(s => s(0) != \"\\\\\"age\\\\\"\").map(s => Bank(s(0).toInt,s(1).replaceAll(\"\\\\\"\", \"\"),s(2).replaceAll(\"\\\\\"\", \"\"),s(3).replaceAll(\"\\\\\"\", \"\"),s(5).replaceAll(\"\\\\\"\", \"\").toInt)).toDF()\\n" +
+          "bank.registerTempTable(\"bank\")");
+      runParagraph(2);
+
+      try {
+        waitForParagraph(2, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(2, "ERROR");
+        collector.checkThat("2nd Paragraph from SparkParagraphIT of testSpark status:",
+            "ERROR", CoreMatchers.equalTo("FINISHED")
+        );
+      }
+
+      WebElement paragraph2Result = driver.findElement(By.xpath(
+          getParagraphXPath(2) + "//div[contains(@id,\"_text\")]"));
+
+      collector.checkThat("2nd Paragraph from SparkParagraphIT of testSpark result: ",
+          paragraph2Result.getText().toString(), CoreMatchers.containsString(
+              "import org.apache.commons.io.IOUtils"
+          )
+      );
+
+    } catch (Exception e) {
+      handleException("Exception in SparkParagraphIT while testSpark", e);
+    }
+  }
+
+  @Test
+  public void testPySpark() throws Exception {
+    try {
+      setTextOfParagraph(1, "%pyspark\\n" +
+          "for x in range(0, 3):\\n" +
+          "    print \"test loop %d\" % (x)");
+
+      runParagraph(1);
+
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Paragraph from SparkParagraphIT of testPySpark status: ",
+            "ERROR", CoreMatchers.equalTo("FINISHED")
+        );
+      }
+
+      WebElement paragraph1Result = driver.findElement(By.xpath(
+          getParagraphXPath(1) + "//div[contains(@id,\"_text\")]"));
+      collector.checkThat("Paragraph from SparkParagraphIT of testPySpark result: ",
+          paragraph1Result.getText().toString(), CoreMatchers.containsString("test loop 0\ntest loop 1\ntest loop 2")
+      );
+
+      // the last statement's evaluation result is printed
+      setTextOfParagraph(2, "%pyspark\\n" +
+          "sc.version\\n" +
+          "1+1");
+      runParagraph(2);
+      try {
+        waitForParagraph(2, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(2, "ERROR");
+        collector.checkThat("Paragraph from SparkParagraphIT of testPySpark status: ",
+                "ERROR", CoreMatchers.equalTo("FINISHED")
+        );
+      }
+      WebElement paragraph2Result = driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@id,\"_text\")]"));
+      collector.checkThat("Paragraph from SparkParagraphIT of testPySpark result: ",
+          paragraph2Result.getText().toString(), CoreMatchers.equalTo("2")
+      );
+
+    } catch (Exception e) {
+      handleException("Exception in SparkParagraphIT while testPySpark", e);
+    }
+  }
+
+  @Test
+  public void testSqlSpark() throws Exception {
+    try {
+      setTextOfParagraph(1,"%sql\\n" +
+          "select * from bank limit 1");
+      runParagraph(1);
+
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark status: ",
+            "ERROR", CoreMatchers.equalTo("FINISHED")
+        );
+      }
+
+      // Age, Job, Marital, Education, Balance
+      List<WebElement> tableHeaders = driver.findElements(By.cssSelector("span.ui-grid-header-cell-label"));
+      String headerNames = "";
+
+      for(WebElement header : tableHeaders) {
+        headerNames += header.getText().toString() + "|";
+      }
+
+      collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark result: ",
+          headerNames, CoreMatchers.equalTo("age|job|marital|education|balance|"));
+    } catch (Exception e) {
+      handleException("Exception in SparkParagraphIT while testSqlSpark", e);
+    }
+  }
+
+  @Test
+  public void testDep() throws Exception {
+    try {
+      // restart spark interpreter before running %dep
+      clickAndWait(By.xpath("//span[@uib-tooltip='Interpreter binding']"));
+      clickAndWait(By.xpath("//div[font[contains(text(), 'spark')]]/preceding-sibling::a[@uib-tooltip='Restart']"));
+      clickAndWait(By.xpath("//button[contains(.,'OK')]"));
+
+      setTextOfParagraph(1,"%dep z.load(\"org.apache.commons:commons-csv:1.1\")");
+      runParagraph(1);
+
+      try {
+        waitForParagraph(1, "FINISHED");
+        WebElement paragraph1Result = driver.findElement(By.xpath(getParagraphXPath(1) +
+            "//div[contains(@id,'_text')]"));
+        collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark result: ",
+            paragraph1Result.getText(), CoreMatchers.containsString("res0: org.apache.zeppelin.dep.Dependency = org.apache.zeppelin.dep.Dependency"));
+
+        setTextOfParagraph(2, "import org.apache.commons.csv.CSVFormat");
+        runParagraph(2);
+
+        try {
+          waitForParagraph(2, "FINISHED");
+          WebElement paragraph2Result = driver.findElement(By.xpath(getParagraphXPath(2) +
+              "//div[contains(@id,'_text')]"));
+          collector.checkThat("Paragraph from SparkParagraphIT of testSqlSpark result: ",
+              paragraph2Result.getText(), CoreMatchers.equalTo("import org.apache.commons.csv.CSVFormat"));
+
+        } catch (TimeoutException e) {
+          waitForParagraph(2, "ERROR");
+          collector.checkThat("Second paragraph from SparkParagraphIT of testDep status: ",
+              "ERROR", CoreMatchers.equalTo("FINISHED")
+          );
+        }
+
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("First paragraph from SparkParagraphIT of testDep status: ",
+            "ERROR", CoreMatchers.equalTo("FINISHED")
+        );
+      }
+    } catch (Exception e) {
+      handleException("Exception in SparkParagraphIT while testDep", e);
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
new file mode 100644
index 0000000..4d14641
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/ZeppelinIT.java
@@ -0,0 +1,326 @@
+/*
+ * 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.zeppelin.integration;
+
+import org.apache.zeppelin.AbstractZeppelinIT;
+import org.apache.zeppelin.WebDriverManager;
+import org.apache.zeppelin.ZeppelinITUtils;
+import org.hamcrest.CoreMatchers;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+import org.openqa.selenium.By;
+import org.openqa.selenium.Keys;
+import org.openqa.selenium.StaleElementReferenceException;
+import org.openqa.selenium.TimeoutException;
+import org.openqa.selenium.WebElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import static org.apache.commons.lang3.StringUtils.isNotBlank;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+/**
+ * Test Zeppelin with web browser.
+ *
+ * To test, ZeppelinServer should be running on port 8080
+ * On OSX, you'll need firefox 42.0 installed, then you can run with
+ *
+ * PATH=~/Applications/Firefox.app/Contents/MacOS/:$PATH TEST_SELENIUM="" \
+ *    mvn -Dtest=org.apache.zeppelin.integration.ZeppelinIT -Denforcer.skip=true \
+ *    test -pl zeppelin-server
+ *
+ */
+public class ZeppelinIT extends AbstractZeppelinIT {
+  private static final Logger LOG = LoggerFactory.getLogger(ZeppelinIT.class);
+
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
+
+  @Before
+  public void startUp() {
+    driver = WebDriverManager.getWebDriver();
+  }
+
+  @After
+  public void tearDown() {
+    driver.quit();
+  }
+
+  @Test
+  public void testAngularDisplay() throws Exception {
+    try {
+      createNewNote();
+
+      // wait for first paragraph's " READY " status text
+      waitForParagraph(1, "READY");
+
+      /*
+       * print angular template
+       * %angular <div id='angularTestButton' ng-click='myVar=myVar+1'>BindingTest_{{myVar}}_</div>
+       */
+      setTextOfParagraph(1, "println(\"%angular <div id=\\'angularTestButton\\' ng-click=\\'myVar=myVar+1\\'>BindingTest_{{myVar}}_</div>\")");
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+
+      // check expected text
+      waitForText("BindingTest__", By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+
+      /*
+       * Bind variable
+       * z.angularBind("myVar", 1)
+       */
+      assertEquals(1, driver.findElements(By.xpath(getParagraphXPath(2) + "//textarea")).size());
+      setTextOfParagraph(2, "z.angularBind(\"myVar\", 1)");
+      runParagraph(2);
+      waitForParagraph(2, "FINISHED");
+
+      // check expected text
+      waitForText("BindingTest_1_", By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+
+
+      /*
+       * print variable
+       * print("myVar="+z.angular("myVar"))
+       */
+      setTextOfParagraph(3, "print(\"myVar=\"+z.angular(\"myVar\"))");
+      runParagraph(3);
+      waitForParagraph(3, "FINISHED");
+
+      // check expected text
+      waitForText("myVar=1", By.xpath(
+              getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
+
+      /*
+       * Click element
+       */
+      driver.findElement(By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]")).click();
+
+      // check expected text
+      waitForText("BindingTest_2_", By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+
+      /*
+       * Register watcher
+       * z.angularWatch("myVar", (before:Object, after:Object, context:org.apache.zeppelin.interpreter.InterpreterContext) => {
+       *   z.run(2, context)
+       * }
+       */
+      setTextOfParagraph(4, "z.angularWatch(\"myVar\", (before:Object, after:Object, context:org.apache.zeppelin.interpreter.InterpreterContext)=>{ z.run(2, false)})");
+      runParagraph(4);
+      waitForParagraph(4, "FINISHED");
+
+
+      /*
+       * Click element, again and see watcher works
+       */
+      driver.findElement(By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]")).click();
+
+      // check expected text
+      waitForText("BindingTest_3_", By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+      waitForParagraph(3, "FINISHED");
+
+      // check expected text by watcher
+      waitForText("myVar=3", By.xpath(
+              getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
+
+
+      /*
+       * Click element, again and see watcher still works
+       */
+      driver.findElement(By.xpath(
+          getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]")).click();
+      // check expected text
+      waitForText("BindingTest_4_", By.xpath(
+          getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+      waitForParagraph(3, "FINISHED");
+
+      // check expected text by watcher
+      waitForText("myVar=4", By.xpath(
+          getParagraphXPath(3) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
+
+      /*
+       * Unbind
+       * z.angularUnbind("myVar")
+       */
+      setTextOfParagraph(5, "z.angularUnbind(\"myVar\")");
+      runParagraph(5);
+      waitForParagraph(5, "FINISHED");
+
+      // check expected text
+      waitForText("BindingTest__",
+          By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+
+      /*
+       * Bind again and see rebind works.
+       */
+      runParagraph(2);
+      waitForParagraph(2, "FINISHED");
+
+      // check expected text
+      waitForText("BindingTest_1_",
+          By.xpath(getParagraphXPath(1) + "//div[@id=\"angularTestButton\"]"));
+
+      driver.findElement(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']"))
+          .sendKeys(Keys.ENTER);
+      ZeppelinITUtils.sleep(1000, true);
+      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'This note will be moved to trash')]" +
+          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
+      ZeppelinITUtils.sleep(100, true);
+
+      LOG.info("testCreateNotebook Test executed");
+    } catch (Exception e) {
+      handleException("Exception in ZeppelinIT while testAngularDisplay ", e);
+    }
+  }
+
+  @Test
+  public void testSparkInterpreterDependencyLoading() throws Exception {
+    try {
+      // navigate to interpreter page
+      WebElement settingButton = driver.findElement(By.xpath("//button[@class='nav-btn dropdown-toggle ng-scope']"));
+      settingButton.click();
+      WebElement interpreterLink = driver.findElement(By.xpath("//a[@href='#/interpreter']"));
+      interpreterLink.click();
+
+      // add new dependency to spark interpreter
+      driver.findElement(By.xpath("//div[@id='spark']//button[contains(.,'edit')]")).sendKeys(Keys.ENTER);
+
+      WebElement depArtifact = pollingWait(By.xpath("//input[@ng-model='setting.depArtifact']"),
+          MAX_BROWSER_TIMEOUT_SEC);
+      String artifact = "org.apache.commons:commons-csv:1.1";
+      depArtifact.sendKeys(artifact);
+      driver.findElement(By.xpath("//div[@id='spark']//form//button[1]")).click();
+      clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to update this interpreter and restart with new settings?')]" +
+          "//div[@class='modal-footer']//button[contains(.,'OK')]"));
+
+      try {
+        clickAndWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to " +
+            "update this interpreter and restart with new settings?')]//" +
+            "div[@class='bootstrap-dialog-close-button']/button"));
+      } catch (TimeoutException | StaleElementReferenceException e) {
+        //Modal dialog got closed earlier than expected nothing to worry.
+      }
+
+      driver.navigate().back();
+      createNewNote();
+
+      // wait for first paragraph's " READY " status text
+      waitForParagraph(1, "READY");
+
+      setTextOfParagraph(1, "import org.apache.commons.csv.CSVFormat");
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+
+      // check expected text
+      WebElement paragraph1Result = driver.findElement(By.xpath(
+          getParagraphXPath(1) + "//div[contains(@id,\"_text\")]"));
+
+      collector.checkThat("Paragraph from ZeppelinIT of testSparkInterpreterDependencyLoading result: ",
+          paragraph1Result.getText().toString(), CoreMatchers.containsString(
+              "import org.apache.commons.csv.CSVFormat"
+          )
+      );
+
+      //delete created notebook for cleanup.
+      deleteTestNotebook(driver);
+      ZeppelinITUtils.sleep(1000, false);
+
+      // reset dependency
+      settingButton.click();
+      interpreterLink.click();
+      driver.findElement(By.xpath("//div[@id='spark']//button[contains(.,'edit')]")).sendKeys(Keys.ENTER);
+      WebElement testDepRemoveBtn = pollingWait(By.xpath("//tr[descendant::text()[contains(.,'" +
+          artifact + "')]]/td[3]/button"), MAX_IMPLICIT_WAIT);
+      testDepRemoveBtn.sendKeys(Keys.ENTER);
+      driver.findElement(By.xpath("//div[@id='spark']//form//button[1]")).click();
+      driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to update this interpreter and restart with new settings?')]" +
+          "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
+    } catch (Exception e) {
+      handleException("Exception in ZeppelinIT while testSparkInterpreterDependencyLoading ", e);
+    }
+  }
+
+  @Test
+  public void testAngularRunParagraph() throws Exception {
+    try {
+      createNewNote();
+
+      // wait for first paragraph's " READY " status text
+      waitForParagraph(1, "READY");
+
+      // Create 1st paragraph
+      setTextOfParagraph(1,
+              "%angular <div id=\\'angularRunParagraph\\'>Run second paragraph</div>");
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+      waitForText("Run second paragraph", By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularRunParagraph\"]"));
+
+      // Create 2nd paragraph
+      setTextOfParagraph(2, "%sh echo TEST");
+      runParagraph(2);
+      waitForParagraph(2, "FINISHED");
+
+      // Get 2nd paragraph id
+      final String secondParagraphId = driver.findElement(By.xpath(getParagraphXPath(2)
+              + "//div[@class=\"control ng-scope\"]//ul[@class=\"dropdown-menu dropdown-menu-right\"]/li[1]"))
+              .getAttribute("textContent");
+
+      assertTrue("Cannot find paragraph id for the 2nd paragraph", isNotBlank(secondParagraphId));
+
+      // Update first paragraph to call z.runParagraph() with 2nd paragraph id
+      setTextOfParagraph(1,
+              "%angular <div id=\\'angularRunParagraph\\' ng-click=\\'z.runParagraph(\""
+                      + secondParagraphId.trim()
+                      + "\")\\'>Run second paragraph</div>");
+      runParagraph(1);
+      waitForParagraph(1, "FINISHED");
+
+      // Set new text value for 2nd paragraph
+      setTextOfParagraph(2, "%sh echo NEW_VALUE");
+
+      // Click on 1 paragraph to trigger z.runParagraph() function
+      driver.findElement(By.xpath(
+              getParagraphXPath(1) + "//div[@id=\"angularRunParagraph\"]")).click();
+
+      waitForParagraph(2, "FINISHED");
+
+      // Check that 2nd paragraph has been executed
+      waitForText("NEW_VALUE", By.xpath(
+              getParagraphXPath(2) + "//div[contains(@id,\"_text\") and @class=\"text\"]"));
+
+      //delete created notebook for cleanup.
+      deleteTestNotebook(driver);
+      ZeppelinITUtils.sleep(1000, true);
+
+      LOG.info("testAngularRunParagraph Test executed");
+    }  catch (Exception e) {
+      handleException("Exception in ZeppelinIT while testAngularRunParagraph", e);
+    }
+
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/resources/log4j.properties
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/resources/log4j.properties b/zeppelin-integration/src/test/resources/log4j.properties
new file mode 100644
index 0000000..8368993
--- /dev/null
+++ b/zeppelin-integration/src/test/resources/log4j.properties
@@ -0,0 +1,46 @@
+#
+# 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.
+#
+
+# Direct log messages to stdout
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c:%L - %m%n
+#log4j.appender.stdout.layout.ConversionPattern=
+#%5p [%t] (%F:%L) - %m%n
+#%-4r [%t] %-5p %c %x - %m%n
+#
+
+# Root logger option
+log4j.rootLogger=INFO, stdout
+ 
+#mute some noisy guys
+log4j.logger.org.apache.hadoop.mapred=WARN
+log4j.logger.org.apache.hadoop.hive.ql=WARN
+log4j.logger.org.apache.hadoop.hive.metastore=WARN
+log4j.logger.org.apache.haadoop.hive.service.HiveServer=WARN
+
+log4j.logger.org.quartz=WARN
+log4j.logger.DataNucleus=WARN
+log4j.logger.DataNucleus.MetaData=ERROR
+log4j.logger.DataNucleus.Datastore=ERROR
+
+# Log all JDBC parameters
+log4j.logger.org.hibernate.type=ALL
+
+log4j.logger.org.apache.zeppelin.interpreter=DEBUG
+log4j.logger.org.apache.zeppelin.spark=DEBUG


[2/6] zeppelin git commit: [ZEPPELIN-3127] Upgrade selenium version

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java b/zeppelin-server/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java
deleted file mode 100644
index 999e796..0000000
--- a/zeppelin-server/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java
+++ /dev/null
@@ -1,892 +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.zeppelin.integration;
-
-import org.apache.commons.lang.StringUtils;
-import org.apache.zeppelin.CommandExecutor;
-import org.apache.zeppelin.ProcessData;
-import org.apache.zeppelin.AbstractZeppelinIT;
-import org.apache.zeppelin.WebDriverManager;
-import org.apache.zeppelin.ZeppelinITUtils;
-import org.apache.zeppelin.conf.ZeppelinConfiguration;
-import org.hamcrest.CoreMatchers;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.ErrorCollector;
-import org.openqa.selenium.By;
-import org.openqa.selenium.WebElement;
-import org.openqa.selenium.support.ui.WebDriverWait;
-import org.openqa.selenium.JavascriptExecutor;
-import org.openqa.selenium.support.ui.ExpectedConditions;
-import org.openqa.selenium.TimeoutException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import org.apache.commons.io.FileUtils;
-import java.io.File;
-import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.List;
-
-import static org.junit.Assert.assertTrue;
-
-public class InterpreterModeActionsIT extends AbstractZeppelinIT {
-  private static final Logger LOG = LoggerFactory.getLogger(InterpreterModeActionsIT.class);
-
-  @Rule
-  public ErrorCollector collector = new ErrorCollector();
-  static String shiroPath;
-  static String authShiro = "[users]\n" +
-      "admin = password1, admin\n" +
-      "user1 = password2, admin\n" +
-      "user2 = password3, admin\n" +
-      "[main]\n" +
-      "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
-      "securityManager.sessionManager = $sessionManager\n" +
-      "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
-      "shiro.loginUrl = /api/login\n" +
-      "[roles]\n" +
-      "admin = *\n" +
-      "[urls]\n" +
-      "/api/version = anon\n" +
-      "/** = authc";
-
-  static String originalShiro = "";
-  static String interpreterOptionPath = "";
-  static String originalInterpreterOption = "";
-
-  static String cmdPsPython = "ps aux | grep 'zeppelin_ipython' | grep -v 'grep' | wc -l";
-  static String cmdPsInterpreter = "ps aux | grep 'zeppelin/interpreter/python/*' |" +
-      " sed -E '/grep|local-repo/d' | wc -l";
-
-  @BeforeClass
-  public static void startUp() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), new File("../").getAbsolutePath());
-      ZeppelinConfiguration conf = ZeppelinConfiguration.create();
-      shiroPath = conf.getRelativeDir(String.format("%s/shiro.ini", conf.getConfDir()));
-      interpreterOptionPath = conf.getRelativeDir(String.format("%s/interpreter.json", conf.getConfDir()));
-      File shiroFile = new File(shiroPath);
-      if (shiroFile.exists()) {
-        originalShiro = StringUtils.join(FileUtils.readLines(shiroFile, "UTF-8"), "\n");
-      }
-      FileUtils.write(shiroFile, authShiro, "UTF-8");
-
-      File interpreterOptionFile = new File(interpreterOptionPath);
-      if (interpreterOptionFile.exists()) {
-        originalInterpreterOption = StringUtils.join(FileUtils.readLines(interpreterOptionFile, "UTF-8"), "\n");
-      }
-    } catch (IOException e) {
-      LOG.error("Error in InterpreterModeActionsIT startUp::", e);
-    }
-    ZeppelinITUtils.restartZeppelin();
-    driver = WebDriverManager.getWebDriver();
-  }
-
-  @AfterClass
-  public static void tearDown() {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      if (!StringUtils.isBlank(shiroPath)) {
-        File shiroFile = new File(shiroPath);
-        if (StringUtils.isBlank(originalShiro)) {
-          FileUtils.deleteQuietly(shiroFile);
-        } else {
-          FileUtils.write(shiroFile, originalShiro, "UTF-8");
-        }
-      }
-      if (!StringUtils.isBlank(interpreterOptionPath)) {
-        File interpreterOptionFile = new File(interpreterOptionPath);
-        if (StringUtils.isBlank(originalInterpreterOption)) {
-          FileUtils.deleteQuietly(interpreterOptionFile);
-        } else {
-          FileUtils.write(interpreterOptionFile, originalInterpreterOption, "UTF-8");
-        }
-      }
-    } catch (IOException e) {
-      LOG.error("Error in InterpreterModeActionsIT tearDown::", e);
-    }
-    ZeppelinITUtils.restartZeppelin();
-    driver.quit();
-  }
-
-  private void authenticationUser(String userName, String password) {
-    pollingWait(By.xpath(
-        "//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"),
-        MAX_BROWSER_TIMEOUT_SEC).click();
-    ZeppelinITUtils.sleep(500, false);
-    pollingWait(By.xpath("//*[@id='userName']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(userName);
-    pollingWait(By.xpath("//*[@id='password']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(password);
-    pollingWait(By.xpath("//*[@id='loginModalContent']//button[contains(.,'Login')]"),
-        MAX_BROWSER_TIMEOUT_SEC).click();
-    ZeppelinITUtils.sleep(1000, false);
-  }
-
-  private void logoutUser(String userName) throws URISyntaxException {
-    ZeppelinITUtils.sleep(500, false);
-    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
-        userName + "')]")).click();
-    ZeppelinITUtils.sleep(500, false);
-    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
-        userName + "')]//a[@ng-click='navbar.logout()']")).click();
-    ZeppelinITUtils.sleep(2000, false);
-    if (driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button"))
-        .isDisplayed()) {
-      driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button")).click();
-    }
-    driver.get(new URI(driver.getCurrentUrl()).resolve("/#/").toString());
-    ZeppelinITUtils.sleep(500, false);
-  }
-
-  private void setPythonParagraph(int num, String text) {
-    setTextOfParagraph(num, "%python\\n " + text);
-    runParagraph(num);
-    try {
-      waitForParagraph(num, "FINISHED");
-    } catch (TimeoutException e) {
-      waitForParagraph(num, "ERROR");
-      collector.checkThat("Exception in InterpreterModeActionsIT while setPythonParagraph",
-          "ERROR", CoreMatchers.equalTo("FINISHED"));
-    }
-  }
-
-  @Test
-  public void testGloballyAction() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      //step 1: (admin) login, set 'globally in shared' mode of python interpreter, logout
-      InterpreterModeActionsIT interpreterModeActionsIT = new InterpreterModeActionsIT();
-      interpreterModeActionsIT.authenticationUser("admin", "password1");
-      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
-          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
-      ZeppelinITUtils.sleep(500, false);
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
-          "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[1]/button"));
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'Globally')]"));
-      JavascriptExecutor jse = (JavascriptExecutor)driver;
-      jse.executeScript("window.scrollBy(0,250)", "");
-      ZeppelinITUtils.sleep(500, false);
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
-      clickAndWait(By.xpath(
-          "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      clickAndWait(By.xpath("//a[@class='navbar-brand navbar-title'][contains(@href, '#/')]"));
-      interpreterModeActionsIT.logoutUser("admin");
-      //step 2: (user1) login, create a new note, run two paragraph with 'python', check result, check process, logout
-      //paragraph: Check if the result is 'user1' in the second paragraph
-      //System: Check if the number of python interpreter process is '1'
-      //System: Check if the number of python process is '1'
-      interpreterModeActionsIT.authenticationUser("user1", "password2");
-      By locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
-          " note')]");
-      WebElement element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        createNewNote();
-      }
-      String user1noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
-      waitForParagraph(1, "READY");
-      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user1\"");
-      waitForParagraph(2, "READY");
-      interpreterModeActionsIT.setPythonParagraph(2, "print user");
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(
-              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("user1"));
-      String resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
-
-      interpreterModeActionsIT.logoutUser("user1");
-
-      //step 3: (user2) login, create a new note, run two paragraph with 'python', check result, check process, logout
-      //paragraph: Check if the result is 'user2' in the second paragraph
-      //System: Check if the number of python interpreter process is '1'
-      //System: Check if the number of python process is '1'
-      interpreterModeActionsIT.authenticationUser("user2", "password3");
-      locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
-          " note')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        createNewNote();
-      }
-      waitForParagraph(1, "READY");
-      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user2\"");
-      waitForParagraph(2, "READY");
-      interpreterModeActionsIT.setPythonParagraph(2, "print user");
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(
-              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("user2"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      interpreterModeActionsIT.logoutUser("user2");
-
-      //step 4: (user1) login, come back note user1 made, run second paragraph, check result, check process,
-      //restart python interpreter, check process again, logout
-      //paragraph: Check if the result is 'user2' in the second paragraph
-      //System: Check if the number of python interpreter process is '1'
-      //System: Check if the number of python process is '1'
-      interpreterModeActionsIT.authenticationUser("user1", "password2");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      waitForParagraph(2, "FINISHED");
-      runParagraph(2);
-      try {
-        waitForParagraph(2, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(2, "ERROR");
-        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR", CoreMatchers.equalTo("FINISHED"));
-      }
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
-
-      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
-      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
-          "[contains(.,'Do you want to restart python interpreter?')]" +
-          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info("Holding on until if interpreter restart dialog is disappeared or not testGloballyAction");
-      boolean invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
-      if (invisibilityStatus == false) {
-        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
-      }
-      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      }
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      interpreterModeActionsIT.logoutUser("user1");
-    } catch (Exception e) {
-      handleException("Exception in InterpreterModeActionsIT while testGloballyAction ", e);
-    }
-  }
-
-  @Test
-  public void testPerUserScopedAction() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      //step 1: (admin) login, set 'Per user in scoped' mode of python interpreter, logout
-      InterpreterModeActionsIT interpreterModeActionsIT = new InterpreterModeActionsIT();
-      interpreterModeActionsIT.authenticationUser("admin", "password1");
-      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-
-      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
-          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
-      ZeppelinITUtils.sleep(500, false);
-
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
-          "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[1]/button"));
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'Per User')]"));
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[2]/button"));
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'scoped per user')]"));
-
-      JavascriptExecutor jse = (JavascriptExecutor)driver;
-      jse.executeScript("window.scrollBy(0,250)", "");
-      ZeppelinITUtils.sleep(500, false);
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
-      clickAndWait(By.xpath(
-          "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      clickAndWait(By.xpath("//a[@class='navbar-brand navbar-title'][contains(@href, '#/')]"));
-
-      interpreterModeActionsIT.logoutUser("admin");
-
-      //step 2: (user1) login, create a new note, run two paragraph with 'python', check result, check process, logout
-      //paragraph: Check if the result is 'user1' in the second paragraph
-      //System: Check if the number of python interpreter process is '1'
-      //System: Check if the number of python process is '1'
-      interpreterModeActionsIT.authenticationUser("user1", "password2");
-      By locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
-          " note')]");
-      WebElement element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        createNewNote();
-      }
-      String user1noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
-
-      waitForParagraph(1, "READY");
-      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user1\"");
-      waitForParagraph(2, "READY");
-      interpreterModeActionsIT.setPythonParagraph(2, "print user");
-
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(
-              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("user1"));
-
-      String resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      interpreterModeActionsIT.logoutUser("user1");
-
-      //step 3: (user2) login, create a new note, run two paragraph with 'python', check result, check process, logout
-      //                paragraph: Check if the result is 'user2' in the second paragraph
-      //System: Check if the number of python interpreter process is '1'
-      //System: Check if the number of python process is '2'
-      interpreterModeActionsIT.authenticationUser("user2", "password3");
-      locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
-          " note')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        createNewNote();
-      }
-      String user2noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
-      waitForParagraph(1, "READY");
-      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user2\"");
-      waitForParagraph(2, "READY");
-      interpreterModeActionsIT.setPythonParagraph(2, "print user");
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(
-              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("user2"));
-
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      interpreterModeActionsIT.logoutUser("user2");
-
-      //step 4: (user1) login, come back note user1 made, run second paragraph, check result,
-      //                restart python interpreter in note, check process again, logout
-      //paragraph: Check if the result is 'user1' in the second paragraph
-      //System: Check if the number of python interpreter process is '1'
-      //System: Check if the number of python process is '1'
-      interpreterModeActionsIT.authenticationUser("user1", "password2");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      runParagraph(2);
-      try {
-        waitForParagraph(2, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(2, "ERROR");
-        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR", CoreMatchers.equalTo("FINISHED"));
-      }
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(
-              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("user1"));
-
-      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
-      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
-          "[contains(.,'Do you want to restart python interpreter?')]" +
-          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
-      boolean invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
-      if (invisibilityStatus == false) {
-        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
-      }
-      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      }
-
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      interpreterModeActionsIT.logoutUser("user1");
-
-      //step 5: (user2) login, come back note user2 made, restart python interpreter in note, check process, logout
-      //System: Check if the number of python interpreter process is '0'
-      //System: Check if the number of python process is '0'
-      interpreterModeActionsIT.authenticationUser("user2", "password3");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
-      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
-          "[contains(.,'Do you want to restart python interpreter?')]" +
-          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
-      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
-      if (invisibilityStatus == false) {
-        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
-      }
-      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      }
-
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      interpreterModeActionsIT.logoutUser("user2");
-
-      //step 6: (user1) login, come back note user1 made, run first paragraph,logout
-      //        (user2) login, come back note user2 made, run first paragraph, check process, logout
-      //System: Check if the number of python process is '2'
-      //System: Check if the number of python interpreter process is '1'
-      interpreterModeActionsIT.authenticationUser("user1", "password2");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      waitForParagraph(1, "FINISHED");
-      runParagraph(1);
-      try {
-        waitForParagraph(1, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(1, "ERROR");
-        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR", CoreMatchers.equalTo("FINISHED"));
-      }
-      interpreterModeActionsIT.logoutUser("user1");
-
-      interpreterModeActionsIT.authenticationUser("user2", "password3");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      runParagraph(1);
-      try {
-        waitForParagraph(1, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(1, "ERROR");
-        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR", CoreMatchers.equalTo("FINISHED"));
-      }
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      interpreterModeActionsIT.logoutUser("user2");
-
-      //step 7: (admin) login, restart python interpreter in interpreter tab, check process, logout
-      //System: Check if the number of python interpreter process is 0
-      //System: Check if the number of python process is 0
-      interpreterModeActionsIT.authenticationUser("admin", "password1");
-      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-
-      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
-          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
-      ZeppelinITUtils.sleep(500, false);
-
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]" +
-          "//button[contains(@ng-click, 'restartInterpreterSetting(setting.id)')]"));
-      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
-          "[contains(.,'Do you want to restart this interpreter?')]" +
-          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
-      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
-      if (invisibilityStatus == false) {
-        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
-      }
-
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
-
-      interpreterModeActionsIT.logoutUser("admin");
-
-    } catch (Exception e) {
-      handleException("Exception in InterpreterModeActionsIT while testPerUserScopedAction ", e);
-    }
-  }
-
-  @Test
-  public void testPerUserIsolatedAction() throws Exception {
-    if (!endToEndTestEnabled()) {
-      return;
-    }
-    try {
-      //step 1: (admin) login, set 'Per user in isolated' mode of python interpreter, logout
-      InterpreterModeActionsIT interpreterModeActionsIT = new InterpreterModeActionsIT();
-      interpreterModeActionsIT.authenticationUser("admin", "password1");
-      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
-          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
-      ZeppelinITUtils.sleep(500, false);
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
-          "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[1]/button"));
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'Per User')]"));
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[2]/button"));
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'isolated per user')]"));
-      JavascriptExecutor jse = (JavascriptExecutor)driver;
-      jse.executeScript("window.scrollBy(0,250)", "");
-      ZeppelinITUtils.sleep(500, false);
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
-      clickAndWait(By.xpath(
-          "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      clickAndWait(By.xpath("//a[@class='navbar-brand navbar-title'][contains(@href, '#/')]"));
-      interpreterModeActionsIT.logoutUser("admin");
-
-      //step 2: (user1) login, create a new note, run two paragraph with 'python', check result, check process, logout
-      //paragraph: Check if the result is 'user1' in the second paragraph
-      //System: Check if the number of python interpreter process is '1'
-      //System: Check if the number of python process is '1'
-      interpreterModeActionsIT.authenticationUser("user1", "password2");
-      By locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
-          " note')]");
-      WebElement element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        createNewNote();
-      }
-      String user1noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
-      waitForParagraph(1, "READY");
-      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user1\"");
-      waitForParagraph(2, "READY");
-      interpreterModeActionsIT.setPythonParagraph(2, "print user");
-
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(
-              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("user1"));
-
-      String resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      interpreterModeActionsIT.logoutUser("user1");
-
-      //step 3: (user2) login, create a new note, run two paragraph with 'python', check result, check process, logout
-      //                paragraph: Check if the result is 'user2' in the second paragraph
-      //System: Check if the number of python interpreter process is '2'
-      //System: Check if the number of python process is '2'
-      interpreterModeActionsIT.authenticationUser("user2", "password3");
-      locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
-          " note')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        createNewNote();
-      }
-      String user2noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
-      waitForParagraph(1, "READY");
-      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user2\"");
-      waitForParagraph(2, "READY");
-      interpreterModeActionsIT.setPythonParagraph(2, "print user");
-
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(
-              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("user2"));
-
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("2"));
-      interpreterModeActionsIT.logoutUser("user2");
-
-      //step 4: (user1) login, come back note user1 made, run second paragraph, check result,
-      //                restart python interpreter in note, check process again, logout
-      //paragraph: Check if the result is 'user1' in the second paragraph
-      //System: Check if the number of python interpreter process is '1'
-      //System: Check if the number of python process is '1'
-      interpreterModeActionsIT.authenticationUser("user1", "password2");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      runParagraph(2);
-      try {
-        waitForParagraph(2, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(2, "ERROR");
-        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR", CoreMatchers.equalTo("FINISHED"));
-      }
-      collector.checkThat("The output field paragraph contains",
-          driver.findElement(By.xpath(
-              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
-          CoreMatchers.equalTo("user1"));
-
-      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
-      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
-          "[contains(.,'Do you want to restart python interpreter?')]" +
-          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-
-      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
-      boolean invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
-      if (invisibilityStatus == false) {
-        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
-      }
-      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      }
-
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
-      interpreterModeActionsIT.logoutUser("user1");
-
-      //step 5: (user2) login, come back note user2 made, restart python interpreter in note, check process, logout
-      //System: Check if the number of python interpreter process is '0'
-      //System: Check if the number of python process is '0'
-      interpreterModeActionsIT.authenticationUser("user2", "password3");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
-      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
-          "[contains(.,'Do you want to restart python interpreter?')]" +
-          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-
-      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
-      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
-      if (invisibilityStatus == false) {
-        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
-      }
-      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
-      }
-
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      interpreterModeActionsIT.logoutUser("user2");
-
-      //step 6: (user1) login, come back note user1 made, run first paragraph,logout
-      //        (user2) login, come back note user2 made, run first paragraph, check process, logout
-      //System: Check if the number of python process is '2'
-      //System: Check if the number of python interpreter process is '2'
-      interpreterModeActionsIT.authenticationUser("user1", "password2");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      waitForParagraph(1, "FINISHED");
-      runParagraph(1);
-      try {
-        waitForParagraph(1, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(1, "ERROR");
-        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR", CoreMatchers.equalTo("FINISHED"));
-      }
-      interpreterModeActionsIT.logoutUser("user1");
-
-      interpreterModeActionsIT.authenticationUser("user2", "password3");
-      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
-      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.visibilityOfElementLocated(locator));
-      if (element.isDisplayed()) {
-        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
-            MAX_BROWSER_TIMEOUT_SEC).click();
-      }
-      runParagraph(1);
-      try {
-        waitForParagraph(1, "FINISHED");
-      } catch (TimeoutException e) {
-        waitForParagraph(1, "ERROR");
-        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
-            "ERROR", CoreMatchers.equalTo("FINISHED"));
-      }
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("2"));
-      interpreterModeActionsIT.logoutUser("user2");
-
-      //step 7: (admin) login, restart python interpreter in interpreter tab, check process, logout
-      //System: Check if the number of python interpreter process is 0
-      //System: Check if the number of python process is 0
-      interpreterModeActionsIT.authenticationUser("admin", "password1");
-      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
-          MAX_BROWSER_TIMEOUT_SEC).click();
-
-      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
-      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
-          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
-      ZeppelinITUtils.sleep(500, false);
-
-      clickAndWait(By.xpath("//div[contains(@id, 'python')]" +
-          "//button[contains(@ng-click, 'restartInterpreterSetting(setting.id)')]"));
-      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
-          "[contains(.,'Do you want to restart this interpreter?')]" +
-          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
-      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
-      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
-      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
-          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
-      if (invisibilityStatus == false) {
-        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
-      }
-
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
-          false, ProcessData.Types_Of_Data.OUTPUT);
-      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
-      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
-      interpreterModeActionsIT.logoutUser("admin");
-    } catch (Exception e) {
-      handleException("Exception in InterpreterModeActionsIT while testPerUserIsolatedAction ", e);
-    }
-  }
-}


[6/6] zeppelin git commit: [ZEPPELIN-3127] Upgrade selenium version

Posted by pr...@apache.org.
[ZEPPELIN-3127] Upgrade selenium version

### What is this PR for?
We are currently using a very old selenium version (i.e. 2.48.2) this is to upgrade it to 3.8.1

### What type of PR is it?
[Improvement]

### What is the Jira issue?
* [ZEPPELIN-3127](https://issues.apache.org/jira/browse/ZEPPELIN-3127)

### How should this be tested?
* CI should be green

### Questions:
* Does the licenses files need update? yes
* Is there breaking changes for older versions?
* Does this needs documentation?

Author: prabhjyotsingh <pr...@gmail.com>
Author: Prabhjyot Singh <pr...@gmail.com>

Closes #2717 from prabhjyotsingh/ZEPPELIN-3127 and squashes the following commits:

e78896356 [prabhjyotsingh] rollback to FF31
6c5be28a8 [Prabhjyot Singh] remove `endToEndTestEnabled (System.getenv("TEST_SELENIUM"))` as with this PR selenium is in different profile.
01632943e [prabhjyotsingh] removing LogEntries as this is no longer required for Selenium-3.x
aab48b857 [prabhjyotsingh] run only selenium for this matrix (4)
873ee324a [prabhjyotsingh] remove scala and set firefoxOptions.setHeadless(true);
e7d3c8dce [Prabhjyot Singh] try FF56
a7ec96f2e [prabhjyotsingh] Fix scala not running
cbb365aef [prabhjyotsingh] start/stop plugin
2689dff8c [prabhjyotsingh] fix dependencies issue
88c07bab1 [prabhjyotsingh] ZEPPELIN-3127: Upgrade selenium version
1ca024f84 [prabhjyotsingh] ZEPPELIN-3127: Upgrade selenium version (reverted from commit 65c11b8178a4ebe58ae84e4e074bbddb522900f7)
260056f18 [prabhjyotsingh] review comment (reverted from commit 52a16816e73a282439060aaf2cf0e80b1b3a8093)
b28774430 [prabhjyotsingh] fix build (reverted from commit 840a5d78a33a1643a7424c8e94521510a5db1184)
840a5d78a [Prabhjyot Singh] fix build
52a16816e [Prabhjyot Singh] review comment
65c11b817 [prabhjyotsingh] ZEPPELIN-3127: Upgrade selenium version


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/7bff131a
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/7bff131a
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/7bff131a

Branch: refs/heads/master
Commit: 7bff131a5bcc96754aaccce555b8d6d3917f445a
Parents: dd1be03
Author: prabhjyotsingh <pr...@gmail.com>
Authored: Tue Jan 9 00:35:41 2018 +0530
Committer: Prabhjyot Singh <pr...@gmail.com>
Committed: Thu Jan 11 09:11:31 2018 +0530

----------------------------------------------------------------------
 .travis.yml                                     |   8 +-
 LICENSE                                         |   1 +
 pom.xml                                         |   7 +
 zeppelin-integration/pom.xml                    | 220 +++++
 .../org/apache/zeppelin/AbstractZeppelinIT.java | 138 +++
 .../org/apache/zeppelin/CommandExecutor.java    |  74 ++
 .../java/org/apache/zeppelin/ProcessData.java   | 256 ++++++
 .../org/apache/zeppelin/WebDriverManager.java   | 215 +++++
 .../org/apache/zeppelin/ZeppelinITUtils.java    |  60 ++
 .../zeppelin/integration/AuthenticationIT.java  | 302 +++++++
 .../zeppelin/integration/InterpreterIT.java     |  73 ++
 .../integration/InterpreterModeActionsIT.java   | 877 ++++++++++++++++++
 .../integration/ParagraphActionsIT.java         | 824 +++++++++++++++++
 .../integration/PersonalizeActionsIT.java       | 339 +++++++
 .../zeppelin/integration/SparkParagraphIT.java  | 232 +++++
 .../apache/zeppelin/integration/ZeppelinIT.java | 326 +++++++
 .../src/test/resources/log4j.properties         |  46 +
 .../ScreenCaptureHtmlUnitDriver.java            | 224 -----
 .../org/apache/zeppelin/AbstractZeppelinIT.java | 146 ---
 .../org/apache/zeppelin/CommandExecutor.java    |  74 --
 .../java/org/apache/zeppelin/ProcessData.java   | 249 ------
 .../org/apache/zeppelin/WebDriverManager.java   | 195 ----
 .../org/apache/zeppelin/ZeppelinITUtils.java    |  16 -
 .../zeppelin/integration/AuthenticationIT.java  | 321 -------
 .../zeppelin/integration/InterpreterIT.java     |  82 --
 .../integration/InterpreterModeActionsIT.java   | 892 -------------------
 .../integration/ParagraphActionsIT.java         | 888 ------------------
 .../integration/PersonalizeActionsIT.java       | 354 --------
 .../zeppelin/integration/SparkParagraphIT.java  | 250 ------
 .../apache/zeppelin/integration/ZeppelinIT.java | 343 -------
 .../zeppelin/AbstractFunctionalSuite.scala      |  84 --
 .../org/apache/zeppelin/WelcomePageSuite.scala  |  37 -
 32 files changed, 3995 insertions(+), 4158 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 7db41bf..3d78595 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -69,9 +69,11 @@ matrix:
       env: PYTHON="3" SCALA_VER="2.11" SPARK_VER="2.2.0" HADOOP_VER="2.6" PROFILE="-Pspark-2.2 -Pweb-ci -Pscalding -Phelium-dev -Pexamples -Pscala-2.11" BUILD_FLAG="package -Pbuild-distr -DskipRat" TEST_FLAG="verify -Pusing-packaged-distr -DskipRat" MODULES="-pl ${INTERPRETERS}" TEST_PROJECTS="-Dtests.to.exclude=**/ZeppelinSparkClusterTest.java,**/org.apache.zeppelin.spark.*,**/HeliumApplicationFactoryTest.java -DfailIfNoTests=false"
 
     # Test selenium with spark module for 1.6.3
-    - jdk: "oraclejdk7"
-      dist: precise
-      env: PYTHON="2" TEST_SELENIUM="true" SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pweb-ci -Pspark-1.6 -Phadoop-2.6 -Phelium-dev -Pexamples" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl .,zeppelin-interpreter,zeppelin-zengine,zeppelin-server,zeppelin-display,spark-dependencies,spark,python -Dtest=org.apache.zeppelin.AbstractFunctionalSuite -DfailIfNoTests=false"
+    - jdk: "oraclejdk8"
+      dist: trusty
+      addons:
+        firefox: "31.0"
+      env: PYTHON="2" SCALA_VER="2.10" SPARK_VER="1.6.3" HADOOP_VER="2.6" PROFILE="-Pweb-ci -Pspark-1.6 -Phadoop-2.6 -Phelium-dev -Pexamples -Pintegration" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" TEST_PROJECTS="-pl .,zeppelin-integration -DfailIfNoTests=false"
 
     # Test interpreter modules
     - jdk: "oraclejdk7"

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/LICENSE
----------------------------------------------------------------------
diff --git a/LICENSE b/LICENSE
index f42b12c..2252d65 100644
--- a/LICENSE
+++ b/LICENSE
@@ -258,6 +258,7 @@ The text of each license is also included at licenses/LICENSE-[project]-[version
     (Apache 2.0) Roboto Font (https://github.com/google/roboto/)
     (Apache 2.0) Gson extra (https://github.com/DanySK/gson-extras)
     (Apache 2.0) Nimbus JOSE+JWT (https://bitbucket.org/connect2id/nimbus-jose-jwt/wiki/Home)
+    (Apache 2.0) jarchivelib (https://github.com/thrau/jarchivelib)
 
 ========================================================================
 BSD 3-Clause licenses

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 641880e..b6f93de 100644
--- a/pom.xml
+++ b/pom.xml
@@ -766,6 +766,13 @@
     </profile>
 
     <profile>
+      <id>integration</id>
+      <modules>
+        <module>zeppelin-integration</module>
+      </modules>
+    </profile>
+
+    <profile>
       <id>r</id>
       <modules>
         <module>r</module>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/pom.xml
----------------------------------------------------------------------
diff --git a/zeppelin-integration/pom.xml b/zeppelin-integration/pom.xml
new file mode 100644
index 0000000..e939a63
--- /dev/null
+++ b/zeppelin-integration/pom.xml
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <artifactId>zeppelin</artifactId>
+    <groupId>org.apache.zeppelin</groupId>
+    <version>0.8.0-SNAPSHOT</version>
+    <relativePath>..</relativePath>
+  </parent>
+
+  <groupId>org.apache.zeppelin</groupId>
+  <artifactId>zeppelin-integration</artifactId>
+  <packaging>jar</packaging>
+  <version>0.8.0-SNAPSHOT</version>
+  <name>Zeppelin: Integration Test</name>
+
+  <!-- See https://github.com/eirslett/frontend-maven-plugin/issues/229 -->
+  <prerequisites>
+    <maven>3.1.0</maven>
+  </prerequisites>
+
+  <properties>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+
+    <!--test library versions-->
+    <selenium.java.version>3.8.1</selenium.java.version>
+    <commons.lang3.version>3.4</commons.lang3.version>
+
+    <!--plugin library versions-->
+    <plugin.failsafe.version>2.16</plugin.failsafe.version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>com.google.code.gson</groupId>
+      <artifactId>gson</artifactId>
+      <version>2.8.2</version>
+    </dependency>
+    <dependency>
+      <groupId>com.google.guava</groupId>
+      <artifactId>guava</artifactId>
+      <version>23.0</version>
+    </dependency>
+    <dependency>
+      <groupId>org.seleniumhq.selenium</groupId>
+      <artifactId>selenium-java</artifactId>
+      <version>${selenium.java.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>com.google.code.gson</groupId>
+          <artifactId>gson</artifactId>
+        </exclusion>
+      </exclusions>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>zeppelin-zengine</artifactId>
+      <version>${project.version}</version>
+      <exclusions>
+        <exclusion>
+          <groupId>com.google.guava</groupId>
+          <artifactId>guava</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>com.google.code.gson</groupId>
+          <artifactId>gson</artifactId>
+        </exclusion>
+        <exclusion>
+          <groupId>org.apache.hadoop</groupId>
+          <artifactId>hadoop-common</artifactId>
+        </exclusion>
+      </exclusions>
+      <scope>test</scope>
+    </dependency>
+    
+    <dependency>
+      <groupId>org.apache.commons</groupId>
+      <artifactId>commons-lang3</artifactId>
+      <version>${commons.lang3.version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.rauschig</groupId>
+      <artifactId>jarchivelib</artifactId>
+      <version>0.7.1</version>
+      <exclusions>
+        <exclusion>
+          <groupId>org.apache.commons</groupId>
+          <artifactId>commons-compress</artifactId>
+        </exclusion>
+      </exclusions>
+    </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+    </dependency>
+
+    <!--test libraries-->
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <artifactId>maven-failsafe-plugin</artifactId>
+        <version>${plugin.failsafe.version}</version>
+        <executions>
+          <execution>
+            <goals>
+              <goal>integration-test</goal>
+              <goal>verify</goal>
+            </goals>
+          </execution>
+        </executions>
+        <configuration>
+          <argLine>-Xmx2048m</argLine>
+        </configuration>
+      </plugin>
+      <plugin>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <version>${plugin.surefire.version}</version>
+        <configuration combine.children="append">
+          <argLine>-Xmx2g -Xms1g -Dfile.encoding=UTF-8</argLine>
+          <excludes>
+            <exclude>${tests.to.exclude}</exclude>
+          </excludes>
+          <environmentVariables>
+            <ZEPPELIN_FORCE_STOP>1</ZEPPELIN_FORCE_STOP>
+          </environmentVariables>
+        </configuration>
+      </plugin>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-antrun-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>start-zeppelin</id>
+            <phase>pre-integration-test</phase>
+            <configuration>
+              <target unless="skipTests">
+                <exec executable="./zeppelin-daemon.sh" dir="${zeppelin.daemon.package.base}"
+                  spawn="true">
+                  <arg value="start"/>
+                </exec>
+              </target>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+          <execution>
+            <id>stop-zeppelin</id>
+            <phase>post-integration-test</phase>
+            <configuration>
+              <target unless="skipTests">
+                <exec executable="./zeppelin-daemon.sh" dir="${zeppelin.daemon.package.base}"
+                  spawn="false">
+                  <arg value="stop"/>
+                </exec>
+              </target>
+            </configuration>
+            <goals>
+              <goal>run</goal>
+            </goals>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>using-source-tree</id>
+      <activation>
+        <activeByDefault>true</activeByDefault>
+      </activation>
+      <properties>
+        <zeppelin.daemon.package.base>
+          ../bin
+        </zeppelin.daemon.package.base>
+      </properties>
+    </profile>
+    <profile>
+      <id>using-packaged-distr</id>
+      <activation>
+        <activeByDefault>false</activeByDefault>
+      </activation>
+      <properties>
+        <zeppelin.daemon.package.base>
+          ../zeppelin-distribution/target/zeppelin-${project.version}/zeppelin-${project.version}/bin
+        </zeppelin.daemon.package.base>
+      </properties>
+    </profile>
+  </profiles>
+
+</project>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
new file mode 100644
index 0000000..b4ebfe9
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/AbstractZeppelinIT.java
@@ -0,0 +1,138 @@
+/*
+ * 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.zeppelin;
+
+
+import com.google.common.base.Function;
+import org.apache.commons.codec.binary.Base64;
+import org.apache.commons.io.FileUtils;
+import org.openqa.selenium.*;
+import org.openqa.selenium.logging.LogEntries;
+import org.openqa.selenium.logging.LogEntry;
+import org.openqa.selenium.logging.LogType;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.support.ui.FluentWait;
+import org.openqa.selenium.support.ui.Wait;
+import org.openqa.selenium.support.ui.WebDriverWait;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Date;
+import java.util.concurrent.TimeUnit;
+
+abstract public class AbstractZeppelinIT {
+  protected static WebDriver driver;
+
+  protected final static Logger LOG = LoggerFactory.getLogger(AbstractZeppelinIT.class);
+  protected static final long MIN_IMPLICIT_WAIT = 5;
+  protected static final long MAX_IMPLICIT_WAIT = 30;
+  protected static final long MAX_BROWSER_TIMEOUT_SEC = 30;
+  protected static final long MAX_PARAGRAPH_TIMEOUT_SEC = 120;
+
+  protected void setTextOfParagraph(int paragraphNo, String text) {
+    String editorId = driver.findElement(By.xpath(getParagraphXPath(paragraphNo) + "//div[contains(@class, 'editor')]")).getAttribute("id");
+    if (driver instanceof JavascriptExecutor) {
+      ((JavascriptExecutor) driver).executeScript("ace.edit('" + editorId + "'). setValue('" + text + "')");
+    } else {
+      throw new IllegalStateException("This driver does not support JavaScript!");
+    }
+  }
+
+  protected void runParagraph(int paragraphNo) {
+    driver.findElement(By.xpath(getParagraphXPath(paragraphNo) + "//span[@class='icon-control-play']")).click();
+  }
+
+
+  protected String getParagraphXPath(int paragraphNo) {
+    return "(//div[@ng-controller=\"ParagraphCtrl\"])[" + paragraphNo + "]";
+  }
+
+  protected String getNoteFormsXPath() {
+    return "(//div[@id='noteForms'])";
+  }
+
+  protected boolean waitForParagraph(final int paragraphNo, final String state) {
+    By locator = By.xpath(getParagraphXPath(paragraphNo)
+        + "//div[contains(@class, 'control')]//span[2][contains(.,'" + state + "')]");
+    WebElement element = pollingWait(locator, MAX_PARAGRAPH_TIMEOUT_SEC);
+    return element.isDisplayed();
+  }
+
+  protected String getParagraphStatus(final int paragraphNo) {
+    By locator = By.xpath(getParagraphXPath(paragraphNo)
+        + "//div[contains(@class, 'control')]/span[2]");
+
+    return driver.findElement(locator).getText();
+  }
+
+  protected boolean waitForText(final String txt, final By locator) {
+    try {
+      WebElement element = pollingWait(locator, MAX_BROWSER_TIMEOUT_SEC);
+      return txt.equals(element.getText());
+    } catch (TimeoutException e) {
+      return false;
+    }
+  }
+
+  protected WebElement pollingWait(final By locator, final long timeWait) {
+    Wait<WebDriver> wait = new FluentWait<>(driver)
+        .withTimeout(timeWait, TimeUnit.SECONDS)
+        .pollingEvery(1, TimeUnit.SECONDS)
+        .ignoring(NoSuchElementException.class);
+
+    return wait.until(new Function<WebDriver, WebElement>() {
+      public WebElement apply(WebDriver driver) {
+        return driver.findElement(locator);
+      }
+    });
+  }
+
+  protected void createNewNote() {
+    clickAndWait(By.xpath("//div[contains(@class, \"col-md-4\")]/div/h5/a[contains(.,'Create new" +
+        " note')]"));
+
+    WebDriverWait block = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
+    block.until(ExpectedConditions.visibilityOfElementLocated(By.id("noteCreateModal")));
+    clickAndWait(By.id("createNoteButton"));
+    block.until(ExpectedConditions.invisibilityOfElementLocated(By.className("pull-right")));
+  }
+
+  protected void deleteTestNotebook(final WebDriver driver) {
+    WebDriverWait block = new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC);
+    driver.findElement(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']"))
+        .sendKeys(Keys.ENTER);
+    block.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(".//*[@id='main']//button[@ng-click='moveNoteToTrash(note.id)']")));
+    driver.findElement(By.xpath("//div[@class='modal-dialog'][contains(.,'This note will be moved to trash')]" +
+        "//div[@class='modal-footer']//button[contains(.,'OK')]")).click();
+    ZeppelinITUtils.sleep(100, true);
+  }
+
+  protected void clickAndWait(final By locator) {
+    pollingWait(locator, MAX_IMPLICIT_WAIT).click();
+    ZeppelinITUtils.sleep(1000, true);
+  }
+
+  protected void handleException(String message, Exception e) throws Exception {
+    LOG.error(message, e);
+    File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
+    LOG.error("ScreenShot::\ndata:image/png;base64," + new String(Base64.encodeBase64(FileUtils.readFileToByteArray(scrFile))));
+    throw e;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/CommandExecutor.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/CommandExecutor.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/CommandExecutor.java
new file mode 100644
index 0000000..6a55f3e
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/CommandExecutor.java
@@ -0,0 +1,74 @@
+/*
+ * 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.zeppelin;
+
+import org.apache.commons.lang3.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+public class CommandExecutor {
+
+  public final static Logger LOG = LoggerFactory.getLogger(CommandExecutor.class);
+
+  public enum IGNORE_ERRORS {
+    TRUE,
+    FALSE
+  }
+
+  public static int NORMAL_EXIT = 0;
+
+  private static IGNORE_ERRORS DEFAULT_BEHAVIOUR_ON_ERRORS = IGNORE_ERRORS.TRUE;
+
+  public static Object executeCommandLocalHost(String[] command, boolean printToConsole, ProcessData.Types_Of_Data type, IGNORE_ERRORS ignore_errors) {
+    List<String> subCommandsAsList = new ArrayList<>(Arrays.asList(command));
+    String mergedCommand = StringUtils.join(subCommandsAsList, " ");
+
+    LOG.info("Sending command \"" + mergedCommand + "\" to localhost");
+
+    ProcessBuilder processBuilder = new ProcessBuilder(command);
+    Process process = null;
+    try {
+      process = processBuilder.start();
+    } catch (IOException e) {
+      throw new RuntimeException(e);
+    }
+
+    ProcessData data_of_process = new ProcessData(process, printToConsole);
+    Object output_of_process = data_of_process.getData(type);
+    int exit_code = data_of_process.getExitCodeValue();
+
+    if (!printToConsole)
+      LOG.trace(output_of_process.toString());
+    else
+      LOG.debug(output_of_process.toString());
+    if (ignore_errors == IGNORE_ERRORS.FALSE && exit_code != NORMAL_EXIT) {
+      LOG.error(String.format("*********************Command '%s' failed with exitcode %s *********************", mergedCommand, exit_code));
+    }
+    return output_of_process;
+  }
+
+  public static Object executeCommandLocalHost(String command, boolean printToConsole, ProcessData.Types_Of_Data type) {
+    return executeCommandLocalHost(new String[]{"bash", "-c", command}, printToConsole, type, DEFAULT_BEHAVIOUR_ON_ERRORS);
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/ProcessData.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/ProcessData.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/ProcessData.java
new file mode 100644
index 0000000..2a05b1f
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/ProcessData.java
@@ -0,0 +1,256 @@
+/*
+ * 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.zeppelin;
+
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.PrintWriter;
+import java.io.StringWriter;
+import java.util.concurrent.TimeUnit;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class ProcessData {
+  public enum Types_Of_Data {
+    OUTPUT,
+    ERROR,
+    EXIT_CODE,
+    STREAMS_MERGED,
+    PROCESS_DATA_OBJECT
+  }
+
+  public final static Logger LOG = LoggerFactory.getLogger(ProcessData.class);
+
+  private Process checked_process;
+  private boolean printToConsole = false;
+  private boolean removeRedundantOutput = true;
+
+  public ProcessData(Process connected_process, boolean printToConsole, int silenceTimeout, TimeUnit timeUnit) {
+    this.checked_process = connected_process;
+    this.printToConsole = printToConsole;
+    this.silenceTimeout = TimeUnit.MILLISECONDS.convert(silenceTimeout, timeUnit);
+  }
+
+  public ProcessData(Process connected_process, boolean printToConsole, int silenceTimeoutSec) {
+    this.checked_process = connected_process;
+    this.printToConsole = printToConsole;
+    this.silenceTimeout = TimeUnit.MILLISECONDS.convert(silenceTimeoutSec, TimeUnit.SECONDS);
+  }
+
+  public ProcessData(Process connected_process, boolean printToConsole) {
+    this.checked_process = connected_process;
+    this.printToConsole = printToConsole;
+  }
+
+  public ProcessData(Process connected_process) {
+    this.checked_process = connected_process;
+    this.printToConsole = true;
+  }
+
+
+  boolean returnCodeRetrieved = false;
+
+  private String outPutStream = null;
+  private String errorStream = null;
+  private int returnCode;
+  private long silenceTimeout = 10 * 60 * 1000;
+  private final long unconditionalExitDelayMinutes = 30;
+
+  public static boolean isRunning(Process process) {
+    try {
+      process.exitValue();
+      return false;
+    } catch (IllegalThreadStateException e) {
+      return true;
+    }
+  }
+
+  public Object getData(Types_Of_Data type) {
+    //TODO get rid of Pseudo-terminal will not be allocated because stdin is not a terminal.
+    switch (type) {
+      case OUTPUT: {
+        return this.getOutPutStream();
+      }
+      case ERROR: {
+        return this.getErrorStream();
+      }
+      case EXIT_CODE: {
+        return this.getExitCodeValue();
+      }
+      case STREAMS_MERGED: {
+        return this.getOutPutStream() + "\n" + this.getErrorStream();
+      }
+      case PROCESS_DATA_OBJECT: {
+        this.getErrorStream();
+        return this;
+      }
+      default: {
+        throw new IllegalArgumentException("Data Type " + type + " not supported yet!");
+      }
+    }
+  }
+
+  public int getExitCodeValue() {
+    try {
+      if (!returnCodeRetrieved) {
+        this.checked_process.waitFor();
+        this.returnCode = this.checked_process.exitValue();
+        this.returnCodeRetrieved = true;
+        this.checked_process.destroy();
+      }
+    } catch (Exception inter) {
+      throw new RuntimeException("Couldn't finish waiting for process " + this.checked_process + " termination", inter);
+    }
+    return this.returnCode;
+  }
+
+  public String getOutPutStream() {
+    if (this.outPutStream == null) {
+      try {
+        buildOutputAndErrorStreamData();
+      } catch (Exception e) {
+        throw new RuntimeException("Couldn't retrieve Output Stream data from process: " + this.checked_process.toString(), e);
+
+      }
+    }
+    this.outPutStream = this.outPutStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
+    this.errorStream = this.errorStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
+    return this.outPutStream;
+  }
+
+  public String getErrorStream() {
+    if (this.errorStream == null) {
+      try {
+        buildOutputAndErrorStreamData();
+      } catch (Exception e) {
+        throw new RuntimeException("Couldn't retrieve Error Stream data from process: " + this.checked_process.toString(), e);
+
+      }
+    }
+    this.outPutStream = this.outPutStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
+    this.errorStream = this.errorStream.replace("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
+    return this.errorStream;
+  }
+
+  public String toString() {
+    StringBuilder result = new StringBuilder();
+    result.append(String.format("[OUTPUT STREAM]\n%s\n", this.outPutStream));
+    result.append(String.format("[ERROR STREAM]\n%s\n", this.errorStream));
+    result.append(String.format("[EXIT CODE]\n%d", this.returnCode));
+    return result.toString();
+  }
+
+  private void buildOutputAndErrorStreamData() throws IOException {
+    StringBuilder sbInStream = new StringBuilder();
+    StringBuilder sbErrorStream = new StringBuilder();
+
+    try {
+      InputStream in = this.checked_process.getInputStream();
+      InputStream inErrors = this.checked_process.getErrorStream();
+      BufferedReader inReader = new BufferedReader(new InputStreamReader(in));
+      BufferedReader inReaderErrors = new BufferedReader(new InputStreamReader(inErrors));
+      LOG.trace("Started retrieving data from streams of attached process: " + this.checked_process);
+
+      long lastStreamDataTime = System.currentTimeMillis();   //Store start time to be able to finish method if command hangs
+      long unconditionalExitTime = System.currentTimeMillis() + TimeUnit.MILLISECONDS.convert(unconditionalExitDelayMinutes, TimeUnit.MINUTES); // Stop after 'unconditionalExitDelayMinutes' even if process is alive and sending output
+      final int BUFFER_LEN = 300;
+      char charBuffer[] = new char[BUFFER_LEN];     //Use char buffer to read output, size can be tuned.
+      boolean outputProduced = true;                //Flag to check if previous iteration produced any output
+      while (isRunning(this.checked_process) || outputProduced) {   //Continue if process is alive or some output was produced on previous iteration and there may be still some data to read.
+        outputProduced = false;
+        ZeppelinITUtils.sleep(100, false);                                  //Some local commands can exit fast, but immediate stream reading will give no output and after iteration, 'while' condition will be false so we will not read out any output while it is still there, just need to wait for some time for it to appear in streams.
+
+        StringBuilder tempSB = new StringBuilder();
+        while (inReader.ready()) {
+          tempSB.setLength(0);                                // clean temporary StringBuilder
+          int readCount = inReader.read(charBuffer, 0, BUFFER_LEN); //read up to 'BUFFER_LEN' chars to buffer
+          if (readCount < 1) {                                     // if nothing read or error occurred
+            break;
+          }
+          tempSB.append(charBuffer, 0, readCount);
+
+          sbInStream.append(tempSB);
+          if (tempSB.length() > 0) {
+            outputProduced = true;                                //set flag to know that we read something and there may be moire data, even if process already exited
+          }
+
+          lastStreamDataTime = System.currentTimeMillis();        //remember last time data was read from streams to be sure we are not looping infinitely
+        }
+
+        tempSB = new StringBuilder();                               //Same, but for error stream
+        while (inReaderErrors.ready()) {
+          tempSB.setLength(0);
+          int readCount = inReaderErrors.read(charBuffer, 0, BUFFER_LEN);
+          if (readCount < 1) {
+            break;
+          }
+          tempSB.append(charBuffer, 0, readCount);
+          sbErrorStream.append(tempSB);
+          if (tempSB.length() > 0) {
+            outputProduced = true;
+            String temp = new String(tempSB);
+            temp = temp.replaceAll("Pseudo-terminal will not be allocated because stdin is not a terminal.", "");
+            //TODO : error stream output need to be improved, because it outputs downloading information.
+            if (printToConsole) {
+              if (!temp.trim().equals("")) {
+                if (temp.toLowerCase().contains("error") || temp.toLowerCase().contains("failed")) {
+                  LOG.warn(temp.trim());
+                } else {
+                  LOG.debug(temp.trim());
+                }
+              }
+            }
+          }
+          lastStreamDataTime = System.currentTimeMillis();
+        }
+
+
+        if ((System.currentTimeMillis() - lastStreamDataTime > silenceTimeout) ||     //Exit if silenceTimeout ms has passed from last stream read. Means process is alive but not sending any data.
+            (System.currentTimeMillis() > unconditionalExitTime)) {                    //Exit unconditionally - guards against alive process continuously sending data.
+          LOG.info("Conditions: " + (System.currentTimeMillis() - lastStreamDataTime > silenceTimeout) + " " +
+              (System.currentTimeMillis() > unconditionalExitTime));
+          this.checked_process.destroy();
+          try {
+            if ((System.currentTimeMillis() > unconditionalExitTime)) {
+              LOG.error(
+                  "!@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@Unconditional exit occured@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@!\nsome process hag up for more than "
+                      + unconditionalExitDelayMinutes + " minutes.");
+            }
+            LOG.error("!##################################!");
+            StringWriter sw = new StringWriter();
+            Exception e = new Exception("Exited from buildOutputAndErrorStreamData by timeout");
+            e.printStackTrace(new PrintWriter(sw)); //Get stack trace
+            LOG.error(String.valueOf(e), e);
+          } catch (Exception ignore) {
+            LOG.info("Exception in ProcessData while buildOutputAndErrorStreamData ", ignore);
+          }
+          break;
+        }
+      }
+
+      in.close();
+      inErrors.close();
+    } finally {
+      this.outPutStream = sbInStream.toString();
+      this.errorStream = sbErrorStream.toString();
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java
new file mode 100644
index 0000000..768113f
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/WebDriverManager.java
@@ -0,0 +1,215 @@
+/*
+ * 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.zeppelin;
+
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URL;
+import java.util.concurrent.TimeUnit;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.SystemUtils;
+import org.openqa.selenium.By;
+import org.openqa.selenium.TimeoutException;
+import org.openqa.selenium.WebDriver;
+import org.openqa.selenium.chrome.ChromeDriver;
+import org.openqa.selenium.firefox.FirefoxBinary;
+import org.openqa.selenium.firefox.FirefoxDriver;
+import org.openqa.selenium.firefox.FirefoxDriver.SystemProperty;
+import org.openqa.selenium.firefox.FirefoxOptions;
+import org.openqa.selenium.firefox.FirefoxProfile;
+import org.openqa.selenium.firefox.GeckoDriverService;
+import org.openqa.selenium.safari.SafariDriver;
+import org.openqa.selenium.support.ui.ExpectedCondition;
+import org.openqa.selenium.support.ui.WebDriverWait;
+import org.rauschig.jarchivelib.Archiver;
+import org.rauschig.jarchivelib.ArchiverFactory;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+public class WebDriverManager {
+
+  public final static Logger LOG = LoggerFactory.getLogger(WebDriverManager.class);
+
+  private static String downLoadsDir = "";
+
+  private static String GECKODRIVER_VERSION = "0.19.1";
+
+  public static WebDriver getWebDriver() {
+    WebDriver driver = null;
+
+    if (driver == null) {
+      try {
+        FirefoxBinary ffox = new FirefoxBinary();
+        if ("true".equals(System.getenv("TRAVIS"))) {
+          ffox.setEnvironmentProperty("DISPLAY", ":99"); // xvfb is supposed to
+          // run with DISPLAY 99
+        }
+        int firefoxVersion = WebDriverManager.getFirefoxVersion();
+        LOG.info("Firefox version " + firefoxVersion + " detected");
+
+        downLoadsDir = FileUtils.getTempDirectory().toString();
+
+        String tempPath = downLoadsDir + "/firefox/";
+
+        downloadGeekoDriver(firefoxVersion, tempPath);
+
+        FirefoxProfile profile = new FirefoxProfile();
+        profile.setPreference("browser.download.folderList", 2);
+        profile.setPreference("browser.download.dir", downLoadsDir);
+        profile.setPreference("browser.helperApps.alwaysAsk.force", false);
+        profile.setPreference("browser.download.manager.showWhenStarting", false);
+        profile.setPreference("browser.download.manager.showAlertOnComplete", false);
+        profile.setPreference("browser.download.manager.closeWhenDone", true);
+        profile.setPreference("app.update.auto", false);
+        profile.setPreference("app.update.enabled", false);
+        profile.setPreference("dom.max_script_run_time", 0);
+        profile.setPreference("dom.max_chrome_script_run_time", 0);
+        profile.setPreference("browser.helperApps.neverAsk.saveToDisk",
+            "application/x-ustar,application/octet-stream,application/zip,text/csv,text/plain");
+        profile.setPreference("network.proxy.type", 0);
+
+        System.setProperty(GeckoDriverService.GECKO_DRIVER_EXE_PROPERTY, tempPath + "geckodriver");
+        System.setProperty(SystemProperty.DRIVER_USE_MARIONETTE, "false");
+
+        FirefoxOptions firefoxOptions = new FirefoxOptions();
+        firefoxOptions.setBinary(ffox);
+        firefoxOptions.setProfile(profile);
+        driver = new FirefoxDriver(firefoxOptions);
+      } catch (Exception e) {
+        LOG.error("Exception in WebDriverManager while FireFox Driver ", e);
+      }
+    }
+
+    if (driver == null) {
+      try {
+        driver = new ChromeDriver();
+      } catch (Exception e) {
+        LOG.error("Exception in WebDriverManager while ChromeDriver ", e);
+      }
+    }
+
+    if (driver == null) {
+      try {
+        driver = new SafariDriver();
+      } catch (Exception e) {
+        LOG.error("Exception in WebDriverManager while SafariDriver ", e);
+      }
+    }
+
+    String url;
+    if (System.getenv("url") != null) {
+      url = System.getenv("url");
+    } else {
+      url = "http://localhost:8080";
+    }
+
+    long start = System.currentTimeMillis();
+    boolean loaded = false;
+    driver.manage().timeouts().implicitlyWait(AbstractZeppelinIT.MAX_IMPLICIT_WAIT,
+        TimeUnit.SECONDS);
+    driver.get(url);
+
+    while (System.currentTimeMillis() - start < 60 * 1000) {
+      // wait for page load
+      try {
+        (new WebDriverWait(driver, 30)).until(new ExpectedCondition<Boolean>() {
+          @Override
+          public Boolean apply(WebDriver d) {
+            return d.findElement(By.xpath("//i[@uib-tooltip='WebSocket Connected']"))
+                .isDisplayed();
+          }
+        });
+        loaded = true;
+        break;
+      } catch (TimeoutException e) {
+        LOG.info("Exception in WebDriverManager while WebDriverWait ", e);
+        driver.navigate().to(url);
+      }
+    }
+
+    if (loaded == false) {
+      fail();
+    }
+
+    driver.manage().window().maximize();
+    return driver;
+  }
+
+  public static void downloadGeekoDriver(int firefoxVersion, String tempPath) {
+    String geekoDriverUrlString =
+        "https://github.com/mozilla/geckodriver/releases/download/v" + GECKODRIVER_VERSION
+            + "/geckodriver-v" + GECKODRIVER_VERSION + "-";
+
+    LOG.info("Geeko version: " + firefoxVersion + ", will be downloaded to " + tempPath);
+    try {
+      if (SystemUtils.IS_OS_WINDOWS) {
+        if (System.getProperty("sun.arch.data.model").equals("64")) {
+          geekoDriverUrlString += "win64.zip";
+        } else {
+          geekoDriverUrlString += "win32.zip";
+        }
+      } else if (SystemUtils.IS_OS_LINUX) {
+        if (System.getProperty("sun.arch.data.model").equals("64")) {
+          geekoDriverUrlString += "linux64.tar.gz";
+        } else {
+          geekoDriverUrlString += "linux32.tar.gz";
+        }
+      } else if (SystemUtils.IS_OS_MAC_OSX) {
+        geekoDriverUrlString += "macos.tar.gz";
+      }
+
+      File geekoDriver = new File(tempPath + "geckodriver");
+      File geekoDriverZip = new File(tempPath + "geckodriver.tar");
+      File geekoDriverDir = new File(tempPath);
+      URL geekoDriverUrl = new URL(geekoDriverUrlString);
+      if (!geekoDriver.exists()) {
+        FileUtils.copyURLToFile(geekoDriverUrl, geekoDriverZip);
+        if (SystemUtils.IS_OS_WINDOWS) {
+          Archiver archiver = ArchiverFactory.createArchiver("zip");
+          archiver.extract(geekoDriverZip, geekoDriverDir);
+        } else {
+          Archiver archiver = ArchiverFactory.createArchiver("tar", "gz");
+          archiver.extract(geekoDriverZip, geekoDriverDir);
+        }
+      }
+
+    } catch (IOException e) {
+      LOG.error("Download of Geeko version: " + firefoxVersion + ", falied in path " + tempPath);
+    }
+    LOG.info("Download of Geeko version: " + firefoxVersion + ", successful");
+  }
+
+  public static int getFirefoxVersion() {
+    try {
+      String firefoxVersionCmd = "firefox -v";
+      if (System.getProperty("os.name").startsWith("Mac OS")) {
+        firefoxVersionCmd = "/Applications/Firefox.app/Contents/MacOS/" + firefoxVersionCmd;
+      }
+      String versionString = (String) CommandExecutor
+          .executeCommandLocalHost(firefoxVersionCmd, false, ProcessData.Types_Of_Data.OUTPUT);
+      return Integer
+          .valueOf(versionString.replaceAll("Mozilla Firefox", "").trim().substring(0, 2));
+    } catch (Exception e) {
+      LOG.error("Exception in WebDriverManager while getWebDriver ", e);
+      return -1;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
new file mode 100644
index 0000000..402a18d
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/ZeppelinITUtils.java
@@ -0,0 +1,60 @@
+/*
+ * 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.zeppelin;
+
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.openqa.selenium.WebDriver;
+import java.util.concurrent.TimeUnit;
+
+public class ZeppelinITUtils {
+
+  public final static Logger LOG = LoggerFactory.getLogger(ZeppelinITUtils.class);
+
+  public static void sleep(long millis, boolean logOutput) {
+    if (logOutput) {
+      LOG.info("Starting sleeping for " + (millis / 1000) + " seconds...");
+      LOG.info("Caller: " + Thread.currentThread().getStackTrace()[2]);
+    }
+    try {
+      Thread.sleep(millis);
+    } catch (InterruptedException e) {
+      LOG.error("Exception in WebDriverManager while getWebDriver ", e);
+    }
+    if (logOutput) {
+      LOG.info("Finished.");
+    }
+  }
+
+  public static void restartZeppelin() {
+    CommandExecutor.executeCommandLocalHost("../bin/zeppelin-daemon.sh restart",
+        false, ProcessData.Types_Of_Data.OUTPUT);
+    //wait for server to start.
+    sleep(5000, false);
+  }
+
+  public static void turnOffImplicitWaits(WebDriver driver) {
+    driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS);
+  }
+
+  public static void turnOnImplicitWaits(WebDriver driver) {
+    driver.manage().timeouts().implicitlyWait(AbstractZeppelinIT.MAX_IMPLICIT_WAIT,
+        TimeUnit.SECONDS);
+  }
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
new file mode 100644
index 0000000..4c194f3
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/AuthenticationIT.java
@@ -0,0 +1,302 @@
+/*
+ * 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.zeppelin.integration;
+
+import static org.junit.Assert.assertTrue;
+
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang3.StringUtils;
+import org.apache.zeppelin.AbstractZeppelinIT;
+import org.apache.zeppelin.WebDriverManager;
+import org.apache.zeppelin.ZeppelinITUtils;
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.hamcrest.CoreMatchers;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+import org.openqa.selenium.By;
+import org.openqa.selenium.Keys;
+import org.openqa.selenium.TimeoutException;
+import org.openqa.selenium.WebElement;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * Created for org.apache.zeppelin.integration on 13/06/16.
+ */
+public class AuthenticationIT extends AbstractZeppelinIT {
+  private static final Logger LOG = LoggerFactory.getLogger(AuthenticationIT.class);
+
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
+  static String shiroPath;
+  static String authShiro = "[users]\n" +
+      "admin = password1, admin\n" +
+      "finance1 = finance1, finance\n" +
+      "finance2 = finance2, finance\n" +
+      "hr1 = hr1, hr\n" +
+      "hr2 = hr2, hr\n" +
+      "[main]\n" +
+      "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
+      "securityManager.sessionManager = $sessionManager\n" +
+      "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
+      "shiro.loginUrl = /api/login\n" +
+      "anyofroles = org.apache.zeppelin.utils.AnyOfRolesAuthorizationFilter\n" +
+      "[roles]\n" +
+      "admin = *\n" +
+      "hr = *\n" +
+      "finance = *\n" +
+      "[urls]\n" +
+      "/api/version = anon\n" +
+      "/api/interpreter/** = authc, anyofroles[admin, finance]\n" +
+      "/** = authc";
+
+  static String originalShiro = "";
+
+
+  @BeforeClass
+  public static void startUp() {
+    try {
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), new File("../").getAbsolutePath());
+      ZeppelinConfiguration conf = ZeppelinConfiguration.create();
+      shiroPath = conf.getRelativeDir(String.format("%s/shiro.ini", conf.getConfDir()));
+      File file = new File(shiroPath);
+      if (file.exists()) {
+        originalShiro = StringUtils.join(FileUtils.readLines(file, "UTF-8"), "\n");
+      }
+      FileUtils.write(file, authShiro, "UTF-8");
+    } catch (IOException e) {
+      LOG.error("Error in AuthenticationIT startUp::", e);
+    }
+    ZeppelinITUtils.restartZeppelin();
+    driver = WebDriverManager.getWebDriver();
+  }
+
+
+  @AfterClass
+  public static void tearDown() {
+    try {
+      if (!StringUtils.isBlank(shiroPath)) {
+        File file = new File(shiroPath);
+        if (StringUtils.isBlank(originalShiro)) {
+          FileUtils.deleteQuietly(file);
+        } else {
+          FileUtils.write(file, originalShiro, "UTF-8");
+        }
+      }
+    } catch (IOException e) {
+      LOG.error("Error in AuthenticationIT tearDown::", e);
+    }
+    ZeppelinITUtils.restartZeppelin();
+    driver.quit();
+  }
+
+  public void authenticationUser(String userName, String password) {
+    pollingWait(By.xpath(
+        "//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"),
+        MAX_BROWSER_TIMEOUT_SEC).click();
+    ZeppelinITUtils.sleep(1000, false);
+    pollingWait(By.xpath("//*[@id='userName']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(userName);
+    pollingWait(By.xpath("//*[@id='password']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(password);
+    pollingWait(By.xpath("//*[@id='loginModalContent']//button[contains(.,'Login')]"),
+        MAX_BROWSER_TIMEOUT_SEC).click();
+    ZeppelinITUtils.sleep(1000, false);
+  }
+
+  private void testShowNotebookListOnNavbar() throws Exception {
+    try {
+      pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+      assertTrue(driver.findElements(By.xpath("//a[@class=\"notebook-list-item ng-scope\"]")).size() > 0);
+      pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
+              MAX_BROWSER_TIMEOUT_SEC).click();
+      pollingWait(By.xpath("//li[@class='dropdown notebook-list-dropdown']"),
+              MAX_BROWSER_TIMEOUT_SEC).click();
+    } catch (Exception e) {
+      handleException("Exception in ParagraphActionsIT while testShowNotebookListOnNavbar ", e);
+    }
+  }
+
+  public void logoutUser(String userName) throws URISyntaxException {
+    ZeppelinITUtils.sleep(500, false);
+    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
+        userName + "')]")).click();
+    ZeppelinITUtils.sleep(500, false);
+    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
+        userName + "')]//a[@ng-click='navbar.logout()']")).click();
+    ZeppelinITUtils.sleep(2000, false);
+    if (driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button"))
+        .isDisplayed()) {
+      driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button")).click();
+    }
+    driver.get(new URI(driver.getCurrentUrl()).resolve("/#/").toString());
+    ZeppelinITUtils.sleep(500, false);
+  }
+
+  //  @Test
+  public void testSimpleAuthentication() throws Exception {
+    try {
+      AuthenticationIT authenticationIT = new AuthenticationIT();
+      authenticationIT.authenticationUser("admin", "password1");
+
+      collector.checkThat("Check is user logged in", true,
+          CoreMatchers.equalTo(driver.findElement(By.partialLinkText("Create new note"))
+              .isDisplayed()));
+
+      authenticationIT.logoutUser("admin");
+    } catch (Exception e) {
+      handleException("Exception in AuthenticationIT while testCreateNewButton ", e);
+    }
+  }
+
+  @Test
+  public void testAnyOfRoles() throws Exception {
+    try {
+      AuthenticationIT authenticationIT = new AuthenticationIT();
+      authenticationIT.authenticationUser("admin", "password1");
+
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
+
+      collector.checkThat("Check is user has permission to view this page", true,
+          CoreMatchers.equalTo(pollingWait(By.xpath(
+              "//div[@id='main']/div/div[2]"),
+              MIN_IMPLICIT_WAIT).isDisplayed())
+      );
+
+      authenticationIT.logoutUser("admin");
+
+      authenticationIT.authenticationUser("finance1", "finance1");
+
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
+
+      collector.checkThat("Check is user has permission to view this page", true,
+          CoreMatchers.equalTo(pollingWait(By.xpath(
+              "//div[@id='main']/div/div[2]"),
+              MIN_IMPLICIT_WAIT).isDisplayed())
+      );
+      
+      authenticationIT.logoutUser("finance1");
+
+      authenticationIT.authenticationUser("hr1", "hr1");
+
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
+
+      try {
+        collector.checkThat("Check is user has permission to view this page",
+            true, CoreMatchers.equalTo(
+                pollingWait(By.xpath("//li[contains(@class, 'ng-toast__message')]//span/span"),
+                    MIN_IMPLICIT_WAIT).isDisplayed()));
+      } catch (TimeoutException e) {
+        throw new Exception("Expected ngToast not found", e);
+      }
+      authenticationIT.logoutUser("hr1");
+
+    } catch (Exception e) {
+      handleException("Exception in AuthenticationIT while testAnyOfRoles ", e);
+    }
+  }
+
+  @Test
+  public void testGroupPermission() throws Exception {
+    try {
+      AuthenticationIT authenticationIT = new AuthenticationIT();
+      authenticationIT.authenticationUser("finance1", "finance1");
+      createNewNote();
+
+      String noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+
+      pollingWait(By.xpath("//span[@uib-tooltip='Note permissions']"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+      pollingWait(By.xpath(".//*[@id='selectOwners']/following::span//input"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
+      pollingWait(By.xpath(".//*[@id='selectReaders']/following::span//input"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
+      pollingWait(By.xpath(".//*[@id='selectRunners']/following::span//input"),
+              MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
+      pollingWait(By.xpath(".//*[@id='selectWriters']/following::span//input"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("finance ");
+      pollingWait(By.xpath("//button[@ng-click='savePermissions()']"), MAX_BROWSER_TIMEOUT_SEC)
+          .sendKeys(Keys.ENTER);
+
+      pollingWait(By.xpath("//div[@class='modal-dialog'][contains(.,'Permissions Saved ')]" +
+              "//div[@class='modal-footer']//button[contains(.,'OK')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+      authenticationIT.logoutUser("finance1");
+
+      authenticationIT.authenticationUser("hr1", "hr1");
+      try {
+        WebElement element = pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC);
+        collector.checkThat("Check is user has permission to view this note link", false,
+            CoreMatchers.equalTo(element.isDisplayed()));
+      } catch (Exception e) {
+        //This should have failed, nothing to worry.
+      }
+
+      driver.get(new URI(driver.getCurrentUrl()).resolve("/#/notebook/" + noteId).toString());
+
+      List<WebElement> privilegesModal = driver.findElements(
+          By.xpath("//div[@class='modal-content']//div[@class='bootstrap-dialog-header']" +
+              "//div[contains(.,'Insufficient privileges')]"));
+      collector.checkThat("Check is user has permission to view this note", 1,
+          CoreMatchers.equalTo(privilegesModal.size()));
+      driver.findElement(
+          By.xpath("//div[@class='modal-content'][contains(.,'Insufficient privileges')]" +
+              "//div[@class='modal-footer']//button[2]")).click();
+      authenticationIT.logoutUser("hr1");
+
+      authenticationIT.authenticationUser("finance2", "finance2");
+      try {
+        WebElement element = pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC);
+        collector.checkThat("Check is user has permission to view this note link", true,
+            CoreMatchers.equalTo(element.isDisplayed()));
+      } catch (Exception e) {
+        //This should have failed, nothing to worry.
+      }
+
+      driver.get(new URI(driver.getCurrentUrl()).resolve("/#/notebook/" + noteId).toString());
+
+      privilegesModal = driver.findElements(
+          By.xpath("//div[@class='modal-content']//div[@class='bootstrap-dialog-header']" +
+              "//div[contains(.,'Insufficient privileges')]"));
+      collector.checkThat("Check is user has permission to view this note", 0,
+          CoreMatchers.equalTo(privilegesModal.size()));
+      deleteTestNotebook(driver);
+      authenticationIT.logoutUser("finance2");
+
+
+    } catch (Exception e) {
+      handleException("Exception in AuthenticationIT while testGroupPermission ", e);
+    }
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java
new file mode 100644
index 0000000..d2e31a0
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterIT.java
@@ -0,0 +1,73 @@
+/*
+ * 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.zeppelin.integration;
+
+import org.apache.zeppelin.AbstractZeppelinIT;
+import org.apache.zeppelin.WebDriverManager;
+import org.hamcrest.CoreMatchers;
+import org.junit.After;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.Select;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class InterpreterIT extends AbstractZeppelinIT {
+  private static final Logger LOG = LoggerFactory.getLogger(InterpreterIT.class);
+
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
+
+  @Before
+  public void startUp() {
+    driver = WebDriverManager.getWebDriver();
+  }
+
+  @After
+  public void tearDown() {
+    driver.quit();
+  }
+
+  @Test
+  public void testShowDescriptionOnInterpreterCreate() throws Exception {
+    try {
+      // navigate to interpreter page
+      WebElement settingButton = driver.findElement(By.xpath("//button[@class='nav-btn dropdown-toggle ng-scope']"));
+      settingButton.click();
+      WebElement interpreterLink = driver.findElement(By.xpath("//a[@href='#/interpreter']"));
+      interpreterLink.click();
+
+      WebElement createButton = driver.findElement(By.xpath("//button[contains(., 'Create')]"));
+      createButton.click();
+
+      Select select = new Select(driver.findElement(By.xpath("//select[@ng-change='newInterpreterGroupChange()']")));
+      select.selectByVisibleText("spark");
+
+      collector.checkThat("description of interpreter property is displayed",
+          driver.findElement(By.xpath("//tr/td[contains(text(), 'spark.app.name')]/following-sibling::td[3]")).getText(),
+          CoreMatchers.equalTo("The name of spark application."));
+
+    } catch (Exception e) {
+      handleException("Exception in InterpreterIT while testShowDescriptionOnInterpreterCreate ", e);
+    }
+  }
+}


[5/6] zeppelin git commit: [ZEPPELIN-3127] Upgrade selenium version

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/zeppelin/blob/7bff131a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java
----------------------------------------------------------------------
diff --git a/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java
new file mode 100644
index 0000000..1f18a65
--- /dev/null
+++ b/zeppelin-integration/src/test/java/org/apache/zeppelin/integration/InterpreterModeActionsIT.java
@@ -0,0 +1,877 @@
+/*
+ * 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.zeppelin.integration;
+
+import org.apache.commons.lang.StringUtils;
+import org.apache.zeppelin.CommandExecutor;
+import org.apache.zeppelin.ProcessData;
+import org.apache.zeppelin.AbstractZeppelinIT;
+import org.apache.zeppelin.WebDriverManager;
+import org.apache.zeppelin.ZeppelinITUtils;
+import org.apache.zeppelin.conf.ZeppelinConfiguration;
+import org.hamcrest.CoreMatchers;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+import org.junit.rules.ErrorCollector;
+import org.openqa.selenium.By;
+import org.openqa.selenium.WebElement;
+import org.openqa.selenium.support.ui.WebDriverWait;
+import org.openqa.selenium.JavascriptExecutor;
+import org.openqa.selenium.support.ui.ExpectedConditions;
+import org.openqa.selenium.TimeoutException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import org.apache.commons.io.FileUtils;
+import java.io.File;
+import java.io.IOException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.List;
+
+import static org.junit.Assert.assertTrue;
+
+public class InterpreterModeActionsIT extends AbstractZeppelinIT {
+  private static final Logger LOG = LoggerFactory.getLogger(InterpreterModeActionsIT.class);
+
+  @Rule
+  public ErrorCollector collector = new ErrorCollector();
+  static String shiroPath;
+  static String authShiro = "[users]\n" +
+      "admin = password1, admin\n" +
+      "user1 = password2, admin\n" +
+      "user2 = password3, admin\n" +
+      "[main]\n" +
+      "sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager\n" +
+      "securityManager.sessionManager = $sessionManager\n" +
+      "securityManager.sessionManager.globalSessionTimeout = 86400000\n" +
+      "shiro.loginUrl = /api/login\n" +
+      "[roles]\n" +
+      "admin = *\n" +
+      "[urls]\n" +
+      "/api/version = anon\n" +
+      "/** = authc";
+
+  static String originalShiro = "";
+  static String interpreterOptionPath = "";
+  static String originalInterpreterOption = "";
+
+  static String cmdPsPython = "ps aux | grep 'zeppelin_ipython' | grep -v 'grep' | wc -l";
+  static String cmdPsInterpreter = "ps aux | grep 'zeppelin/interpreter/python/*' |" +
+      " sed -E '/grep|local-repo/d' | wc -l";
+
+  @BeforeClass
+  public static void startUp() {
+    try {
+      System.setProperty(ZeppelinConfiguration.ConfVars.ZEPPELIN_HOME.getVarName(), new File("../").getAbsolutePath());
+      ZeppelinConfiguration conf = ZeppelinConfiguration.create();
+      shiroPath = conf.getRelativeDir(String.format("%s/shiro.ini", conf.getConfDir()));
+      interpreterOptionPath = conf.getRelativeDir(String.format("%s/interpreter.json", conf.getConfDir()));
+      File shiroFile = new File(shiroPath);
+      if (shiroFile.exists()) {
+        originalShiro = StringUtils.join(FileUtils.readLines(shiroFile, "UTF-8"), "\n");
+      }
+      FileUtils.write(shiroFile, authShiro, "UTF-8");
+
+      File interpreterOptionFile = new File(interpreterOptionPath);
+      if (interpreterOptionFile.exists()) {
+        originalInterpreterOption = StringUtils.join(FileUtils.readLines(interpreterOptionFile, "UTF-8"), "\n");
+      }
+    } catch (IOException e) {
+      LOG.error("Error in InterpreterModeActionsIT startUp::", e);
+    }
+    ZeppelinITUtils.restartZeppelin();
+    driver = WebDriverManager.getWebDriver();
+  }
+
+  @AfterClass
+  public static void tearDown() {
+    try {
+      if (!StringUtils.isBlank(shiroPath)) {
+        File shiroFile = new File(shiroPath);
+        if (StringUtils.isBlank(originalShiro)) {
+          FileUtils.deleteQuietly(shiroFile);
+        } else {
+          FileUtils.write(shiroFile, originalShiro, "UTF-8");
+        }
+      }
+      if (!StringUtils.isBlank(interpreterOptionPath)) {
+        File interpreterOptionFile = new File(interpreterOptionPath);
+        if (StringUtils.isBlank(originalInterpreterOption)) {
+          FileUtils.deleteQuietly(interpreterOptionFile);
+        } else {
+          FileUtils.write(interpreterOptionFile, originalInterpreterOption, "UTF-8");
+        }
+      }
+    } catch (IOException e) {
+      LOG.error("Error in InterpreterModeActionsIT tearDown::", e);
+    }
+    ZeppelinITUtils.restartZeppelin();
+    driver.quit();
+  }
+
+  private void authenticationUser(String userName, String password) {
+    pollingWait(By.xpath(
+        "//div[contains(@class, 'navbar-collapse')]//li//button[contains(.,'Login')]"),
+        MAX_BROWSER_TIMEOUT_SEC).click();
+    ZeppelinITUtils.sleep(500, false);
+    pollingWait(By.xpath("//*[@id='userName']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(userName);
+    pollingWait(By.xpath("//*[@id='password']"), MAX_BROWSER_TIMEOUT_SEC).sendKeys(password);
+    pollingWait(By.xpath("//*[@id='loginModalContent']//button[contains(.,'Login')]"),
+        MAX_BROWSER_TIMEOUT_SEC).click();
+    ZeppelinITUtils.sleep(1000, false);
+  }
+
+  private void logoutUser(String userName) throws URISyntaxException {
+    ZeppelinITUtils.sleep(500, false);
+    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
+        userName + "')]")).click();
+    ZeppelinITUtils.sleep(500, false);
+    driver.findElement(By.xpath("//div[contains(@class, 'navbar-collapse')]//li[contains(.,'" +
+        userName + "')]//a[@ng-click='navbar.logout()']")).click();
+    ZeppelinITUtils.sleep(2000, false);
+    if (driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button"))
+        .isDisplayed()) {
+      driver.findElement(By.xpath("//*[@id='loginModal']//div[contains(@class, 'modal-header')]/button")).click();
+    }
+    driver.get(new URI(driver.getCurrentUrl()).resolve("/#/").toString());
+    ZeppelinITUtils.sleep(500, false);
+  }
+
+  private void setPythonParagraph(int num, String text) {
+    setTextOfParagraph(num, "%python\\n " + text);
+    runParagraph(num);
+    try {
+      waitForParagraph(num, "FINISHED");
+    } catch (TimeoutException e) {
+      waitForParagraph(num, "ERROR");
+      collector.checkThat("Exception in InterpreterModeActionsIT while setPythonParagraph",
+          "ERROR", CoreMatchers.equalTo("FINISHED"));
+    }
+  }
+
+  @Test
+  public void testGloballyAction() throws Exception {
+    try {
+      //step 1: (admin) login, set 'globally in shared' mode of python interpreter, logout
+      InterpreterModeActionsIT interpreterModeActionsIT = new InterpreterModeActionsIT();
+      interpreterModeActionsIT.authenticationUser("admin", "password1");
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
+      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
+      ZeppelinITUtils.sleep(500, false);
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
+          "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[1]/button"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'Globally')]"));
+      JavascriptExecutor jse = (JavascriptExecutor)driver;
+      jse.executeScript("window.scrollBy(0,250)", "");
+      ZeppelinITUtils.sleep(500, false);
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
+      clickAndWait(By.xpath(
+          "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      clickAndWait(By.xpath("//a[@class='navbar-brand navbar-title'][contains(@href, '#/')]"));
+      interpreterModeActionsIT.logoutUser("admin");
+      //step 2: (user1) login, create a new note, run two paragraph with 'python', check result, check process, logout
+      //paragraph: Check if the result is 'user1' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
+      interpreterModeActionsIT.authenticationUser("user1", "password2");
+      By locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebElement element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String user1noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      waitForParagraph(1, "READY");
+      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user1\"");
+      waitForParagraph(2, "READY");
+      interpreterModeActionsIT.setPythonParagraph(2, "print user");
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("user1"));
+      String resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
+
+      interpreterModeActionsIT.logoutUser("user1");
+
+      //step 3: (user2) login, create a new note, run two paragraph with 'python', check result, check process, logout
+      //paragraph: Check if the result is 'user2' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
+      interpreterModeActionsIT.authenticationUser("user2", "password3");
+      locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      waitForParagraph(1, "READY");
+      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user2\"");
+      waitForParagraph(2, "READY");
+      interpreterModeActionsIT.setPythonParagraph(2, "print user");
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("user2"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      interpreterModeActionsIT.logoutUser("user2");
+
+      //step 4: (user1) login, come back note user1 made, run second paragraph, check result, check process,
+      //restart python interpreter, check process again, logout
+      //paragraph: Check if the result is 'user2' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
+      interpreterModeActionsIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      waitForParagraph(2, "FINISHED");
+      runParagraph(2);
+      try {
+        waitForParagraph(2, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(2, "ERROR");
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
+
+      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart python interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not testGloballyAction");
+      boolean invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      if (invisibilityStatus == false) {
+        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
+      }
+      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      }
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      interpreterModeActionsIT.logoutUser("user1");
+    } catch (Exception e) {
+      handleException("Exception in InterpreterModeActionsIT while testGloballyAction ", e);
+    }
+  }
+
+  @Test
+  public void testPerUserScopedAction() throws Exception {
+    try {
+      //step 1: (admin) login, set 'Per user in scoped' mode of python interpreter, logout
+      InterpreterModeActionsIT interpreterModeActionsIT = new InterpreterModeActionsIT();
+      interpreterModeActionsIT.authenticationUser("admin", "password1");
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+
+      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
+      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
+      ZeppelinITUtils.sleep(500, false);
+
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
+          "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[1]/button"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'Per User')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[2]/button"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'scoped per user')]"));
+
+      JavascriptExecutor jse = (JavascriptExecutor)driver;
+      jse.executeScript("window.scrollBy(0,250)", "");
+      ZeppelinITUtils.sleep(500, false);
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
+      clickAndWait(By.xpath(
+          "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      clickAndWait(By.xpath("//a[@class='navbar-brand navbar-title'][contains(@href, '#/')]"));
+
+      interpreterModeActionsIT.logoutUser("admin");
+
+      //step 2: (user1) login, create a new note, run two paragraph with 'python', check result, check process, logout
+      //paragraph: Check if the result is 'user1' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
+      interpreterModeActionsIT.authenticationUser("user1", "password2");
+      By locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebElement element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String user1noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+
+      waitForParagraph(1, "READY");
+      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user1\"");
+      waitForParagraph(2, "READY");
+      interpreterModeActionsIT.setPythonParagraph(2, "print user");
+
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("user1"));
+
+      String resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      interpreterModeActionsIT.logoutUser("user1");
+
+      //step 3: (user2) login, create a new note, run two paragraph with 'python', check result, check process, logout
+      //                paragraph: Check if the result is 'user2' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '2'
+      interpreterModeActionsIT.authenticationUser("user2", "password3");
+      locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String user2noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      waitForParagraph(1, "READY");
+      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user2\"");
+      waitForParagraph(2, "READY");
+      interpreterModeActionsIT.setPythonParagraph(2, "print user");
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("user2"));
+
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      interpreterModeActionsIT.logoutUser("user2");
+
+      //step 4: (user1) login, come back note user1 made, run second paragraph, check result,
+      //                restart python interpreter in note, check process again, logout
+      //paragraph: Check if the result is 'user1' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
+      interpreterModeActionsIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      runParagraph(2);
+      try {
+        waitForParagraph(2, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(2, "ERROR");
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("user1"));
+
+      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart python interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
+      boolean invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      if (invisibilityStatus == false) {
+        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
+      }
+      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      }
+
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      interpreterModeActionsIT.logoutUser("user1");
+
+      //step 5: (user2) login, come back note user2 made, restart python interpreter in note, check process, logout
+      //System: Check if the number of python interpreter process is '0'
+      //System: Check if the number of python process is '0'
+      interpreterModeActionsIT.authenticationUser("user2", "password3");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart python interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
+      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      if (invisibilityStatus == false) {
+        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
+      }
+      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      }
+
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      interpreterModeActionsIT.logoutUser("user2");
+
+      //step 6: (user1) login, come back note user1 made, run first paragraph,logout
+      //        (user2) login, come back note user2 made, run first paragraph, check process, logout
+      //System: Check if the number of python process is '2'
+      //System: Check if the number of python interpreter process is '1'
+      interpreterModeActionsIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      waitForParagraph(1, "FINISHED");
+      runParagraph(1);
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+      interpreterModeActionsIT.logoutUser("user1");
+
+      interpreterModeActionsIT.authenticationUser("user2", "password3");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      runParagraph(1);
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      interpreterModeActionsIT.logoutUser("user2");
+
+      //step 7: (admin) login, restart python interpreter in interpreter tab, check process, logout
+      //System: Check if the number of python interpreter process is 0
+      //System: Check if the number of python process is 0
+      interpreterModeActionsIT.authenticationUser("admin", "password1");
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+
+      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
+      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
+      ZeppelinITUtils.sleep(500, false);
+
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]" +
+          "//button[contains(@ng-click, 'restartInterpreterSetting(setting.id)')]"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart this interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserScopedAction");
+      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      if (invisibilityStatus == false) {
+        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
+      }
+
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
+
+      interpreterModeActionsIT.logoutUser("admin");
+
+    } catch (Exception e) {
+      handleException("Exception in InterpreterModeActionsIT while testPerUserScopedAction ", e);
+    }
+  }
+
+  @Test
+  public void testPerUserIsolatedAction() throws Exception {
+    try {
+      //step 1: (admin) login, set 'Per user in isolated' mode of python interpreter, logout
+      InterpreterModeActionsIT interpreterModeActionsIT = new InterpreterModeActionsIT();
+      interpreterModeActionsIT.authenticationUser("admin", "password1");
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
+      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
+      ZeppelinITUtils.sleep(500, false);
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//button[contains(@ng-click, 'valueform.$show();\n" +
+          "                  copyOriginInterpreterSettingProperties(setting.id)')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[1]/button"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'Per User')]"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]/div[2]/div/div/div[1]/span[2]/button"));
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//li/a[contains(.,'isolated per user')]"));
+      JavascriptExecutor jse = (JavascriptExecutor)driver;
+      jse.executeScript("window.scrollBy(0,250)", "");
+      ZeppelinITUtils.sleep(500, false);
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]//div/form/button[contains(@type, 'submit')]"));
+      clickAndWait(By.xpath(
+          "//div[@class='modal-dialog']//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      clickAndWait(By.xpath("//a[@class='navbar-brand navbar-title'][contains(@href, '#/')]"));
+      interpreterModeActionsIT.logoutUser("admin");
+
+      //step 2: (user1) login, create a new note, run two paragraph with 'python', check result, check process, logout
+      //paragraph: Check if the result is 'user1' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
+      interpreterModeActionsIT.authenticationUser("user1", "password2");
+      By locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      WebElement element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String user1noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      waitForParagraph(1, "READY");
+      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user1\"");
+      waitForParagraph(2, "READY");
+      interpreterModeActionsIT.setPythonParagraph(2, "print user");
+
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("user1"));
+
+      String resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      interpreterModeActionsIT.logoutUser("user1");
+
+      //step 3: (user2) login, create a new note, run two paragraph with 'python', check result, check process, logout
+      //                paragraph: Check if the result is 'user2' in the second paragraph
+      //System: Check if the number of python interpreter process is '2'
+      //System: Check if the number of python process is '2'
+      interpreterModeActionsIT.authenticationUser("user2", "password3");
+      locator = By.xpath("//div[contains(@class, 'col-md-4')]/div/h5/a[contains(.,'Create new" +
+          " note')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        createNewNote();
+      }
+      String user2noteId = driver.getCurrentUrl().substring(driver.getCurrentUrl().lastIndexOf("/") + 1);
+      waitForParagraph(1, "READY");
+      interpreterModeActionsIT.setPythonParagraph(1, "user=\"user2\"");
+      waitForParagraph(2, "READY");
+      interpreterModeActionsIT.setPythonParagraph(2, "print user");
+
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("user2"));
+
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("2"));
+      interpreterModeActionsIT.logoutUser("user2");
+
+      //step 4: (user1) login, come back note user1 made, run second paragraph, check result,
+      //                restart python interpreter in note, check process again, logout
+      //paragraph: Check if the result is 'user1' in the second paragraph
+      //System: Check if the number of python interpreter process is '1'
+      //System: Check if the number of python process is '1'
+      interpreterModeActionsIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      runParagraph(2);
+      try {
+        waitForParagraph(2, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(2, "ERROR");
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+      collector.checkThat("The output field paragraph contains",
+          driver.findElement(By.xpath(
+              getParagraphXPath(2) + "//div[contains(@class, 'text plainTextContent')]")).getText(),
+          CoreMatchers.equalTo("user1"));
+
+      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart python interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
+      boolean invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      if (invisibilityStatus == false) {
+        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
+      }
+      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      }
+
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("1"));
+      interpreterModeActionsIT.logoutUser("user1");
+
+      //step 5: (user2) login, come back note user2 made, restart python interpreter in note, check process, logout
+      //System: Check if the number of python interpreter process is '0'
+      //System: Check if the number of python process is '0'
+      interpreterModeActionsIT.authenticationUser("user2", "password3");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      clickAndWait(By.xpath("//div[@data-ng-repeat='item in interpreterBindings' and contains(., 'python')]//a"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart python interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
+      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      if (invisibilityStatus == false) {
+        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
+      }
+      locator = By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        clickAndWait(By.xpath("//*[@id='actionbar']//span[contains(@uib-tooltip, 'Interpreter binding')]"));
+      }
+
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      interpreterModeActionsIT.logoutUser("user2");
+
+      //step 6: (user1) login, come back note user1 made, run first paragraph,logout
+      //        (user2) login, come back note user2 made, run first paragraph, check process, logout
+      //System: Check if the number of python process is '2'
+      //System: Check if the number of python interpreter process is '2'
+      interpreterModeActionsIT.authenticationUser("user1", "password2");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user1noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      waitForParagraph(1, "FINISHED");
+      runParagraph(1);
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+      interpreterModeActionsIT.logoutUser("user1");
+
+      interpreterModeActionsIT.authenticationUser("user2", "password3");
+      locator = By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]");
+      element = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.visibilityOfElementLocated(locator));
+      if (element.isDisplayed()) {
+        pollingWait(By.xpath("//*[@id='notebook-names']//a[contains(@href, '" + user2noteId + "')]"),
+            MAX_BROWSER_TIMEOUT_SEC).click();
+      }
+      runParagraph(1);
+      try {
+        waitForParagraph(1, "FINISHED");
+      } catch (TimeoutException e) {
+        waitForParagraph(1, "ERROR");
+        collector.checkThat("Exception in InterpreterModeActionsIT while running Python Paragraph",
+            "ERROR", CoreMatchers.equalTo("FINISHED"));
+      }
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("2"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("2"));
+      interpreterModeActionsIT.logoutUser("user2");
+
+      //step 7: (admin) login, restart python interpreter in interpreter tab, check process, logout
+      //System: Check if the number of python interpreter process is 0
+      //System: Check if the number of python process is 0
+      interpreterModeActionsIT.authenticationUser("admin", "password1");
+      pollingWait(By.xpath("//div/button[contains(@class, 'nav-btn dropdown-toggle ng-scope')]"),
+          MAX_BROWSER_TIMEOUT_SEC).click();
+
+      clickAndWait(By.xpath("//li/a[contains(@href, '#/interpreter')]"));
+      pollingWait(By.xpath("//input[contains(@ng-model, 'searchInterpreter')]"),
+          MAX_BROWSER_TIMEOUT_SEC).sendKeys("python");
+      ZeppelinITUtils.sleep(500, false);
+
+      clickAndWait(By.xpath("//div[contains(@id, 'python')]" +
+          "//button[contains(@ng-click, 'restartInterpreterSetting(setting.id)')]"));
+      clickAndWait(By.xpath("//div[@class='modal-dialog']" +
+          "[contains(.,'Do you want to restart this interpreter?')]" +
+          "//div[@class='bootstrap-dialog-footer-buttons']//button[contains(., 'OK')]"));
+      locator = By.xpath("//div[@class='modal-dialog'][contains(.,'Do you want to restart python interpreter?')]");
+      LOG.info("Holding on until if interpreter restart dialog is disappeared or not in testPerUserIsolatedAction");
+      invisibilityStatus = (new WebDriverWait(driver, MAX_BROWSER_TIMEOUT_SEC))
+          .until(ExpectedConditions.invisibilityOfElementLocated(locator));
+      if (invisibilityStatus == false) {
+        assertTrue("interpreter setting dialog visibility status", invisibilityStatus);
+      }
+
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsPython,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      resultProcessNum = (String) CommandExecutor.executeCommandLocalHost(cmdPsInterpreter,
+          false, ProcessData.Types_Of_Data.OUTPUT);
+      resultProcessNum = resultProcessNum.trim().replaceAll("\n", "");
+      collector.checkThat("The number of python interpreter process is", resultProcessNum, CoreMatchers.equalTo("0"));
+      interpreterModeActionsIT.logoutUser("admin");
+    } catch (Exception e) {
+      handleException("Exception in InterpreterModeActionsIT while testPerUserIsolatedAction ", e);
+    }
+  }
+}