Can we use a remote selenium server for integration tests in pipelines?

Hello,

I was wondering how I could connect to another container in the Bitbucket Pipelines. I use capybara and selenium chrome and I would love to run my integration tests on bitbucket pipelines.

Here is my bitbucket-pipelines.yml:

image: damireh/ruby-2.3.1-node-6.9.4

pipelines:
default:
- step:
script:
- export DATABASE_URL=postgresql://test_user:test_user_password@localhost/db/test
- bundle install
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.23.3
- export PATH=$HOME/.yarn/bin:$PATH
- yarn install
- rake db:migrate
- DOCKER=true bundle exec rspec
- yarn test
services:
- postgres
- chromedriver
branches:
master:
- step:
script:
- export DATABASE_URL=postgresql://test_user:test_user_password@localhost/db/test
- bundle install
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 0.23.3
- export PATH=$HOME/.yarn/bin:$PATH
- yarn install
- rake db:migrate
- DOCKER=true bundle exec rspec
- yarn test
- git push https://heroku:$HEROKU_API_KEY@git.heroku.com/$HEROKU_APP_NAME.git
services:
- postgres
- chromedriver

definitions:
services:
postgres:
image: postgres
environment:
POSTGRES_DB: db/test
POSTGRES_USER: test_user
POSTGRES_PASSWORD: test_user_password
chromedriver:
image: selenium/standalone-chrome
ports:
- "4444:4444"
- "5900:5900"

1 answer

the yml file looks good. It now depends on how your selenium tests are configured.

Did you try out the shown yml file? What errors did you get from the pipeline?

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

24,006 views 26 12
Join discussion

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