You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by ku...@apache.org on 2017/07/14 01:52:08 UTC

zeppelin git commit: [ZEPPELIN-2342] Improving Test Environment for zeppelin-web (e2e, coverage)

Repository: zeppelin
Updated Branches:
  refs/heads/master a7dd914b5 -> d5b8a43c7


[ZEPPELIN-2342] Improving Test Environment for zeppelin-web (e2e, coverage)

### What is this PR for?

Improved testing environment for zeppelin-web

- added `test:watch` command for continuous testing
- displaying coverage report in console
- e2e testing in zeppelin-web (can be written easily compare to the zeppelin-server integration tests. For example: [home.spec.js](https://github.com/1ambda/zeppelin/blob/f90deb4bf3db57e36232c9c94ae3b07dfd7c2331/zeppelin-web/e2e/home.spec.js))

This PR adds [a zeppelin-web specific travis profile](https://github.com/1ambda/zeppelin/blob/ad08a3bc0da420f7a7b4771d1aee8bfdd962efa7/.travis.yml#L55) and it usually takes 8-9 mins to execute unit + e2e tests (zeppelin-web)

- https://travis-ci.org/1ambda/zeppelin/jobs/252453901

#### Details

- the headless chrome browser works with chromedriver 2.29+ (https://chromium.googlesource.com/chromium/src/+/c75dbfd25cc376b92a494d340259056a01e1432e)
- in the case of ubuntu precise (our travis container), should use `/usr/bin/chromium-browser`
- `xvfb` is required, please refer https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI and https://iamakulov.com/notes/install-google-chrome-on-travis/#what-does-the-code-mean
- for protractor conf, please check https://github.com/travis-ci/travis-ci/issues/7650#issuecomment-302467188
- can't install stable version of chrome, precise (12.04) support was dropped by chrome
- chromium-browser (37.0) is shipped by default in precise and chromedriver version 2.11 is compatible with it. (https://support.saucelabs.com/hc/en-us/articles/225095307-Chromedriver-version-for-each-Chrome-browser-version, https://github.com/travis-ci/travis-ci/issues/5899)

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

### Todos
* [x] - `test:watch`
* [x] - displaying coverage reports in console
* [x] - e2e testing in zeppelin-web

### What is the Jira issue?

[ZEPPELIN-2342](https://issues.apache.org/jira/browse/ZEPPELIN-2342)

### How should this be tested?

CI should be green. If you want to test locally,

- stop zeppelin which is running on localhost:8080
- `mvn package -DskipTests -DskipRat -Pweb-ci -B`
- `mvn verify -DskipRat -pl 'zeppelin-web' -Pweb-ci -Pweb-e2e -B`

#### Screenshots (coverage)

![image](https://user-images.githubusercontent.com/4968473/28031333-dc700c3a-65e1-11e7-96ca-582a9ffa97dd.png)

#### Screenshots (e2e)

![image](https://user-images.githubusercontent.com/4968473/28032319-0e8b5adc-65e5-11e7-81ba-4e33c5f15bc0.png)

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - YES, updated

Author: 1ambda <1a...@gmail.com>

Closes #2477 from 1ambda/ZEPPELIN-2342/differentiate-unit-and-integration-testing and squashes the following commits:

ad08a3bc [1ambda] fix: Restore all other pfoeils
b6ff6d91 [1ambda] fix: Use 2.30
832cffb6 [1ambda] fix: Use 2.27 for chrome driver
4d82f03f [1ambda] fix: use 2.30 chromedriver
93cc90b8 [1ambda] fix: run unit test only when web-e2e enabled
0911afbe [1ambda] fix: Update chromedriver version
893f67ee [1ambda] fix: Set ignoreSync false for angular app
9b91ae28 [1ambda] fix: restore all other profiles
dd300c24 [1ambda] fix: split if
a5deed0d [1ambda] fix: Run xvf ni foreground
8d1ab5bc [1ambda] fix: Remove sleep 3s
9a81fa19 [1ambda] fix: Add space between & and ;
e924e760 [1ambda] fix: pass test, use 2 dists
58cfb238 [1ambda] fix: test 2 dist
0dc0304a [1ambda] fix: Use trusty for the second profile2
bf62085e [1ambda] fix: Remove version
61a7f9ee [1ambda] fix: DO NOT USE CHROME_BIN
8926cd80 [1ambda] fix: use 2.11
9c20a447 [1ambda] fix: print chrome version
f961a90f [1ambda] use before_install
9ed1e12b [1ambda] set info for test
efc831c1 [1ambda] fix: remove headless
db016a31 [1ambda] fix: use headless chrome in local
481528f4 [1ambda] fix: use precise
5a096da1 [1ambda] fix: use chromium-browser
fcfa9c09 [1ambda] fix: required
282c83ec [1ambda] fix: use beta
5a0d1118 [1ambda] fix: use trusty
93fb571c [1ambda] fix: ls usr bin
aff874f8 [1ambda] fix: use no-sandbox for sudo false contrainer
7d454a57 [1ambda] fix: Run xvfb in background
23e5670f [1ambda] fix: use beta chrome
3e9f494f [1ambda] fix: Use /usr/bin/chrome
55faa0e0 [1ambda] fix: Use google-chrome-stale
7da9845c [1ambda] WIP: Remove all other profiles
a45f131c [1ambda] WIP: pass all tests
628ff341 [1ambda] fix: Set chromedriver version
763f3e26 [1ambda] fix: Set env
94506681 [1ambda] fix: redirect dbus into null
bcac8a4a [1ambda] fix: Remove sandbox
facf4c1c [1ambda] fix: Remove -X
20a8cfd7 [1ambda] fix: use no-sandbox
0662f928 [1ambda] fix: Set -X for web
fc9d31f5 [1ambda] fix: Use CHROME_BIN2
4acb8e22 [1ambda] fix: Use CHROME_BIN
46994918 [1ambda] fix: Set info for e2e
905e6ad6 [1ambda] fix: Install chrome from source
7f5abfdf [1ambda] fix: before_start
1f345aea [1ambda] fix: use headless
dd115c39 [1ambda] fix: use direct connect
7d53d51f [1ambda] fix Remove chrome option
eb9f0e8d [1ambda] fix: Set direct connect false
7c69f7a1 [1ambda] fix: Set chromeOnly for protractor
d5e62e76 [1ambda] fix: Set chrome driver version https://github.com/angular/angular-cli/issues/2176\#issuecomment-253496181
f94a665f [1ambda] fix: Modify timeout for protractor
35b6fb16 [1ambda] WIP: Remove -X option to second  job
5189807b [1ambda] chore: Add TEST_MODULES in travis.yml
e354b1b1 [1ambda] chore: DO NOT rebuild web when e2e enabled
b6d730fc [1ambda] fix: echo commandsin travis.yml
6907c50d [1ambda] chore: Ingmore except web in test build
9f13d611 [1ambda] chore: Use usual test build command
4ef0a2c2 [1ambda] chore: Remove useless mvn setting
26ef7087 [1ambda] fix: use prebuilt phantom
f90deb4b [1ambda] chore: Move web e2e into zeppelin-web
40ac076e [1ambda] chore: New profile for e2e test only
7703615b [1ambda] WIP: Add -X to the second travis profile
0c2c1ecb [1ambda] chore: Add web-e2e profile to mvn
ca2b1703 [1ambda] WIP: add -e mvn option to the second profile
0c09727e [1ambda] fix: Remove -X option from selenium profile
0907d728 [1ambda] chore: Ingnore protractor conf in RAT
2ed39733 [1ambda] fix: set gecko false for webdriver manager. See https://github.com/angular/webdriver-manager/issues/216
eb447ef8 [1ambda] WIP: add -X log to selenium profioe
742bb961 [1ambda] chore: Exclude e2e specs from RAT
b5a17a4b [1ambda] chore: Bind browser e2e test into CI process
76f4f584 [1ambda] docs: Update test section in zeppelin-web/README.md
15473de6 [1ambda] test: Add a basic e2e test for home
39dc77e4 [1ambda] chore: Add test:watch command
e70281ba [1ambda] feat: Use spec repoter and coverage


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

Branch: refs/heads/master
Commit: d5b8a43c7cf19432b0a7d9c8a9029546de333360
Parents: a7dd914
Author: 1ambda <1a...@gmail.com>
Authored: Wed Jul 12 00:30:48 2017 +0900
Committer: 1ambda <1a...@gmail.com>
Committed: Fri Jul 14 10:51:48 2017 +0900

----------------------------------------------------------------------
 .travis.yml                     | 24 +++++++++++-
 pom.xml                         |  8 ++++
 zeppelin-server/pom.xml         |  1 +
 zeppelin-web/README.md          | 34 +++++++++++------
 zeppelin-web/e2e/home.spec.js   | 18 +++++++++
 zeppelin-web/karma.conf.js      | 29 +++++----------
 zeppelin-web/package.json       | 12 +++++-
 zeppelin-web/pom.xml            | 71 ++++++++++++++++++++++++++++++++----
 zeppelin-web/protractor.conf.js | 44 ++++++++++++++++++++++
 zeppelin-web/webpack.config.js  | 10 ++++-
 10 files changed, 208 insertions(+), 43 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d5b8a43c/.travis.yml
----------------------------------------------------------------------
diff --git a/.travis.yml b/.travis.yml
index 5a728f7..219d555 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -45,8 +45,23 @@ matrix:
     - jdk: "oraclejdk7"
       env: SCALA_VER="2.11" SPARK_VER="2.0.2" HADOOP_VER="2.6" PROFILE="-Prat" BUILD_FLAG="clean" TEST_FLAG="org.apache.rat:apache-rat-plugin:check" TEST_PROJECTS=""
 
+    # Run e2e tests (in zeppelin-web)
+    # chrome dropped the support for precise (ubuntu 12.04), so need to use trusty
+    # also, can't use JDK 7 in trusty: https://github.com/travis-ci/travis-ci/issues/7884
+    - os: linux
+      sudo: false
+      dist: trusty
+      jdk: "oraclejdk8"
+      env: WEB_E2E="true" SCALA_VER="2.11" SPARK_VER="2.1.0" HADOOP_VER="2.6" PROFILE="-Pweb-ci -Pscala-2.11" BUILD_FLAG="package -DskipTests -DskipRat" TEST_FLAG="verify -DskipRat" MODULES="-pl ${INTERPRETERS}" TEST_MODULES="-pl zeppelin-web" TEST_PROJECTS="-Pweb-e2e"
+      addons:
+        apt:
+          sources:
+          - r-packages-trusty
+          packages:
+          - google-chrome-stable
+          - r-base-dev
+
     # Test core modules
-    #
     # Several tests were excluded from this configuration due to the following issues:
     # HeliumApplicationFactoryTest - https://issues.apache.org/jira/browse/ZEPPELIN-2470
     # After issues are fixed these tests need to be included back by removing them from the "-Dtests.to.exclude" property
@@ -105,6 +120,7 @@ before_install:
   - source ~/.environ
 
 install:
+  - echo "mvn $BUILD_FLAG $MODULES $PROFILE -B"
   - mvn $BUILD_FLAG $MODULES $PROFILE -B
 
 before_script:
@@ -115,8 +131,14 @@ before_script:
   - echo "export SPARK_HOME=`pwd`/spark-$SPARK_VER-bin-hadoop$HADOOP_VER" > conf/zeppelin-env.sh
   - echo "export ZEPPELIN_HELIUM_REGISTRY=helium" >> conf/zeppelin-env.sh
   - tail conf/zeppelin-env.sh
+  # https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
+  - if [[ -n $TEST_MODULES ]]; then export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3; fi
+  # display info log for debugging
+  - if [[ -n $TEST_MODULES ]]; then echo "MAVEN_OPTS='-Xms1024M -Xmx2048M -XX:MaxPermSize=1024m -XX:-UseGCOverheadLimit -Dorg.slf4j.simpleLogger.defaultLogLevel=info'" > ~/.mavenrc; fi
 
 script:
+  - if [[ -n $TEST_MODULES ]]; then export MODULES="${TEST_MODULES}"; fi
+  - echo "mvn $TEST_FLAG $MODULES $PROFILE -B $TEST_PROJECTS"
   - mvn $TEST_FLAG $MODULES $PROFILE -B $TEST_PROJECTS
 
 after_success:

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d5b8a43c/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 182b508..31a1575 100644
--- a/pom.xml
+++ b/pom.xml
@@ -89,6 +89,12 @@
     <scalatest.version>2.2.4</scalatest.version>
     <scalacheck.version>1.12.5</scalacheck.version>
 
+    <!-- frontend maven plugin related versions-->
+    <node.version>v6.9.1</node.version>
+    <yarn.version>v0.18.1</yarn.version>
+    <npm.version>4.2.0</npm.version>
+    <plugin.frontned.version>1.3</plugin.frontned.version>
+
     <!-- common library versions -->
     <slf4j.version>1.7.10</slf4j.version>
     <log4j.version>1.2.17</log4j.version>
@@ -984,6 +990,7 @@
               <exclude>**/.bowerrc</exclude>
               <exclude>.editorconfig</exclude>
               <exclude>.eslintrc</exclude>
+              <exclude>protractor.conf.js</exclude>
               <exclude>**/.tmp/**</exclude>
               <exclude>**/target/**</exclude>
               <exclude>**/node/**</exclude>
@@ -1007,6 +1014,7 @@
               <exclude>**/src/fonts/Source-Code-Pro*</exclude>
               <exclude>**/src/fonts/source-code-pro*</exclude>
               <exclude>**/src/**/**.test.js</exclude>
+              <exclude>**/e2e/**/**.spec.js</exclude>
 
               <!-- from SQLLine 1.0.2, see ZEPPELIN-2135 -->
               <exclude>**/src/main/java/org/apache/zeppelin/jdbc/SqlCompleter.java</exclude>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d5b8a43c/zeppelin-server/pom.xml
----------------------------------------------------------------------
diff --git a/zeppelin-server/pom.xml b/zeppelin-server/pom.xml
index 295f6eb..07eaab0 100644
--- a/zeppelin-server/pom.xml
+++ b/zeppelin-server/pom.xml
@@ -33,6 +33,7 @@
   <name>Zeppelin: Server</name>
 
   <properties>
+
     <!--library versions-->
     <commons.httpclient.version>4.3.6</commons.httpclient.version>
     <jersey.version>2.22.2</jersey.version>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d5b8a43c/zeppelin-web/README.md
----------------------------------------------------------------------
diff --git a/zeppelin-web/README.md b/zeppelin-web/README.md
index 508a97b..0194bd7 100644
--- a/zeppelin-web/README.md
+++ b/zeppelin-web/README.md
@@ -4,15 +4,6 @@ This is Zeppelin's frontend project.
 
 ## Development Guide 
 
-### Packaging 
-
-If you want to package the zeppelin-web only, simply run this command in this folder.  
-This will download all the dependencies including node (the binaries in the folder `zeppelin-web/node`)
-
-```
-$ mvn package 
-```
-
 ### Local Development
 
 It is recommended to install node 6.0.0+ since Zeppelin uses 6.9.1+ (see [creationix/nvm](https://github.com/creationix/nvm))
@@ -30,10 +21,8 @@ $ yarn run build
 # run frontend application only in dev mode (localhost:9000) 
 # you need to run zeppelin backend instance also
 $ yarn run dev
-
-# execute tests
-$ yarn run test
 ```
+
 Supports the following options with using npm environment variable when running the web development mode.
 
 ```
@@ -44,7 +33,28 @@ $ SERVER_PORT=YOUR_ZEPPELIN_PORT yarn run dev
 # if you want to use a web dev port instead of default(9000), 
 # you can use the 'WEB_PORT' variable
 $ WEB_PORT=YOUR_WEB_DEV_PORT yarn run dev
+```
+
+### Testing
 
+```sh
+# running unit tests
+$ yarn run test
+
+# running e2e tests: make sure that zeppelin instance started (localhost:8080)
+$ yarn run e2e
+```
+
+- to write unit tests, please refer [Angular Test Patterns](https://github.com/daniellmb/angular-test-patterns)
+- to write e2e tests, please refer [Protractor Tutorial](http://www.protractortest.org/#/tutorial#step-1-interacting-with-elements)
+
+### Packaging 
+
+If you want to package the zeppelin-web only, simply run this command in this folder.  
+This will download all the dependencies including node (the binaries in the folder `zeppelin-web/node`)
+
+```
+$ mvn package 
 ```
 
 ## Troubleshooting

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d5b8a43c/zeppelin-web/e2e/home.spec.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/e2e/home.spec.js b/zeppelin-web/e2e/home.spec.js
new file mode 100644
index 0000000..a15cf75
--- /dev/null
+++ b/zeppelin-web/e2e/home.spec.js
@@ -0,0 +1,18 @@
+describe('Home e2e Test', function() {
+  it('should have a welcome message', function() {
+    browser.get('http://localhost:8080');
+    var weblcomeElem = element(by.id('welcome'))
+
+    expect(weblcomeElem.getText()).toEqual('Welcome to Zeppelin!')
+  })
+
+  it('should have the button for importing notebook', function() {
+    var btn = element(by.cssContainingText('a', 'Import note'))
+    expect(btn.isPresent()).toBe(true)
+  })
+
+  it('should have the button for creating notebook', function() {
+    var btn = element(by.cssContainingText('a', 'Create new note'))
+    expect(btn.isPresent()).toBe(true)
+  })
+})

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d5b8a43c/zeppelin-web/karma.conf.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/karma.conf.js b/zeppelin-web/karma.conf.js
index 58cf6bc..1c79346 100644
--- a/zeppelin-web/karma.conf.js
+++ b/zeppelin-web/karma.conf.js
@@ -90,8 +90,7 @@ module.exports = function(config) {
       // endbower
 
       'src/index.js',
-      // 'test/spec/**/*.js',
-      {pattern: 'src/**/*.test.js', watched: false},
+      { pattern: 'src/**/*.test.js', watched: false },
     ],
 
     // list of files / patterns to exclude
@@ -110,11 +109,9 @@ module.exports = function(config) {
     // - Safari (only Mac)
     // - PhantomJS
     // - IE (only Windows)
-    browsers: [
-      'PhantomJS'
-    ],
+    browsers: [ 'PhantomJS' ],
 
-    reporters: ['coverage','progress'],
+    reporters: ['spec', 'coverage'],
 
     webpack: webpackConfig,
     webpackMiddleware: {
@@ -122,25 +119,17 @@ module.exports = function(config) {
     },
 
     preprocessors: {
-      'src/*/{*.js,!(test)/**/*.js}': 'coverage',
-      'src/**/*.js': ['webpack', 'sourcemap',],
+      'src/**/*.js': ['webpack', 'sourcemap'],
     },
 
     coverageReporter: {
-      type: 'html',
-      dir: './reports/zeppelin-web-coverage',
-      subdir: '.'
+      dir: 'reports/coverage',
+      reporters: [
+        { type: 'html' },
+        { type: 'text-summary' },
+      ]
     },
 
-    // Which plugins to enable
-    plugins: [
-      'karma-phantomjs-launcher',
-      'karma-jasmine',
-      'karma-coverage',
-      'karma-webpack',
-      'karma-sourcemap-loader',
-    ],
-
     // Continuous Integration mode
     // if true, it capture browsers, run tests and exit
     singleRun: true,

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d5b8a43c/zeppelin-web/package.json
----------------------------------------------------------------------
diff --git a/zeppelin-web/package.json b/zeppelin-web/package.json
index 3d0f391..d44bbcd 100644
--- a/zeppelin-web/package.json
+++ b/zeppelin-web/package.json
@@ -18,12 +18,16 @@
     "dev:helium": "HELIUM_BUNDLE_DEV=true webpack-dev-server --hot",
     "dev:watch": "grunt watch-webpack-dev",
     "dev": "npm-run-all --parallel dev:server lint:watch dev:watch",
+    "test:watch": "karma start karma.conf.js --single-run=false",
+    "pree2e": "webdriver-manager update --gecko false --versions.chrome=2.30",
+    "e2e": "protractor protractor.conf.js",
+    "pretest": "npm rebuild phantomjs-prebuilt",
     "test": "karma start karma.conf.js"
   },
   "dependencies": {
+    "angular-ui-grid": "^4.0.4",
     "angular-viewport-watch": "github:shahata/angular-viewport-watch",
     "github-markdown-css": "2.6.0",
-    "angular-ui-grid": "^4.0.4",
     "grunt-angular-templates": "^0.5.7",
     "grunt-dom-munger": "^3.4.0",
     "headroom.js": "^0.9.3",
@@ -72,17 +76,21 @@
     "grunt-wiredep": "~2.0.0",
     "html-webpack-plugin": "^2.24.1",
     "imports-loader": "^0.7.1",
+    "istanbul-instrumenter-loader": "^0.2.0",
     "jasmine-core": "^2.5.2",
+    "jasmine-spec-reporter": "^4.1.1",
     "karma": "~1.3.0",
     "karma-coverage": "^1.1.1",
     "karma-jasmine": "~1.0.2",
-    "karma-sourcemap-loader": "^0.3.7",
     "karma-phantomjs-launcher": "^1.0.4",
+    "karma-sourcemap-loader": "^0.3.7",
+    "karma-spec-reporter": "0.0.31",
     "karma-webpack": "^1.8.1",
     "load-grunt-tasks": "^0.4.0",
     "ng-annotate-loader": "^0.2.0",
     "npm-run-all": "^3.1.2",
     "postcss-loader": "^1.2.1",
+    "protractor": "^5.1.2",
     "raw-loader": "^0.5.1",
     "rimraf": "^2.5.4",
     "string-replace-webpack-plugin": "^0.1.3",

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d5b8a43c/zeppelin-web/pom.xml
----------------------------------------------------------------------
diff --git a/zeppelin-web/pom.xml b/zeppelin-web/pom.xml
index d529930..1bfd0b9 100644
--- a/zeppelin-web/pom.xml
+++ b/zeppelin-web/pom.xml
@@ -38,13 +38,10 @@
   </prerequisites>
 
   <properties>
-    <node.version>v6.9.1</node.version>
-    <yarn.version>v0.18.1</yarn.version>
-    <npm.version>4.2.0</npm.version>
+    <web.e2e.disabled>true</web.e2e.disabled>
+    <web.e2e.enabled>false</web.e2e.enabled>
+    <zeppelin.daemon.package.base>../bin</zeppelin.daemon.package.base>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
-
-    <!--plugin versions-->
-    <plugin.frontned.version>1.3</plugin.frontned.version>
   </properties>
 
   <build>
@@ -83,6 +80,7 @@
               <goal>yarn</goal>
             </goals>
             <configuration>
+              <skip>${web.e2e.enabled}</skip>
               <arguments>install --no-lockfile</arguments>
             </configuration>
           </execution>
@@ -93,6 +91,7 @@
               <goal>yarn</goal>
             </goals>
             <configuration>
+              <skip>${web.e2e.enabled}</skip>
               <arguments>${web.build.command}</arguments>
             </configuration>
           </execution>
@@ -104,10 +103,61 @@
             </goals>
             <phase>test</phase>
             <configuration>
+              <skip>${web.e2e.disabled}</skip>
               <arguments>run test</arguments>
             </configuration>
           </execution>
 
+            <execution>
+              <id>yarn e2e</id>
+              <goals>
+                <goal>yarn</goal>
+              </goals>
+              <phase>integration-test</phase>
+              <configuration>
+                <skip>${web.e2e.disabled}</skip>
+                <arguments>run e2e</arguments>
+              </configuration>
+            </execution>
+
+        </executions>
+      </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>
+              <skip>${web.e2e.disabled}</skip>
+              <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>
+              <skip>${web.e2e.disabled}</skip>
+              <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>
 
@@ -170,7 +220,14 @@
         <web.build.command>run build:ci</web.build.command>
       </properties>
     </profile>
-  </profiles>
 
+    <profile>
+      <id>web-e2e</id>
+      <properties>
+        <web.e2e.disabled>false</web.e2e.disabled>
+        <web.e2e.enabled>true</web.e2e.enabled>
+      </properties>
+    </profile>
+  </profiles>
 
 </project>

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d5b8a43c/zeppelin-web/protractor.conf.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/protractor.conf.js b/zeppelin-web/protractor.conf.js
new file mode 100644
index 0000000..042ed34
--- /dev/null
+++ b/zeppelin-web/protractor.conf.js
@@ -0,0 +1,44 @@
+var baseConfig = {
+  baseUrl: 'http://localhost:8080/',
+  directConnect: true,
+  capabilities: {
+    browserName: 'chrome',
+  },
+  allScriptsTimeout: 300000, // 5 min
+
+  framework: 'jasmine',
+  specs: ['e2e/**/*.js'],
+  jasmineNodeOpts: {
+    showTiming: true,
+    showColors: true,
+    isVerbose: true,
+    includeStackTrace: false,
+    defaultTimeoutInterval: 300000, // 5 min
+    print: function() {}, // remove protractor dot reporter, we are using jasmine-spec-reporter
+  },
+
+  onPrepare: function() {
+    // should be false for angular apps
+    // browser.ignoreSynchronization = true;
+
+    browser.manage().timeouts().pageLoadTimeout(300000);
+    // with the implicitlyWait() this will even though you expect the element not to be there
+    browser.manage().timeouts().implicitlyWait(30000);
+
+    // add reporter to display executed tests in console
+    var SpecReporter = require('jasmine-spec-reporter').SpecReporter;
+    jasmine.getEnv().addReporter(new SpecReporter({
+      spec: {
+        displayStacktrace: true
+      }
+    }));
+  },
+};
+
+var chromeOptions = {
+  args: ['--disable-gpu', '--no-sandbox']
+}
+
+baseConfig.capabilities.chromeOptions = chromeOptions;
+
+exports.config = baseConfig;

http://git-wip-us.apache.org/repos/asf/zeppelin/blob/d5b8a43c/zeppelin-web/webpack.config.js
----------------------------------------------------------------------
diff --git a/zeppelin-web/webpack.config.js b/zeppelin-web/webpack.config.js
index 5c2e1df..6fba4b1 100644
--- a/zeppelin-web/webpack.config.js
+++ b/zeppelin-web/webpack.config.js
@@ -195,7 +195,15 @@ module.exports = function makeWebpackConfig () {
           }
         }
       ]})
-    }]
+    }],
+    postLoaders: [
+      {
+        // COVERAGE
+        test: /\.js$/,
+        exclude: /(node_modules|bower_components|\.test\.js)/,
+        loader: 'istanbul-instrumenter'
+      }
+    ]
   };
 
   /**