Closed dmitriz closed 7 years ago
If we're going to change the example I think it's worth going straight to recommending headless Chrome:
https://github.com/karma-runner/karma-chrome-launcher/pull/111
Perhaps it's a bit premature for this to be the documented example but a link would be a start. Otherwise this is a change from headless to windowed testing.
We'll do the switch as soon as headless Chrome is available on all platforms.
PhantomJS is dead, no big arguments required :wink:.
Closing this PR for now. We are happy to accept a headless Chrome PR, once it runs stable on all platforms (Mac, Windows, Linux).
@nikku
Why not a real browser that is already there and stable?
Well for one your example won't run in CI without xvfb
I'd say headless Chrome is a real browser :wink:.
In addition to Ben's comment headless browsers have the benefit of an improved, distraction free experience for the developer.
@bendrucker
Well for one your example won't run in CI without xvfb
Setting CI is a different story, with other issues to solve.
So indeed, more examples specifically targeted at CI integration would be great! But I would put them separately.
For instance, I am using the Firefox runner instead in my project here: https://github.com/dmitriz/min-karma/blob/master/.travis.yml
Which is also a real browser ;) And is perhaps even better for this and other reasons?
@nikku
I'd say headless Chrome is a real browser 😉.
I have no experience with it, but this does not sound good at all:
Caution: Headless mode is available on Mac and Linux in Chrome 59. Windows support is coming soon! To check what version of Chrome you have, open chrome://version.
So the questions to consider:
If all of these questions are positively answered, I will be happy to switch today :)
If not, then using the current working runners supporting real user's browsers might be a better fit for the people coming to try this example?
PhantomJS is dead, no big arguments required 😉.
In that case, perhaps, it would be better to replace it, at least temporarily?
Ping @bendrucker @nikku
Since Chrome Headless is now available I have checked on my local machine by modifying the following files, to replace phantomjs with Chrome Headless:
It will be a delight to see phantomjs removed from the package If you agree I can raise a new PR with the changes for Chrome Headless support.
Please create the PR!
Reasons against Phantom:
PhantomJS
downloads its huge file into thenode_module
directory every timenpm
andyarn
do not clearly report the reason for delay is thePhantomJS
installation, the user is left wondering what is going onReasons for the Chrome launcher:
Need I say more? :)