News Feed
Jobs Feed
Sections



Recent Jobs

News Archive
feed this:

DZone.com:
PHPUnit_Selenium
January 20, 2012 @ 09:12:18

On DZone.com today Giorgio Sironi has a quick tutorial showing you how to set up and use the PHPUnit_Selenium component in the latest releases of the popular testing software.

With the 1.2 release, PHPUnit_Selenium supports (basically) for the first time the Selenium 2 WebDriver API. While PHPUnit_Selenium already worked with Selenium 2, it did so only by using the Selenium 1 emulation included in the jar; now it provides an object-oriented API right natively supported in a base PHPUnit test case, shipped in PHPUnit's PEAR channel.

He includes the steps you'll need to pull it from the PEAR channel and how to set up a test case based on the PHPUnit_Extensions_Selenium2TestCase object. He gives a few examples of how to select various components on the page (via CSS selectors and XPath), assert that the right information is there and interact with forms.

0 comments voice your opinion now!
phpunit selenium install unittest tutorial example select interact



DZone.com:
Open/Closed Principle on real world code
January 13, 2012 @ 09:05:53

In a new post to DZone.com Giorgio Sironi talks about the "open/closed principle" in software development and shows an example based on the design of the PHPUnit_Selenium project.

This article shows an example of how the application of the Open/Closed Principle improved the design of a real project, the open source library PHPUnit_Selenium. These design concepts apply to every object-oriented language, including Java, Ruby or even C++. The Open Closed Principle, part of SOLID set, states that software should be open for extension and at the same time closed for modification.

He starts with a little background on the project, pointing out that there's a Session object it uses for all of its testing with a magic "__call" method that handles any kind of method call to the object. This method has issues (dependencies, strict requirements for use) but can be refactored according to the Open/Closed idea to set up an array of anonymous functions that can be called as a "command". Examples of these types of classes are also included (one for the "click" action on a button and another for getting the current location).

0 comments voice your opinion now!
open closed principle solid design command phpunit selenium


DZone.com:
Selenium 2 from PHP code
November 16, 2011 @ 10:06:01

On DZone.com today Girogio Sironi shares some of his experiences testing out the PHP bindings currently offered to work with Selenium, the web application frontend testing tool that's become a standard over the past few years.

After trying out Selenium 2, it was natural for me to look for its support in PHP code; however, there isn't an official PHP Api distributed on Selenium's website. I tested all the PHP bindings I could find to see which is the best choice today.

He tried out a few different technologies:

The finishes the post with a quick summary for each of the offerings including strengths each has and situations where you might want to use them.

0 comments voice your opinion now!
selenium frontend test integrate phpunit webdriver


Till Klampaeckel's Blog:
Selenium vs. Saucelenium
September 08, 2010 @ 13:48:03

In this new post to his blog Till Klampaeckel talks about two tools for front-end interface testing - Selenium and Saucelenium - and how he used the latter in his application testing.

Selenium and Saucelenium have the same root - in fact Saucelenium is a Selenium fork. While the Selenium project seems to focus on 2.x currently, stable 1.x development seems to really happen at Saucelabs. That is if you call a commit from January 22nd of this year active development.

He talks about the installation process (guided by the README from his fork) and the tool he had to install to get it to work for him - xserver-xorg. He includes a sample test to give you an idea of what can be done with the testing tool. It loads the page imitating Chrome and looks for certain text on two different pages as well as check one of the links.

0 comments voice your opinion now!
selenium saucelenium unittest interface frontend install readme


Web Builder Zone:
The different kinds of testing
September 01, 2010 @ 12:09:35

On the Web Builder Zone (from DZone) Giorgio Sironi has posted a new article that talks about the different kinds of testing you can do on your application - both on the frontend and backend.

Automated testing supports your constant effort in design and refactoring, and besides that ensures that your application actually works in a reliable and repeatable way. [...] In this article I'll describe the different categories of testing, as applied to a Zend Framework 1 application, but this classification pertains to every web application based on object-oriented programming. Since this kind of applications is obviously PHP-based, PHPUnit will be the tool of choice along with some of its standard extensions.

