Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ftr] use typed chromeOptions object, adding TEST_BROWSER_BINARY_PATH #71279

Merged

Conversation

dmlemeshko
Copy link
Member

  • Since we run chrome in w3c-complient mode we can use Webdriver.chrome.Options to set capabilities for a new session
  • Adding env variable to override Chrome binary path

@dmlemeshko dmlemeshko marked this pull request as ready for review July 9, 2020 17:59
@dmlemeshko dmlemeshko requested a review from a team as a code owner July 9, 2020 17:59
@tsullivan
Copy link
Member

This is really important for Developers using Windows but working out of the WSL2 Linux subsystem. I would be able to set TEST_BROWSER_BINARY_PATH to /mnt/c/Program\ Files\ \(x86\)/Google/Chrome/Application/chrome.exe and it should work!

Without this solution, I need to have a separate installation of Chromium for the Linux subsystem.

@dmlemeshko
Copy link
Member Author

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💛 Build succeeded, but was flaky


Test Failures

Kibana Pipeline / kibana-xpack-agent / Kibana Embedded in iframe with X-Pack Security.x-pack/test/functional_embedded/tests/iframe_embedded·ts.Kibana embedded in iframe should open Kibana for logged-in user

Link to Jenkins

Standard Out

Failed Tests Reporter:
  - Test has failed 1 times on tracked branches: https://github.com/elastic/kibana/issues/70928

