Setting up pipelines with selenium

Hi, I am attempting to use Bitbucket pipelines to run our Ruby Rspec/capaybara based specs.

 

I have the configuration working to the point where the tests are run, but I am having issues running chromedriver.

 

Selenium::WebDriver::Error::UnknownError: unknown error: Chrome failed to start: exited abnormally

 

Those are the kinds of errors I am seeing.

 

I have seen this question posted:

 

https://community.atlassian.com/t5/Bitbucket-questions/BitBucket-Pipelines-Selenium/qaq-p/641852

 

But I do not want to set up browserstack in this instance, - but simply run the tests with chromedriver.

 

My yml file looks as follows:

 

image: ruby:2.4.0

pipelines:
    default:
           - step:
              services:
                 - mysql
                     caches:
                        - bundler
                           script: # Modify the commands below to build your repository.
                             - bundle install
                             - apt-get update
                             - curl -sL https://deb.nodesource.com/setup_8.x | bash -
                             - apt-get install -y nodejs
                             - npm install
                             - npm install chromedriver
                             - rails db:migrate RAILS_ENV=test
                             - rspec

 

1 answer

1 accepted

0 vote

Hi @hugh

It is possible to run webdriver tests in Pipelines. This article provides some details using firefox but a similar approach can be taken with chrome: https://medium.com/@yiquanzhou/run-selenium-ui-tests-in-docker-container-78be98e1b52d

In fact we test pipelines using this method ;)

Thank you, that did help - I ended up setting it up using Firefox and Geckodriver, I kept running into issues with Chrome and Chromedriver.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

1,747 views 1 5
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you