Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to run Selenium side runner in bitbucket pipeline?

I have tried running selenium side runner via Jenkins using below command:

selenium-side-runner -c "browserName=chrome goog:chromeOptions.args=[disable-infobars,headless]" myfile.side

Not sure how to run my tests in the pipeline, however, I tried below approach, but pipeline is failing:

image: atlassian/default-image:3

pipelines:
default:
- parallel:
- step:
name: 'Build and Test'
script:
- echo "Your build and test goes here..."
- step:
name: 'Lint'
script:
- echo "Your linting goes here..."
- step:
name: 'Security scan'
script:
- selenium-side-runner -c "browserName=chrome goog:chromeOptions.args=[disable-infobars,headless]" ./myfile.side
Error: Untitled.png

1 answer

@Divyanka  hi. Thanks for your question.

Try to use docker image with selenium-side-runner. As an example this image.

step:
name'Security scan'
image: nixel2007/docker-selenium-side-runner:latest
script:
selenium-side-runner -c "browserName=chrome goog:chromeOptions.args=[disable-infobars,headless]" ./myfile.side

Regards, Igor

Hi, @Igor Stoyanov can you please share your pipeline yml file for the reference

@Divyanka hi. Try this one:

image:
name: atlassian/default-image:3

test: &test
parallel:
- step:
name: 'Build and Test'
script:
- echo "Your build and test goes here..."
- step:
name: 'Lint'
script:
- echo "Your linting goes here..."
- step:
name: 'Security scan'
image: nixel2007/docker-selenium-side-runner:latest
script:
- selenium-side-runner -c "browserName=chrome goog:chromeOptions.args=[disable-infobars,headless]" ./myfile.side


pipelines:
default:
- <<: *test
branches:
master:
- <<: *test

Also additionally you can try  this guide or this guide.

Regards, Igor.

Like Divyanka likes this

Thanks I tried, I was getting error: ChromeDriver not found, then I tried pulling headless chrome, still getting this error:

image.png

YML file: 

image: atlassian/default-image:3

 

pipelines:

  default:

       - step:

          name: Build and test

          image: zenika/alpine-chrome

          caches:

          - node

          script:

            - docker version

            - docker pull browserless/chrome:latest

          services:

            - docker

         

       - step:

          name: 'Test'

          image: nixel2007/docker-selenium-side-runner:latest

          script:

            - selenium-side-runner -c "browserName=chrome goog:chromeOptions.args=[disable-infobars,headless]" ./ConsoleTesting.side

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

📣 Calling Bitbucket Data Center customers to participate in research

Hi everyone, Are you Bitbucket DC customer? If so, we'd love to talk to you! Our team wants to dive deep to understand your long-term plans regarding Bitbucket DC and Atlassian Cloud. Do you plan...

111 views 2 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you