Skip to content

Conversation

@YusukeIwaki
Copy link
Contributor

Summary

Poltergeist and capybara-webkit are already not maintained.

I just happend to find the usages of them here: https://github.com/rails/rails/blob/main/actionpack/lib/action_dispatch/system_testing/driver.rb

Most users actually use Selenium with Headless Chrome in these years, and it is not encouraged to use poltergeist or capybara-webkit at this moment.

Cuprite is a good alternative driver to Poltergeist: https://evilmartians.com/chronicles/system-of-a-test-setting-up-end-to-end-rails-testing
Some guide descriptions of Poltergeist would be better to replace into Cuprite.

Other Information

@guilleiguaran
Copy link
Member

I think we should deprecate capybara-webkit and poltergeist in 7.0 before removing them on 7.1 since some users might still depending on them.

We can add Cuprite and make it the default/recommended meanwhile.

@YusukeIwaki
Copy link
Contributor Author

YusukeIwaki commented Jul 18, 2021

@guilleiguaran Thank you for your kind advise.:)

we should deprecate capybara-webkit and poltergeist in 7.0 before removing them on 7.1 since some users might still depending on them.

I see. This is really a breaking change. I will change the codes to show deperecation warning, instead of deleting them.

I also found a problem in adding cuprite. Some users already configure Capybara driver with the name :cuprite, and when we add cuprite into Rails, the existing configuration is not respected.
#42511 will resolve the problem.
We can add cuprite only after the PR is merged.

@YusukeIwaki YusukeIwaki marked this pull request as ready for review July 20, 2021 14:12
@guilleiguaran
Copy link
Member

@YusukeIwaki thanks for updating this

can you check the CI failures?

@guilleiguaran guilleiguaran self-assigned this Jul 20, 2021
…m testing. Add `cuprite` instead.

Poltergeist and capybara-webkit are already not maintained.

* https://github.com/teampoltergeist/poltergeist
* https://github.com/thoughtbot/capybara-webkit

Most users actually use Selenium with Headless Chrome in these years, and it is not encouraged to use poltergeist or capybara-webkit at this moment.

Cuprite is a good alternative driver to Poltergeist: https://evilmartians.com/chronicles/system-of-a-test-setting-up-end-to-end-rails-testing
Not only removing deprecated Capybara drivers, also introducing Cuprite.
@YusukeIwaki YusukeIwaki changed the title Remove poltergeist and webkit driver registration. Add cuprite instead. Deprecate poltergeist and webkit driver registration. Add cuprite. Jul 21, 2021
@YusukeIwaki
Copy link
Contributor Author

@guilleiguaran Hi, sorry for my mistake, I fixed the problem and rebased.

@guilleiguaran guilleiguaran merged commit e43d0dd into rails:main Jul 21, 2021
@YusukeIwaki YusukeIwaki deleted the replace_poltergeist_with_cuprite branch July 21, 2021 01:48
@Fjan
Copy link
Contributor

Fjan commented Jul 24, 2021

I realise the writing has been on the wall for capybara-webkit some time now, but just to point out we still happily use capybara-webkit every day, simply because it runs system tests about 3 to 4 times faster than headless Chrome.

It's a bit painful to install the required old Qt version on Big Sur, but the difference between a 2 minute test suite or a 7 minute one is a considerable quality of life difference for development. Headless Chrome has steadily improved functionality, but I don't think anyone is working on closing that >300% performance gap. I realise everyone uses a CI server nowadays, but faster tests make it much easier for programmers to practice good testing hygiene.

@YusukeIwaki
Copy link
Contributor Author

YusukeIwaki commented Jul 25, 2021

Hi @Fjan, thank you for your feedback.

capybara-webkit users can still use it even after Rails remove :webkit parameter from SystemTesting::Driver, by just registering capybara-webkit driver manually like this.

Capybara::WebKit::Driver.new(app, .......)

And the main purpose of this Pull request is dropping official support for deprecated Capybara drivers.
I completely agree to the opinion that faster testing brings better quality of life, and Cuprite is actually faster than Selenium+HeadlessChrome. Cuprite would be a good alternative to capybara-webkit if it performs well. (I didn't know the performance of capybara-webkit, sorry.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants