Run Rails 6 System Tests in Docker Using a Host Browser

The problem: we wanted to get Rails system tests running using a browser on our development machines.The complication: we develop our Rails project within Docker, in order to make every aspect of our development environment reproduceable.The preference: we want to see the browser-based tests running, but we don’t want to mess around with running browser inside a container and tunneling its display to an external X-Windows server. We already have perfectly good browsers on our host machines, and we’d like to use them natively.The outcome: we can run Rails system tests inside a Docker container. It pops up Chrome windows on the host machine, and exercises our app!.
Run Rails 6 System Tests in Docker Using a Host Browser #ruby #rubydeveloper #rubyonrails #docker #tests https://rubyonrails.ba/single/run-rails-6-system-tests-in-docker-using-a-host-browser

Nezir Zahirovic

Contractor Ruby On Rails (8+ years) / MCPD .Net / C# / Asp.Net / CSS / SQL / (11 years)

related articles