GitHub user 1ambda reopened a pull request:
https://github.com/apache/zeppelin/pull/2477
[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 localhost:8080
- `mvn package -DskipTests -DskipRat -Pweb-ci -Pweb-e2e -B`
- `mvn verify -DskipRat -pl 'zeppelin-web' -Pweb-ci -Pweb-e2e -B`
#### Screenshots (coverage)

#### Screenshots (e2e)

### Questions:
* Does the licenses files need update? - NO
* Is there breaking changes for older versions? - NO
* Does this needs documentation? - YES, updated
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/1ambda/zeppelin
ZEPPELIN-2342/differentiate-unit-and-integration-testing
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/zeppelin/pull/2477.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2477
----
commit e70281bad21ea1d66b21acd6b5e33c84bfcf720f
Author: 1ambda <[email protected]>
Date: 2017-07-10T06:38:49Z
feat: Use spec repoter and coverage
commit 39dc77e4f3b9aab90c101e29a02cecf9a5696c11
Author: 1ambda <[email protected]>
Date: 2017-07-10T07:03:29Z
chore: Add test:watch command
commit 15473de6b59f8941562f1b6ae10f4c8b13dbaad2
Author: 1ambda <[email protected]>
Date: 2017-07-10T08:29:23Z
test: Add a basic e2e test for home
commit 76f4f584f4624a63edd5ec4fae09e5d44332bd41
Author: 1ambda <[email protected]>
Date: 2017-07-10T08:33:20Z
docs: Update test section in zeppelin-web/README.md
commit b5a17a4baf112e89c747d4b18fbff33f6d4a6551
Author: 1ambda <[email protected]>
Date: 2017-07-10T09:26:50Z
chore: Bind browser e2e test into CI process
commit 742bb961a2691e35084120ceca28639a13671a2f
Author: 1ambda <[email protected]>
Date: 2017-07-10T09:40:37Z
chore: Exclude e2e specs from RAT
commit eb447ef8ef199b72c0a613ecfaef60f55062a48c
Author: 1ambda <[email protected]>
Date: 2017-07-10T10:20:44Z
WIP: add -X log to selenium profioe
commit 2ed397331007e1c4863d983519a30afab958fbc8
Author: 1ambda <[email protected]>
Date: 2017-07-10T11:18:03Z
fix: set gecko false for webdriver manager. See
https://github.com/angular/webdriver-manager/issues/216
commit 0907d7286dedd83df6afb5bfc11a57b682479c7f
Author: 1ambda <[email protected]>
Date: 2017-07-10T11:18:16Z
chore: Ingnore protractor conf in RAT
commit 0c09727e95fd1216d6113b53865171466a776852
Author: 1ambda <[email protected]>
Date: 2017-07-10T12:04:17Z
fix: Remove -X option from selenium profile
commit ca2b17034cddbc398dfac7eff0474ba6d5423f8a
Author: 1ambda <[email protected]>
Date: 2017-07-10T13:07:52Z
WIP: add -e mvn option to the second profile
commit 0c2c1ecbfb4a4c304788177e7e52b95ed8c84757
Author: 1ambda <[email protected]>
Date: 2017-07-10T13:20:07Z
chore: Add web-e2e profile to mvn
commit 7703615bc41c3be40d1d9f3315c59a9e072f0760
Author: 1ambda <[email protected]>
Date: 2017-07-10T14:01:21Z
WIP: Add -X to the second travis profile
commit 40ac076ebc78f206cdaf11fe61c5fde220dbc59a
Author: 1ambda <[email protected]>
Date: 2017-07-10T16:28:54Z
chore: New profile for e2e test only
commit f90deb4bf3db57e36232c9c94ae3b07dfd7c2331
Author: 1ambda <[email protected]>
Date: 2017-07-10T16:53:11Z
chore: Move web e2e into zeppelin-web
commit 26ef708750cf1beadd2722d6e5b2b1666820a963
Author: 1ambda <[email protected]>
Date: 2017-07-10T17:40:59Z
fix: use prebuilt phantom
commit 4ef0a2c2ac1bdaef9a61932d487435308d5a6db8
Author: 1ambda <[email protected]>
Date: 2017-07-10T17:41:39Z
chore: Remove useless mvn setting
commit 9f13d611fef8f2a23e4938e6e4d293211a30b2b3
Author: 1ambda <[email protected]>
Date: 2017-07-10T18:06:52Z
chore: Use usual test build command
commit 6907c50dc90c60ecc203b140e3b09801f442d0ce
Author: 1ambda <[email protected]>
Date: 2017-07-10T18:12:42Z
chore: Ingmore except web in test build
commit b6d730fc8c8e3ae888be31a32f560bbcab79b71b
Author: 1ambda <[email protected]>
Date: 2017-07-11T01:39:08Z
fix: echo commandsin travis.yml
commit e354b1b1151b352758bd8add95e79d362590712a
Author: 1ambda <[email protected]>
Date: 2017-07-11T01:44:53Z
chore: DO NOT rebuild web when e2e enabled
commit 5189807b933ea8d41bf24eea4726d92fa38a8883
Author: 1ambda <[email protected]>
Date: 2017-07-11T01:48:58Z
chore: Add TEST_MODULES in travis.yml
commit 35b6fb1672921d6f6bedfa2eb3d90362bfc2011d
Author: 1ambda <[email protected]>
Date: 2017-07-11T02:06:52Z
WIP: Remove -X option to second job
commit f94a665f1104d58910f96a2ba3f6e7f4f5d9f32e
Author: 1ambda <[email protected]>
Date: 2017-07-11T02:21:45Z
fix: Modify timeout for protractor
commit d5e62e760b7cb2996030f349a0a7eb2942764553
Author: 1ambda <[email protected]>
Date: 2017-07-11T03:48:42Z
fix: Set chrome driver version
https://github.com/angular/angular-cli/issues/2176\#issuecomment-253496181
commit 7c69f7a181128b6f911eb76fde58c5e159f6cff1
Author: 1ambda <[email protected]>
Date: 2017-07-11T03:53:36Z
fix: Set chromeOnly for protractor
commit eb9f0e8df8569613627c8c07192ccd03bddd4c6e
Author: 1ambda <[email protected]>
Date: 2017-07-11T04:39:55Z
fix: Set direct connect false
commit 7d53d51f29a5a24774c77e81b964aed04ffcfc73
Author: 1ambda <[email protected]>
Date: 2017-07-11T04:40:39Z
fix Remove chrome option
commit dd115c3933a8349aab05028aad8eae80c78f7395
Author: 1ambda <[email protected]>
Date: 2017-07-11T04:41:30Z
fix: use direct connect
commit 1f345aea1f95152e1c375181cd49a2f8414395b1
Author: 1ambda <[email protected]>
Date: 2017-07-11T04:41:45Z
fix: use headless
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---