 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
DZone.com: PHPUnit_Selenium
by Chris Cornutt 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.
voice your opinion now!
phpunit selenium install unittest tutorial example select interact
DZone.com: Open/Closed Principle on real world code
by Chris Cornutt 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).
voice your opinion now!
open closed principle solid design command phpunit selenium
DZone.com: Selenium 2 from PHP code
by Chris Cornutt 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.
voice your opinion now!
selenium frontend test integrate phpunit webdriver
Till Klampaeckel's Blog: Selenium vs. Saucelenium
by Chris Cornutt 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.
voice your opinion now!
selenium saucelenium unittest interface frontend install readme
Web Builder Zone: The different kinds of testing
by Chris Cornutt 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.
voice your opinion now!
testing application automated phpunit selenium
Sameer Borate's Blog: Selenium IDE Tutorial - Part 2
by Chris Cornutt 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.
voice your opinion now!
selenium ide phpunit ide tutorial delicious search results
Developer Tutorials Blog: Testing email routines in web applications
by Chris Cornutt 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.
voice your opinion now!
test unittest selenium simpletest phing email fakemail
Sebastian Bergmann's Blog: RC2 Is The New RC1 (PHPUnit)
by Chris Cornutt 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.
voice your opinion now!
phpunit unittest releasecandidate codecoverage software metric dbunit runner selenium phpunit unittest releasecandidate codecoverage software metric dbunit runner selenium
|
Community Events
Don't see your event here? Let us know!
|