How to do Data-Driven Automation Testing by Selenium IDE without programming?
In this article, we will discuss how to use Selenium IDE to achieve data-driven automation testing In 3-step.
Testing Scenario
you have a website here: https://www.directpass.com/signin
There is sigin page. We would like to test the signin with all various kinds of ID/PWD which defined in XML or TEXT file.
How can we achieve it?
Step 1: installation of FireFox, Selenium IDE, “SelBlocks”
To install the selenium IDE, you will require FireFox browser.
Selenium IDE can be installed from here.
http://docs.seleniumhq.org/projects/ide/
“Sel-blocks” can be downloaded here.
The add-on will provide the selenium IDE the capability to read XML and do data-driven testing.
https://addons.mozilla.org/en-us/firefox/addon/selenium-ide-sel-blocks/
Step 2: Define Testing Data in XML
Prepare XML file. In this example, let’s named it “DP_Sign.xml”
There are five different accounts to be tested here. gmail1~gmail5.
<testdata><vars Account=”qamail1@gmail.com” Password=”12345678″/><vars Account=”qamail2@gmail.com” Password=”12345678″/><vars Account=”qamail3@gmail.com” Password=”12345678″/>
<vars Account=”qamail4@gmail.com” Password=”12345678″/> <vars Account=”qamail5@gmail.com” Password=”12345678″/> </testdata> |
Step 3: Define Testing Data in XML
Input the following command in the Selenium IDE. Then, Once execution, selenium IDE will automate the input of various accouint/password defined in the XML file.
Execution
Once it’s executed, it will repeated do the testing with all the data defined in XML.