 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Michelangelo van Dam: UA Testing with Selenium and PHPUnit
by Chris Cornutt May 24, 2013 @ 10:18:40
In this new post to his site Michaelangelo van Dam looks at user acceptance testing with PHPUnit and Selenium.
Last week I spoke at php[tek] 2013 where I explained to people how to get started with Selenium IDE to record user interaction with the web interface, convert them to PHPUnit testcases and automatically execute them on multiple browsers on multiple platforms. The twitter I also received a bunch of questions regarding how to set up multiple platforms and why I used Windows in my presentation to deploy to. So today I deceided it was time to write a full article on this subject.
He introduces Selenium and what kinds of things it can be used to test. He also defines "user acceptance testing" and talks about why they're an important part of the testing ecosystem. He then walks you through the process of getting the testing environment set up, creating a few tests and how to convert them over to PHPUnit tests (using a built-in tool). Screencasts show you each step of the way. He includes a little tweaking you'll need to do to to the test code to get it working with your own Selenium server
voice your opinion now!
useracceptance testing phpunit selenium introduction
Shashikant Jagtap's Blog: Enjoy 'MinkExtension' for Behat
by Chris Cornutt May 08, 2012 @ 10:55:55
In this new post to his blog Shashikant Jagtap talks about a new extension for Behat (the BDD testing tool) that makes working with Mink even easier - MinkExtension.
'MinkExtension' has been just released which has additional services for Behat. This extension has 'Mink' instance for your 'FeatureContext' and 'SubContext'. UI testers would be happy now, as they don't need to create Mink instance every time in order to use Mink API's.
He points you to an example application you can use to follow along. He includes the commands needed to install the dependencies via Composer and get this extension working (note: it requires PHP 5.4 for some of the traits stuff. If you don't want to use that, comment out the "TraitedFeatureContext.php" file). Also included are the commands to execute the tests with a Selenium server and a list of a few handy new things this extension enables.
voice your opinion now!
minkextension mink behat bdd testing frontend selenium
DZone.com: Selenium on Android
by Chris Cornutt April 18, 2012 @ 12:43:04
On DZone.com there's a recent post from Giorgio Sironi looking at running Selenium tests on the Android platform via the PHPUnit Selenium interface.
Testing web applications is not only based on unit and functional tests for the server-side (PHP, Java) and client-side (JavaScript) components, but also on end-to-end tests like the ones performed with Selenium. Selenium is capable of driving a real browser like Firefox in the same way a user would do, letting you express a test with a series of page to load, element selections, clicks and typed characters. [...] In this tutorial, we'll experiment with the Android Driver and set up a couple of tests to run inside an Android virtual device.
He walks you through the basic setup of an Android environment (based on the Android SDK) and how to start up the Android driver installed from the Selenium site. An example test is included, showing how to make a request for a test page and checking its title as well as checking that the input from the "keyboard" is successful.
voice your opinion now!
selenium android phpunit webdriver sdk
DZone.com: The Page Object pattern
by Chris Cornutt April 10, 2012 @ 09:05:39
On DZone.com today there's a new tutorial from Giorgia Sironi giving an example of working with the PageObject pattern and how it's implemented to help with testing in the PHPUnit_Selenium plugin.
In the realm of acceptance testing, a possibility for hooking into the application and exercising it end-to-end is to work through a user interface, which nowadays is in more and more cases web-based. The Page Object pattern is a way to model pages (intended as screens) of a web application as independent objects, and give them several responsibilities.
The pattern sets up the resources to let you make queries against the page's contents, interacting with elements on the page, running common assertions on the contents and moving around on the site. He gives a more practical example of it in action (again, using PHPUnit_Selenium) to test a login page and evaluate a successful login.
voice your opinion now!
pageobject designpattern phpunit selenium unittest tutorial
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
|
Community Events
Don't see your event here? Let us know!
|