Under the covers it uses Electron, which is similar to PhantomJS but faster and more modern.
- nightmare
Here is part of what the change might look like:
Pros:
Cons:
Related:
Oops. Just found that selenium part contains both chrome and firefox,
which can't be achieved by electron :sweat:
Very interesting! I'd never considered this use case for electron. It certainly does seem to have its benefits.
While I do feel some hesitation to switch from _the devil I know_, I think it might be worth the loss of Chrome + Firefox testing. I'm always developing in Chrome already and I can't remember the last time a test failed only in Firefox, honestly. The quirks usually result in things I'm _not_ testing for, like the alignment of an SVG node. I'd be curious to hear others' experiences.
The speed of tests on the other hand, is a pain I definitely have felt on large applications. 馃檪 If I could cut those build times down by half or a third, that'd be... amazing!
Selenium is still absolutely necessary, because Electron is only Chromium and we want to run tests in multiple environments. The default runs in Chrome & Firefox but the user can configure it to run in even more browsers.
The phantomjs usage is mostly for headless testing on CI environments. There are two concerns though:
So, what about jsdom for unit testing?
@guidobouman jsdom isn't a full browser implementation, so is probably more likely to cause failures for features that do in fact work in real browsers.
It seems that this isn't the right time to move away from phantomjs, due to the concerns @yyx990803 mentioned. It could well be that electron's node environment doesn't really cause problems in practice, but we probably don't want Vue users to be the guinea pigs in this experiment. When there are more examples of large projects using electron to test against, we can revisit this. 馃槂
Most helpful comment
Selenium is still absolutely necessary, because Electron is only Chromium and we want to run tests in multiple environments. The default runs in Chrome & Firefox but the user can configure it to run in even more browsers.
The phantomjs usage is mostly for headless testing on CI environments. There are two concerns though: