rules_closure icon indicating copy to clipboard operation
rules_closure copied to clipboard

Replace phantomjs for closure_js_test

Open pcj opened this issue 4 years ago • 6 comments

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?

pcj avatar Feb 02 '20 01:02 pcj

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

gkdn avatar Feb 03 '20 21:02 gkdn

i would kill for karma / headless chrome

sgammon avatar Feb 12 '20 09:02 sgammon

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.

robfig avatar Feb 12 '20 19:02 robfig

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.

Yannic avatar Mar 01 '20 19:03 Yannic

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

gkdn avatar Jul 18 '20 01:07 gkdn

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

robfig avatar Jul 20 '20 21:07 robfig