4

How credible is testing performed with PhantomJS WebDriver?

What are types and examples of bugs that can be found with Chrome or Safari that cannot be found with PhantomJS?

PhantomJS is a scripted, headless browser used for automating web page interaction. According to Wikipedia, it is based on WebKit making it a similar browsing environment to Safari and Google Chrome (before Chrome's fork of WebKit evolved into Blink). I used PhantomJS for test automation with GhostDriver, a Java binding for the PhantomJS WebDriver.

I don't mean usability problems or visual design problems with PhantomJS but rather problems related to JavaScript, following HTTP flow, etc.

  • 2
    You might want to add that you're specifically talking about automation. In other words, you already know that you won't discover usability problems or visual design problems with PhantomJS. – user246 Apr 21 '16 at 15:33
  • @user246, right, I updated my question. – dzieciou Apr 22 '16 at 5:41
3

I'd take a look at http://caniuse.com/#compare=chrome+51,safari+9.1; that shows what HTML5 constructs Chrome/Blink allow that Safari (and hence webkit) don't. Also, according to http://phantomjs.org/supported-web-standards.html,

Support for plugins (such as Flash) was dropped a long time ago. The primary reasons:

Pure headless (no X11) makes it impossible to have windowed plugin

Issues and bugs are hard to debug, due to the proprietary nature of such plugins (binary blobs) The following features, due to the nature of PhantomJS, are irrelevant:

WebGL would require an OpenGL-capable system. Since the goal of PhantomJS is to become 100% headless and self-contained, this is not acceptable. Using OpenGL emulation via Mesa can overcome the limitation, but then the performance would degrade.

Video and Audio would require shipping a variety of different codecs.

CSS 3-D needs a perspective-correct implementation of texture mapping. It can’t be implemented without a penalty in performance.

Each of the above feature may be supported in the future if the technical challenges associated with the implementations are solved. Until then, do not rely on those features.

So anything that requires Flash, for example, isn't going to be testable via phantomjs. Things that might involve window resizing isn't going to be testable, it appears.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.