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.
unknown error: Chrome failed to start: exited abnormally
Those are the kinds of errors I am seeing.
I have seen this question posted:
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:
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
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 ;)
Bitbucket Pipelines is based entirely on Docker. When you run your build script you're doing so inside a Docker container. If you don't explicitly specify an image in the bitbucket-pipelines.yml file, it will use the default Pipelines image.
That doesn't mean you have to be using Docker in your application to use Pipelines. It simply provides the environment in which your build runs. This is extremely useful as you can preconfigure a Docker image to come with all the tooling you need to build, test and deploy your application (or use an existing image provided by the Docker community).
So while it's possible to set up and run webdriver in the script section of the bitbucket-pipelines.yml file, it's actually more beneficial to utilise an image that has already been configured with the necessary tooling. The linked article describes that process. You would then use the image as your build environment by specifying it as the `image` attribute in your bitbucket-pipelines.yml file (your actual build script should remain largely unchanged). This will also reduce your build times as Docker images are cached.
Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster ! While we’re all excited about the new improvements to Bitbucket ...
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