News Feed
Jobs Feed

News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way
Automated Testing With Selenium2 And PHPUnit
November 25, 2013 @ 10:49:10

On the Kevin Waterson has posted a guide to automated testing with Selenium2 and PHPUnit to create functional tests to check the resulting output of your application.

Selenium2 is a software testing framework for web applications. This tutorial focuses on automating browser testing using Selenium2.

The tutorial walks you through everything you'll need to get started testing with these tools, end-to-end:

  • Selenium installation
  • Writing a first test
  • Setting up the Selenium environment
  • Testing with multiple browsers
  • Assertion types (and examples)
  • Testing form actions and results
0 comments voice your opinion now!
automated testing selenium2 phpunit tutorial

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

How to Use Selenium 2 With PHPUnit
October 15, 2012 @ 09:40:01 has continued their look at testing in PHP applications with this new screencast showing how to combine one of the most popular PHP unit testing tools, PHPUnit, with the Selenium frontend testing tool for automated application testing.

In this lesson, we will learn how to work with Selenium 2 directly within PHPUnit. For those unfamiliar, Selenium gives us an easy way to automate the browser. This makes it perfect for writing user acceptances tests.

You can download the source for the files and tests that they use in the demo. You can find links to the other articles in their testing series here (covering things like TDD, basic PHPUnit testing and definitions of some of the most common testing terms).

0 comments voice your opinion now!
screencast selenium2 browser testing phpunit tutorial

Matt Frost:
Using Selenium2 with PHPUnit
September 19, 2012 @ 11:44:20

In this new post to his site Matt Frost continues his look at using Selenium to test his applications (see the first parts here) and shows how to use the Selenium extension for PHPUnit to run all his tests from one place.

So I've taken it upon myself to do a bit of reading and messing around with the Selenium Extension for PHPUnit and I wanted to share a bit of what I learned. Looking around on the internet, I didn't find a whole lot of real good information on the Selenium2TestCase API so I want to provide a little bit of depth in some of those areas. I'm going to cover a few areas of interest and provide some code examples where relevant.

He includes the steps to get things set up to connect with the Selenium server and some of the common functions you can use to interact with its browser. He shows how to select items and interact with things like forms and links. He also includes a recommendation of using the "url()" method to jump to a point in the app instead of clicking through the same paths over and over again.

0 comments voice your opinion now!
selenium2 phpunit unittest functional test tutorial

Codeception Introduces ZombieJs and Selenium2 Support
May 31, 2012 @ 12:13:49

Codeception, the PHP BDD (behavior-driven development) testing tool has announced some new features including newly updated documentation and support for Selenium2 and ZobmieJS.

Tools like ZombieJS, (PhantomJS, and more) are built in order to run tests without a browser. And so they are called headless. They don't require a browser window to start, they don't show any interactions on screen.

They briefly mention the "delay" option that's been introduced to allow for manual delays to be put into your code. You can find out more about this testing tool from its main project page or by just jumping in and reading through the docs. (You can also find the full code over on github.)

0 comments voice your opinion now!
codeception zonbiejs selenium2 release project

Community Events

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

introduction podcast hhvm security application component language package framework symfony2 install composer code unittest opinion hack example overview release facebook

All content copyright, 2014 :: - Powered by the Solar PHP Framework