News Feed
Jobs Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Codeception.com:
Headless Browser Testing with Selenium2 and PhantomJS
May 29, 2013 @ 11:13:58

On the CodeCeption blog they have an example if how to use the testing tool to run headless with Selenium2 and PhantomJs to work with Javascript or DOM elements in the page.

The latest version of PhantomJS is an easy to install, stand-alone binary that doesn't require installing Node.js or any other dependencies, and ships with its own 'Ghost Driver' for implementing the WebDriver Wire Protocol. Which means you can drive it using the Selenium2 driver in Codeception, and anything that you can test in Chrome, Firefox, Safari, or IE using Selenium2, you can now test in half the time using PhantomJS.

They help you get the tools you need installed and show you how to start up the Selenium server and connect PhantomJS to it. Then you just run the acceptance tests for your application and get some feedback directly in the terminal window from the execution.

Headless testing can be a bit of a challenge, since it's impossible to 'see' what failed. But in this case, Codeceptions default logging and screenshot capture on failure can be extremely helpful, since you can then actually see the state of the browser at the point of failure.
0 comments voice your opinion now!
codeception testing phantomjs headless selenium2 tutorial

Link: http://codeception.com/05-13-2013/phantom-js-headless-testing.html

blog comments powered by Disqus

Similar Posts

Sameer Borate's Blog: Accessing Amazon Product Advertising API

php|architect: Using PHP5's SOAP Support

Zend Developer Zone: Zend_Controller_Action, Now With Parameters!

Tales of a Coder: DocBlox - Pain Free Documentation

Stefan Mischook's Blog: PHP Classes and Objects video tutorial


Community Events











Don't see your event here?
Let us know!


hack package component security podcast composer database symfony2 introduction framework hhvm facebook performance application language opinion series install unittest release

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework