Tag Archives: selenium

Selenium XML Data driven testing… sounds harder than it is.

15 Sep

Selenium is a tool which every tester is using because it is:

  • Open Source
  • Runs multiple tests at a time
  • Supports all browsers like IE, Firefox, Mozilla, Safari
  • Supports all programming languages Ruby,C#, Java and Python.
  • Supports all Operating Systems

Data driven testing means we can run the same test multiple times with different data from an external data XML file instead of using the same hard-coded values each time the test runs

Selenium IDE is a Firefox plugin to record the users use of the browser for testing purposes, by installing the browser extension Sel Blocks, we are able to do Data driven tests

A – To install Selenium IDE
1, Download the latest Selenium IDE version
2, Install the Add-on
3, Restart Firefox
4, From the Firefox application, select Tools then Select Selenium-IDE

Next to do XML data driven testing we need to install SelBlocks

B – To Install SelBlocks
1, Download the latest Selenium SelBlocks version.
2, Install the Add-on
3, Restart Firefox
4, From the Firefox application, select Tools then Select Selenium-IDE

To Do XML Data driven testing, we need to create an XML file, a file with one record would look a bit like this

Example 1:
<vars Email=”Make_This_Unique@gmail.com” firstname=”First1″ lastname=”LastName1″ password=”123456″ rpassword=”12345″ npassword=”12345cc”/>

Parameterised data source:


C – Create the directory: ’01 Selenium’ on the C drive of your computer

D – Save the following files to the directory called ‘C:\01 Selenium’ on your computer

A, Test.xml
B, Create_Account.HTML

Please Note:

Each time you run this test, you must edit and update the Test.xml file with a unique email address for your test run

Parameterised data displayed in the Selenium IDE

Parameter_DataXE – To run the script:

1, Launch Firefox

2, Launch Selenium IDE

3, Open the Test Case ‘Create_Account’ in ‘C:\01 Selenium’

4, Run the Test Case ‘Create_Account’

Whats happening when you run this?
1, The script is creating an account for every entry in the XML file for a demo shopping site

2, ‘forXml’ command in the script is used to set the target of the XML file’s path. The script ends by adding ‘endForXml’, both these command are provided from the SelBlock Add-on.

3, The variable in test data file is caled by using ‘${VARIABLE}’ in the syntax.

4, When this test is executed, Sel Blocks loads the content of XML file in memory and executes the script for number of times <vars> element present in the XML file.

5, In this example it will execute the test twice. Once you see it working, it is easy to copy and paste more data to be created

6, For all the attributes mentioned in <vars> element, Sel Blocks create internal variables that we can substitute as Selenium command parameters.

Selenium Log:

Selenium log

F – To do:
1, Analyze the Selenium IDE Log tab for the results.
2, If the expected data and actual data do not match, an error is reported in the Selenium IDE Log tab.

I hope this helps some people get started with some data driven tests, until the next time

My life in software collaboration has begun

17 Nov

Meet my new MacBook

Hello people, this is my first post, first of many i will be making in the exciting world of crowdsourcing and collaboration software

One of interesting aspects of software testing is the network meeting’s, a few weeks ago i attended one such meet ups on Load testing by Scott Barber at the Google offices.

After the meeting, i got to chatting to the testing and i learnt a few things which i will share with you here.

1, One woman i met from Europe told me she did not think she stood much of a chance applying through sites like Seek.com.au, instead she would go knock on software companies doors, ask for the HR manager and physically give them her CV.
i did this once in Dublin and i got a job offer from it, the guy smoking a cigarette at the door was the boss and he was hugely impressed someone would go knocking on doors in the age of Information technology.

2, She told me if you apply for jobs the way everybody else applies for jobs, you are one of 200 people a recruitment person is viewing, you need to stand out from the crowd.
3, With the $$ cost of hiring, job hunters applying through sites like LinkedIn are preferred, on liked in it’s pretty clear how much experience you have, they can see who you know, groups you’re a part of, if you have a good reputation, it’s obvious.
After all the knocking on doors, the woman i met got a job through a person she met at a networking event, she told me she wouldn’t have stood a chance on seek.

4, Another woman i met told me she was getting Selenium Automation experience by volunteering for various Firefox (Mozilla) projects, she was using this tool with her MacBook

5, It seems, from what i can see it’s not really good enough to be ‘good enough’, you need to be a stand out from the crowd person

All of this, for me is very inspirational, and now i have purchased a MacBook to participate in the world of crowdsourcing and software collaboration, contributing to the lives of others, while developing my own skills in areas like Selenium Automation.

What appeals to me about writing about this is i am coming from knowing almost nothing, like when i went to buy the MacBook from the people at Microseconds, the main requirement was that i could install and use the Selenium Automation tool, not the easiest or helpful installation process devised by man.

But i did get to know Hugh from Wales, the helpful sales man, it was his first introduction to Selenium Automation, and i think he would rather leave it to me.

So people, this is the start and it’s going to continue and i will be recording my experiences, trials and tribulations with crowdsourcing and software collaboration projects

%d bloggers like this: