I watched LinkedIn training “DevOps Foundations” with Carlos Nunez instructor. In section 3 he shows the use of RSpec and Capibara. I’ll extend a little bit as that section assumes a lot of things from the instructor side.
Step number 1 launches a Docker container with the Nginx web server. That is ok. Then he starts a second container which is Selenium.
Both containers use docker-compose. Nginx is launched with a Docker file. Selenium is not, instead just a raw image is downloaded.
Instructor launches a third container, which contains Rspec and Capybara. This container is specified again with a docker file
What is omitted is an explanation of Selenium, Capybara and RSpec. So let’s start.
Selenium is a web browser instance with an API tailored to be run from a container. The image used here also has a VNC server which is useful when using containers.
Capybara is a Test Framework with support to multiple languages.
RSpec is the ruby DSL.
Why we are using this combo is not explained.
Let’s see my containerfs launched with docker-compose: