luckyframework / lucky_flow

Automated browser tests for web applications. Similar to Ruby's Capybara.
https://luckyframework.github.io/lucky_flow/
MIT License
51 stars 8 forks source link

Add driver that doesn't connect to a browser/webdriver #120

Closed matthewmcgarvey closed 2 years ago

matthewmcgarvey commented 3 years ago

The default driver for Capybara in Ruby is rack-test which doesn't use a browser (or even really start the app). It integrates directly with rack and parses the responses using gems and provides all the standard capybara functionality. By doing this direct integration and not using a browser, it is SOOO much faster. The only downside is that it doesn't execute javascript so you must switch to a different driver if you want that functionality. I'd like to see lucky_flow have a driver like this.

In the app I'm working on, we have 98 specs with the majority of them being flow specs and the tests take around 45-60 seconds to complete. I imagine that number would go way down if we didn't need to use a browser.

matthewmcgarvey commented 3 years ago

rack_test in capybara: https://github.com/teamcapybara/capybara/tree/master/lib/capybara/rack_test

matthewmcgarvey commented 2 years ago

I have created https://github.com/matthewmcgarvey/webless as an equivalent https://github.com/rack/rack-test

matthewmcgarvey commented 2 years ago

We now have a webless driver 🎉