Using ruby 2.1.2 image. The reason for 2.1.2 is our application at Promptcloud is using ruby 2.1.2.
- shivakumaarmgs/ruby2.1.2-test:v3 image
A basic docker image build on ruby 2.1.2 image
with nodejs and other minor dependencies installed. Those dependencies can be
found at Dockerfile.
https://hub.docker.com/r/shivakumaarmgs/ruby2.1.2-test/
-
selenium/standalone-chrome
https://hub.docker.com/r/selenium/standalone-chrome/
docker-compose build
This pulls all the necessary images and prepares your container. It doesn't start the development server.
docker-compose up --exit-code-from web
These commands will create the database if needed and migrate the database. Then
it runs the tests. Please look at entry.sh
and test.sh
for more details. In
test.sh we wait till the mysql service is up and running. Its implemeted based
on these links startup-order
and docker-compose-wait-for-dependencies
Capybara is configured to run tests on a selenium remote machine which is running in a another container along side our rails app container. This configuration is taken from https://medium.com/@georgediaz/docker-container-for-running-browser-tests-9b234e68f83c
- Add redis service to compose file
- Try and use parallel_tests