DEV Community

Alessandro Rodi
Alessandro Rodi

Posted on

3 2

Run your Capybara tests on different devices

On how many devices are you testing your Rails Application?

As a developer, you work 90% of the time in front of a computer or laptop, but your users access the website from a mobile device.

That's why we started, since some years, to code "mobile-first", having the mobile version of our web applications in mind and as our priority one.

But I realised that all our system tests were running only on the default selenium_chrome_headless driver, provided by Capybara.

Not so nice!

What about all the other devices? There are so many devices! And I don't want to configure and maintain these configurations in all our projects. At Renuo we maintain about 60 Rails projects. We definitely needed to extract this into a gem.

And here you are so_many_devices

For now, we published only few devices, but please help us filling the list!

You can now choose between many predefined capybara drivers and simply use them with:

config.before(:each, type: :system, js: true) do
    driven_by :iphone_6_7_8
end
Enter fullscreen mode Exit fullscreen mode

Enjoy!

Image of Datadog

Master Mobile Monitoring for iOS Apps

Monitor your app’s health with real-time insights into crash-free rates, start times, and more. Optimize performance and prevent user churn by addressing critical issues like app hangs, and ANRs. Learn how to keep your iOS app running smoothly across all devices by downloading this eBook.

Get The eBook

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more