News 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

PHPMaster.com: Charting with pChart

The Bakery: Nine New Tutorials, Helpers and Plugins for CakePHP

Rob Allen's Blog: A primer on PHP namespaces

Vidyut Luther's Blog: Adding Subscribers to Campaign Monitor Lists using PHP5 and SOAP

Jachim Coudenys: Using multiple databases in phpunit/dbunit with Composer


Community Events





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


series code wordpress install bugfix configure threedevsandamaybe application symfony interview release laravel list api introduction community library podcast developer language

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