He looks at five different types of testing you can do on your application:

  • Unit testing
  • Pragmatic unit testing
  • Functional testing
  • Integration testing
  • Acceptance testing

Not all of these can be done with PHPUnit on the backend, but they (mostly) have automated tools of their own like Selenium for frontend interface testing.

0 comments voice your opinion now!
testing application automated phpunit selenium


NetBeans Blog:
Selenium plugin for PHP
March 09, 2009 @ 09:36:31

A quick new post to the NetBeans blog today points out the support for Selenium in the IDE. The NetBeans wiki has more information:

Before trying Selenium in PHP be sure to have PHPUnit and Selenium_Testing packages installed. The recommended way to install both is using PEAR.

The wiki page guides you through the creation of a simple testing setup complete with screenshots of the interface the whole way through. The plugin page has more details on running the tests.

0 comments voice your opinion now!
selenium plugin ide application wiki


Sameer Borate's Blog:
Selenium IDE Tutorial - Part 2
November 24, 2008 @ 08:47:11

Sameer Borate has part two of his look at using the Selenium IDE in testing PHP applications.

In part 1 of this tutorial you have seen how to write a simple web test using Selenium. In this part we will see how to use the test generated using the IDE with Selenium RC and PHPUnit. In this part we will use Delicious as our test target. I've already created a small Selenium test that you can use. You can download the HTML source from here.

This second part walks you through a test on the del.icio.us website and, upon searching for the term "selenium", checks to see that the number of results are greater than 33,000 via a PHPUnit test.

0 comments voice your opinion now!
selenium ide phpunit ide tutorial delicious search results


Developer Tutorials Blog:
Testing email routines in web applications
July 17, 2008 @ 08:49:16

On the Developer Tutorials blog, there's a recent example of how to validate a common task of many signup forms - if the email sent is actually received.

For any web developer that's ever had to build a signup routine, email is the necessary evil that takes pride of place among hated activities. Sure, a simple call to the language's mail library will send a message through, but the moment the boss wants a HTML email, or users need attachments, everything starts to get tricky.

They try to solve the mail return issue (it tells if the message has gone to the queue, not been delivered) with a little testing and Fakemail. The software looks for emails based on the configuration given and pulls them out to a local directory. Your script can then look here and check the validity of the message before its sent.

This even allows for integration with things like Phing, SimpleTest and Selenium.

0 comments voice your opinion now!
test unittest selenium simpletest phing email fakemail


Sebastian Bergmann's Blog:
RC2 Is The New RC1 (PHPUnit)
November 13, 2007 @ 10:24:00

Sebastian Bergmann has posted about the latest release of the popular unit testing framework for PHP, PHPUnit 3.2.

I have just released a second release candidate for PHPUnit 3.2, the next major version of the xUnit testing framework for PHP.

According to the Changelog, updates in this new Release Candidate include a number of updates to the software metrics that can be run on code (at project, file, function, class and method level), the addition of DbUnit, code coverage improvements, bug fixes to the TestUI test runner and Selenium integration and much more.

0 comments voice your opinion now!
phpunit unittest releasecandidate codecoverage software metric dbunit runner selenium phpunit unittest releasecandidate codecoverage software metric dbunit runner selenium


Sebastian Bergamnn's Blog:
SeleniumTestCase Improvements in PHPUnit 3.2
August 21, 2007 @ 07:56:00

Sebastian Bergamnn spotlights one of the features of the upcoming version of PHPUnit (a unit testing software suite for PHP) - the Selenium integration. Specifically, he looks at improvements made to the SeleniumTestCase extension.

Probably the most important improvement to SeleniumTestCase is the fact that you can now run each test using a set of browsers instead of just one browser. [...] Other improvements to SeleniumTestCase include more robust error handling and better error messages.

To illustrate the "run each test in multiple browsers" feature, Sebastian includes the code for a test that runs three times, once for three different types of browsers - IE, Safari, and Firefox.

0 comments voice your opinion now!
seleniumtestcase improvement phpunit unittest selenium multiple browser seleniumtestcase improvement phpunit unittest selenium multiple browser



Community Events





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


development podcast release custom series language framework api test interview symfony2 phpunit community conference unittest opinion application introduction manifesto package

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