bazelbuild / rules_closure

Closure rules for Bazel
https://developers.google.com/closure
Apache License 2.0
152 stars 114 forks source link

Replace phantomjs for closure_js_test #469

Open pcj opened 4 years ago

pcj commented 4 years ago

I find that phantomjs renders closure_js_test rather limited in terms of web apis, it's hard to use, and the error messages aren't very good.

Is there any appetite for replacing phantomjs with some sort of headless chrome or other browser? Has anyone started on such work?

For those interested in seeing phantomjs go away, what alternative(s) would you like to see?

gkdn commented 4 years ago

Anything that's karma based + headless chrome sounds good to me. See karma_web_test rules from node_js rules: https://bazelbuild.github.io/rules_nodejs/Karma.html

sgammon commented 4 years ago

i would kill for karma / headless chrome

robfig commented 4 years ago

I just reviewed an internal update that replaces closure_js_test with one based on rules_webtesting. We'd be happy to contribute it after it has some time to bake, assuming there's someone that could review and merge it.

Yannic commented 4 years ago

I also have created a replacement for closure_js_test based on Selenium / rules_webtesting, but that's tied to some infra code and hard to open-source. It's also very complicated and responsible for a significant portion of the flakyness I'm seeing, so I don't think sure y'all even want to see my version ;). I've also recently started to look into solutions that don't run the tests in a full browser (e.g. what https://github.com/google/gjstest does). It looks promising, but it's understandably not suitable as drop-in replacement for closure_js_test.

@robfig I'll be happy to help reviewing your version. As usual, someone else needs to merge, though.

gkdn commented 4 years ago

@robfig Are you planning to contribute a replacement for phantomjs?

robfig commented 4 years ago

I don't have the bandwidth at the moment, but I'm happy to share what we're using. Looking at it, I think it was just imported from somewhere, probably the rules_webtesting repo itself. I don't think you'd want to use it as-is

https://gist.github.com/robfig/f97541158982b7fad3daa9ac9132acad