Visit the Joomla! 1.5 demo site to see my extensions live running




/ 0
The quickest way to learn Selenium is via a Firefox plugin called Selenium IDE. It is quite compelling
for developing tests in and quickly trying out Selenium before choosing Selenium for your project.
There are two modes of operation for Selenium - Core and Remote Control (RC). Remote Control
mode also has a related capability called Selenium Grid that allows you to throw hardware at tests
to make it all faster.
This tools is able to:
Selenium is made of 3 components:
Also don't use Selenium for load testing web applications!, use Apache JMETER instead. Attention Selenium
has some issues when he has to work on 2 windows at the same time (pop -up).
Today let just try Selenium IDE
To make it work with Joomla!, or with any other web applications, just install the Firefox plugins, and start
it by going to the tools menu of Firefox.
Lets say that we want to test the contact page of my site for proper operations...In Firefox, go to the menu Tools
This will open a floating windows, which let you define a script step by step in the windows Script
You may come with a test case similar to the one presented here:
The number of commands is huge, but well documented in the tab reference (B)
The base URL is my site (http://www.waltercedric.com), the test case, open the contact page, check the
title of the page, enter some values in form, check for button and texts and submit the form.
The menu
let you run the test by clicking on
you can see the
result, if everything is green then the test has succeed.
and you see every step of the test case in the browser windows:
As you see it is quite easy to develop a script to test a page, test can be saved on disk in different format,
so you can execute them in Selenium Core
So the test developed for testing the contact page of Joomla! now look like:
1: package com.example.tests; 2: 3: import com.thoughtworks.selenium.*; 4: import java.util.regex.Pattern; 5: 6: public class NewTest extends SeleneseTestCase {
7: public void setUp() throws Exception {
8: setUp("http://www.waltercedric.com/", "*chrome");
9: } 10: public void testNew() throws Exception {
2: 0 2: 1 2: 2 2: 3 2: 4 2: 5 2: 6 2: 7 2: 8 2: 9 3: import com.thoughtworks.selenium.*;0 3: import com.thoughtworks.selenium.*;1 Or better in PHP so you can reuse it in XINC continuous integration server (more to come on XINC in a future article)
3: import com.thoughtworks.selenium.*;2 3: import com.thoughtworks.selenium.*;3 3: import com.thoughtworks.selenium.*;4 3: import com.thoughtworks.selenium.*;5 3: import com.thoughtworks.selenium.*;6 3: import com.thoughtworks.selenium.*;7 3: import com.thoughtworks.selenium.*;8 3: import com.thoughtworks.selenium.*;9 4: import java.util.regex.Pattern;0 4: import java.util.regex.Pattern;1 4: import java.util.regex.Pattern;2 4: import java.util.regex.Pattern;3 4: import java.util.regex.Pattern;4 4: import java.util.regex.Pattern;5 4: import java.util.regex.Pattern;6 4: import java.util.regex.Pattern;7 4: import java.util.regex.Pattern;8 4: import java.util.regex.Pattern;9 5: 0 5: 1 5: 2 5: 3 5: 4 5: 5 5: 6 5: 7 5: 8 5: 9 6: public class NewTest extends SeleneseTestCase {0
6: public class NewTest extends SeleneseTestCase {1
6: public class NewTest extends SeleneseTestCase {2
6: public class NewTest extends SeleneseTestCase {3
6: public class NewTest extends SeleneseTestCase {4
6: public class NewTest extends SeleneseTestCase {5
6: public class NewTest extends SeleneseTestCase {6
As soon as You have a set of tests, this can form a Test Suite.
SecurityImages for Joomla create Captcha, so it is quite difficult for a tool to pass the Turin test
(aka recognize the scrambled images), this point apart, I am now developing testcases to test the
admin backend, frontend Joomla! patches. These test will be available in the component itself, so
anybody can run them with little efforts.
Read more at:
Privacy Statement | Copyright Notice | Licenses
1999-2011 Cedric Walter - All Rights Reserved

