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

KillerPHP Blog: PHP Video: Processing Forms with PHP - part 2

IBM developerWorks: Get started with Project Zero and PHP

Elizabeth Smith's Blog: How to Compile PHP5.2 and PHP-GTK2 on Windows using Visual C++ Express

Thilanka Kaushalya's Blog: How to use Mysql Transactions with PHP

PHPBuilder.com: Beginning PHP: One Goal at a Time


Community Events





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


package laravel introduction tips library community release version series language api symfony podcast install opinion zendserver framework deployment bugfix interview

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