[00:00:00]       │
[00:00:00]         └-: Kibana embedded
[00:00:00]           └-> "before all" hook
[00:00:00]           └-: in iframe
[00:00:00]             └-> "before all" hook
[00:00:00]             └-> should open Kibana for logged-in user
[00:00:00]               └-> "before each" hook: global before each
[00:00:00]               │ debg TestSubjects.exists(headerGlobalNav)
[00:00:00]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="headerGlobalNav"]') with timeout=2500
[00:00:02]               │ debg --- retry.tryForTime error: [data-test-subj="headerGlobalNav"] is not displayed
[00:00:03]               │ debg navigating to login url: https://localhost:6131/login
[00:00:03]               │ debg navigate to: https://localhost:6131/login
[00:00:03]               │ debg browser[INFO] https://localhost:6131/login?_t=1594326227496 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:03]               │
[00:00:03]               │ debg browser[INFO] https://localhost:6131/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:03]               │ debg ... sleep(700) start
[00:00:04]               │ debg ... sleep(700) end
[00:00:04]               │ debg returned from get, calling refresh
[00:00:04]               │ debg browser[INFO] https://localhost:6131/login?_t=1594326227496 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:04]               │
[00:00:04]               │ debg browser[INFO] https://localhost:6131/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:04]               │ debg currentUrl = https://localhost:6131/login
[00:00:04]               │          appUrl = https://localhost:6131/login
[00:00:04]               │ debg TestSubjects.find(kibanaChrome)
[00:00:04]               │ debg Find.findByCssSelector('[data-test-subj="kibanaChrome"]') with timeout=60000
[00:00:08]               │ debg browser[INFO] https://localhost:6131/34511/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T20:23:50Z
[00:00:08]               │        Adding connection to https://localhost:6131/elasticsearch
[00:00:08]               │
[00:00:08]               │      "
[00:00:08]               │ debg ... sleep(501) start
[00:00:08]               │ debg ... sleep(501) end
[00:00:08]               │ debg in navigateTo url = https://localhost:6131/login
[00:00:08]               │ debg TestSubjects.exists(statusPageContainer)
[00:00:08]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="statusPageContainer"]') with timeout=2500
[00:00:11]               │ debg --- retry.tryForTime error: [data-test-subj="statusPageContainer"] is not displayed
[00:00:11]               │ debg Waiting for Login Form to appear.
[00:00:11]               │ debg Waiting up to 100000ms for login form...
[00:00:11]               │ debg TestSubjects.exists(loginForm)
[00:00:11]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="loginForm"]') with timeout=2500
[00:00:11]               │ debg TestSubjects.setValue(loginUsername, elastic)
[00:00:11]               │ debg TestSubjects.click(loginUsername)
[00:00:11]               │ debg Find.clickByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:11]               │ debg Find.findByCssSelector('[data-test-subj="loginUsername"]') with timeout=10000
[00:00:12]               │ debg TestSubjects.setValue(loginPassword, changeme)
[00:00:12]               │ debg TestSubjects.click(loginPassword)
[00:00:12]               │ debg Find.clickByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:12]               │ debg Find.findByCssSelector('[data-test-subj="loginPassword"]') with timeout=10000
[00:00:12]               │ debg TestSubjects.click(loginSubmit)
[00:00:12]               │ debg Find.clickByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:12]               │ debg Find.findByCssSelector('[data-test-subj="loginSubmit"]') with timeout=10000
[00:00:12]               │ debg Waiting for login result, expected: undefined.
[00:00:12]               │ debg Waiting up to 20000ms for logout button visible...
[00:00:12]               │ debg TestSubjects.exists(userMenuButton)
[00:00:12]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:00:16]               │ debg browser[INFO] https://localhost:6131/app/home 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:16]               │
[00:00:16]               │ debg browser[INFO] https://localhost:6131/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:16]               │ debg browser[INFO] https://localhost:6131/34511/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T20:23:59Z
[00:00:16]               │        Adding connection to https://localhost:6131/elasticsearch
[00:00:16]               │
[00:00:16]               │      "
[00:00:16]               │ debg --- retry.tryForTime error: [data-test-subj="userMenuButton"] is not displayed
[00:00:17]               │ proc [kibana]  error  [20:24:01.954] [error][client][connection] Error: 140107523979072:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
[00:00:17]               │ proc [kibana] 
[00:00:17]               │ debg TestSubjects.exists(userMenuButton)
[00:00:17]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenuButton"]') with timeout=2500
[00:00:17]               │ERROR browser[SEVERE] http://localhost:6131/api/_newsfeed-FTS-external-service-simulators/kibana/v8.0.0-SNAPSHOT.json - Failed to load resource: net::ERR_EMPTY_RESPONSE
[00:00:17]               │ERROR browser[SEVERE] https://localhost:6131/34511/bundles/plugin/newsfeed/newsfeed.plugin.js 0:19107 TypeError: Failed to fetch
[00:00:17]               │          at Fetch._callee3$ (https://localhost:6131/34511/bundles/core/core.entry.js:34:105174)
[00:00:17]               │          at l (https://localhost:6131/34511/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:144815)
[00:00:17]               │          at Generator._invoke (https://localhost:6131/34511/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:144568)
[00:00:17]               │          at Generator.forEach.e.<computed> [as throw] (https://localhost:6131/34511/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:145172)
[00:00:17]               │          at fetch_asyncGeneratorStep (https://localhost:6131/34511/bundles/core/core.entry.js:34:99267)
[00:00:17]               │          at _throw (https://localhost:6131/34511/bundles/core/core.entry.js:34:99675)
[00:00:17]               │ debg TestSubjects.exists(userMenu)
[00:00:17]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=2500
[00:00:20]               │ debg --- retry.tryForTime error: [data-test-subj="userMenu"] is not displayed
[00:00:20]               │ debg TestSubjects.click(userMenuButton)
[00:00:20]               │ debg Find.clickByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:00:20]               │ debg Find.findByCssSelector('[data-test-subj="userMenuButton"]') with timeout=10000
[00:00:21]               │ debg Waiting up to 20000ms for user menu opened...
[00:00:21]               │ debg TestSubjects.exists(userMenu)
[00:00:21]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"]') with timeout=2500
[00:00:21]               │ debg TestSubjects.exists(userMenu > logoutLink)
[00:00:21]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="userMenu"] [data-test-subj="logoutLink"]') with timeout=2500
[00:00:21]               │ debg TestSubjects.find(iframe_embedded)
[00:00:21]               │ debg Find.findByCssSelector('[data-test-subj="iframe_embedded"]') with timeout=10000
[00:00:21]               │ debg browser[INFO] https://localhost:6131/app/home 341 Refused to execute inline script because it violates the following Content Security Policy directive: "script-src 'unsafe-eval' 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-P5polb1UreUSOe5V/Pv7tc+yeZuJXiOi/3fqhGsU7BE='), or a nonce ('nonce-...') is required to enable inline execution.
[00:00:21]               │
[00:00:21]               │ debg browser[INFO] https://localhost:6131/bundles/app/core/bootstrap.js 42:19 "^ A single error about an inline script not firing due to content security policy is expected!"
[00:00:21]               │ debg TestSubjects.exists(headerGlobalNav)
[00:00:21]               │ debg Find.existsByDisplayedByCssSelector('[data-test-subj="headerGlobalNav"]') with timeout=2500
[00:00:24]               │ debg browser[INFO] https://localhost:6131/34511/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js 452:106112 "INFO: 2020-07-09T20:24:07Z
[00:00:24]               │        Adding connection to https://localhost:6131/elasticsearch
[00:00:24]               │
[00:00:24]               │      "
[00:00:24]               │ debg --- retry.tryForTime error: [data-test-subj="headerGlobalNav"] is not displayed
[00:00:24]               │ proc [kibana]  error  [20:24:08.822] [error][client][connection] Error: 140107523979072:error:1408F10B:SSL routines:ssl3_get_record:wrong version number:../deps/openssl/openssl/ssl/record/ssl3_record.c:332:
[00:00:24]               │ proc [kibana] 
[00:00:24]               │ERROR browser[SEVERE] http://localhost:6131/api/_newsfeed-FTS-external-service-simulators/kibana/v8.0.0-SNAPSHOT.json - Failed to load resource: net::ERR_EMPTY_RESPONSE
[00:00:24]               │ERROR browser[SEVERE] https://localhost:6131/34511/bundles/plugin/newsfeed/newsfeed.plugin.js 0:19107 TypeError: Failed to fetch
[00:00:24]               │          at Fetch._callee3$ (https://localhost:6131/34511/bundles/core/core.entry.js:34:105174)
[00:00:24]               │          at l (https://localhost:6131/34511/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:144815)
[00:00:24]               │          at Generator._invoke (https://localhost:6131/34511/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:144568)
[00:00:24]               │          at Generator.forEach.e.<computed> [as throw] (https://localhost:6131/34511/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:145172)
[00:00:24]               │          at fetch_asyncGeneratorStep (https://localhost:6131/34511/bundles/core/core.entry.js:34:99267)
[00:00:24]               │          at _throw (https://localhost:6131/34511/bundles/core/core.entry.js:34:99675)
[00:00:24]               │ info Taking screenshot "/dev/shm/workspace/kibana/x-pack/test/functional_embedded/screenshots/failure/Kibana embedded in iframe should open Kibana for logged-in user.png"
[00:00:25]               │ info Current URL is: https://localhost:6131/iframe_embedded
[00:00:25]               │ info Saving page source to: /dev/shm/workspace/kibana/x-pack/test/functional_embedded/failure_debug/html/Kibana embedded in iframe should open Kibana for logged-in user.html
[00:00:25]               └- ✖ fail: Kibana embedded in iframe should open Kibana for logged-in user
[00:00:25]               │      Error: expected true to equal false
[00:00:25]               │       at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
[00:00:25]               │       at Assertion.be.Assertion.equal (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:227:8)
[00:00:25]               │       at Assertion.be (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:69:22)
[00:00:25]               │       at Context.it (test/functional_embedded/tests/iframe_embedded.ts:39:33)
[00:00:25]               │ 
[00:00:25]               │ 

Stack Trace

Error: expected true to equal false
    at Assertion.assert (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:100:11)
    at Assertion.be.Assertion.equal (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:227:8)
    at Assertion.be (/dev/shm/workspace/kibana/packages/kbn-expect/expect.js:69:22)
    at Context.it (test/functional_embedded/tests/iframe_embedded.ts:39:33)

Build metrics

✅ unchanged

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@dmlemeshko dmlemeshko merged commit 4de59f0 into elastic:master Jul 9, 2020
dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Jul 9, 2020
dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Jul 9, 2020
…elastic#71279)

Co-authored-by: Elastic Machine <[email protected]>
# Conflicts:
#	test/functional/services/remote/webdriver.ts
dmlemeshko added a commit that referenced this pull request Jul 9, 2020
dmlemeshko added a commit that referenced this pull request Jul 10, 2020
…Y_PATH (#71279) (#71326)

* [ftr] use typed chromeOptions object, adding TEST_BROWSER_BINARY_PATH (#71279)

Co-authored-by: Elastic Machine <[email protected]>
# Conflicts:
#	test/functional/services/remote/webdriver.ts

* revert some changes in webdriver.ts
jloleysens added a commit to jloleysens/kibana that referenced this pull request Jul 10, 2020
…11y-overlay

* 'master' of github.com:elastic/kibana: (33 commits)
  address index templates feedback (elastic#71353)
  Upgrade EUI to v26.3.1 (elastic#70243)
  [build] Creates Linux aarch64 archive (elastic#69165)
  [SIEM][Detection Engine] Fixes skipped tests (elastic#71347)
  [SIEM][Detection Engine][Lists] Adds read_privileges route for lists and list items
  [kbn/optimizer] implement "requiredBundles" property of KP plugins (elastic#70911)
  [Security Solution][Exceptions] - Exceptions modal pt 2 (elastic#70886)
  [ML] DF Analytics:  stop status polling when job stopped (elastic#71159)
  [SIEM][CASE] IBM Resilient Connector (elastic#66385)
  jenkins_xpack_saved_objects_field_metrics.sh expects to be run from the KIBANA_DIR in CI
  Deduplication of entries and items before sending to endpoint (elastic#71297)
  [services/remote/webdriver] fix eslint error (elastic#71346)
  send slack notifications on visual baseline failures
  fix visual regression job (elastic#70999)
  [Ingest Manager] Add schema to usageCollector. (elastic#71219)
  [ftr] use typed chromeOptions object, adding TEST_BROWSER_BINARY_PATH (elastic#71279)
  [Ingest Manager] Fix limited packages incorrect response (elastic#71292)
  Support multiple features declaring same properties (elastic#71106)
  [Security_Solution][Resolver]Add beta badge to Resolver panel (elastic#71183)
  [DOCS] Clarify trial subscription levels (elastic#70636)
  ...
@dmlemeshko dmlemeshko deleted the ftr/accept-custom-chromium-binary-path branch January 31, 2022 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants