First blog post

This is my first blog regarding QTP(UFT) and Selenium for automation testing.

QTP(Quick Test Professional) or UFT(Unified Functional Testing) is a paid tool by HP. Selenium is an open source for automation. Any type of automation testing is first need to write test cases regarding your system application. After that you can make it.

QTP & Selenium frameworks are as follows:

  1. Data driven
  2. Linear
  3. Modular
  4. Keyword

QTP Overview:

For QTP you have to knowledge about VB script programming language. After that object repository,actions,recovery scenarios,event driven,functions etc. There are also add in plugins for QTP as per your requirement you can add it. For any web application you have to create a new project as GUI testing. And for web service or REST service you have to create a project as an API testing. In QTP you are easily doing end to end automation.There is also functionality for database automation. For database automation you must have ODBC driver in your system. To create database automation you have you create a new text file through notepad and as it blank save as a .ufl file. After that you see one pop up window on your screen and it saved where you create that one text file. After that open that file and do changes as per the requirement. This is all regarding QTP.

Selenium Overview:

For Selenium you have to knowledge about Java programming language. In selenium you can use jmeter or TestNg framework for automation. Prerequisite for selenium automation testing are selenium jar files,TestNg jar files. First of all you have to install TestNg in eclipse through Eclipse Market place or from software update context menu. If you want to run selenium automation in Firefox browser then there is no need for driver file but if you want to run it in IE or Google Chrome then you have to install first there driver.exe file then give that driver path as a “system.getproperty”. In selenium automation testing you can access the element by id,name and xpath. If you want to take a value from excel then you need jxl jar files for .xls and for .xlsx file you need Apache poi jar files.

To create dependency and which method has to execute it can be done as follows:

@Test(dependsOnMethods=”cmstest”,enabled=true,dataProviderClass=DataProvide.class,dataProvider=”upload_cust_req”)

To provide data from excel do as follows:

@DataProvider(name=”upload_cust_req”)
public static Object [][] uploadcustomerrequest() throws Exception
{
File filepath = new File(“qtp\\qtp.xls”);
Workbook wb= Workbook.getWorkbook(filepath);
Sheet sheet = wb.getSheet(“upload_cust_req”);

int row= sheet.getRows();
int column = sheet.getColumns();
String Inputdata[] [] = new String[row][column];
for (int i=1;i<row;i++)
{
for (int j=0;j<column;j++)
{ Cell cell = sheet.getCell(j,i);
Inputdata[i][j]=cell.getContents();
}
}
return Inputdata;}

So this is all about overview regarding Selenium and QTP.

Leave a comment