We are pretty new to Bitbucket pipeline. Currently trying to setup a pipeline to run webdriver.io tests written in typescript in bitbucket pipeline.
We were able to write the pipeline yml file with some help from bitbucket documentation.
image: node:12.17.0
pipelines:
custom: # Pipelines that can only be triggered manually
uiTests:
- step:
script:
- apt-get update
- apt-get install libnspr4 libnss3 libnss3-tools
- npm install
- npm run << test written in webdriver.io >>
services:
- selenium-chrome
definitions:
services:
selenium-chrome:
image: selenium/standalone-chrome:3.141.59-oxygen
The above pipeline failed with below error message
<span>Only local connections are allowed.</span>
<span>Please see <a href="https://chromedriver.chromium.org/security-considerations" rel="noopener nofollow noreferrer" target="_blank">https://chromedriver.chromium.org/security-considerations</a> for suggestions on keeping ChromeDriver safe.</span>
<span>ChromeDriver was started successfully.</span>
<span>[0-0] RUNNING in chrome - /tests/browser_tests/businessline/hackathon/register_happy_path.test.ts</span>
<span>[0-0] 2021-09-28T19:09:28.604Z ERROR webdriver: Request failed with status 500 due to unknown error: unknown error: cannot find Chrome binary</span>
<span>[0-0] 2021-09-28T19:09:28.605Z ERROR webdriver: unknown error: unknown error: cannot find Chrome binary</span>
<span> at Object.getErrorFromResponseBody (/opt/atlassian/pipelines/agent/build/node_modules/webdriver/build/utils.js:189:12)</span>
<span> at WebDriverRequest._request (/opt/atlassian/pipelines/agent/build/node_modules/webdriver/build/request.js:168:31)</span>
<span> at processTicksAndRejections (internal/process/task_queues.js:97:5)</span>
<span> at Object.startWebDriverSession (/opt/atlassian/pipelines/agent/build/node_modules/webdriver/build/utils.js:63:20)</span>
<span> at Function.newSession (/opt/atlassian/pipelines/agent/build/node_modules/webdriver/build/index.js:56:45)</span>
<span> at Object.exports.remote (/opt/atlassian/pipelines/agent/build/node_modules/webdriverio/build/index.js:56:22)</span>
<span> at Runner._startSession (/opt/atlassian/pipelines/agent/build/node_modules/@wdio/runner/build/index.js:202:56)</span>
<span> at Runner._initSession (/opt/atlassian/pipelines/agent/build/node_modules/@wdio/runner/build/index.js:164:25)</span>
<span> at <a href="http://runner.run/" rel="noopener nofollow noreferrer" target="_blank">Runner.run</a> (/opt/atlassian/pipelines/agent/build/node_modules/@wdio/runner/build/index.js:87:19)</span>
<span>[0-0] 2021-09-28T19:09:28.608Z ERROR @wdio/runner: Error: Failed to create session.</span>
<span>unknown error: cannot find Chrome binary</span>
<span> at Object.startWebDriverSession (/opt/atlassian/pipelines/agent/build/node_modules/webdriver/build/utils.js:68:15)</span>
<span> at processTicksAndRejections (internal/process/task_queues.js:97:5)</span><span>Starting ChromeDriver 88.0.4324.96 (68dba2d8a0b149a1d3afac56fa74648032bcf46b-refs/branch-heads/4324@{#1784}) on port 9515</span>
Any help to fix this will be very helpful.
Thanks in Advance
Sanju