Running Acceptance Tests Faster With Phantom JS


In this video you will see how switching from using Selenium to PhantomJS can cut your test times almost in half.

PhantomJS can handle Javascript pages just like Selenium, but it runs without requiring a real browser (Chrome, Firefox, etc) and as such, is perfect for running on your test server.

You'll see how easy PhantomJS is to download - no installation required.

First you will see the tests run under Selenium, and then we will stop Selenium, start up PhantomJS using the command:

sudo phantomjs --webdriver=4444

Of course, that's assuming you're running from the PhantomJS download / unzipped bin subdirectory.

One thing you may be wondering - what happens if it all goes wrong? Do you still get your screenshot output in the _output directory? The answer is yes - which is very cool :)

Code For This Course

Get the code for this course.

Code For This Video

Get the code for this video.

Episodes