Rajendra Narayan Mahapatra from Mindfire Solutions presented on Selenium automation frameworks. The presentation covered definitions of an automation framework, reasons for using one, and types including modular, data-driven, and hybrid frameworks. Code was provided for fetching test data from an Excel sheet in a data-driven framework. The agenda indicated frameworks would be defined and compared.
2. About Me :
Total Experience:- 3.5 years
Companies: Qualitree Solutions Pvt. Ltd.
PointCross.com Pvt. Ltd.
Certification:- Vskills(VS-1083) Selenium Certification
Skills :- Selenium RC, Selenium WebDriver, QTP, Manual
Testing,SQL
Presenter: Rajendra Narayan Mahapatra,
Mindfire Solutions
3. AGENDA / Topic INDEX
--> What is Automation Framework?
--> Why Automation Framework?
--> Types of Automation Famework
--> Modular Framework
--> DataDriven Framework
--> Hybrid Framework
Presenter: Rajendra Narayan Mahapatra,
Mindfire Solutions
4. -->What is Automation Framework?
A test automation framework is a set of
assumptions,concepts, and practices that provide support
for automated software testing.
So is a framework or methodology built to successfully
carry out test automation
Presenter: Rajendra Narayan Mahapatra,
Mindfire Solutions
5. Why Automation Framework?
1. To have control over the testcases to be executed.
2. To get Customized Test Execution Report.
3. For better maintenance of testdata and test objects
(Low Cost maintenance)
4. Comprehensive coverage against requiremrnts.
5. Execution of testcase with multiple sets of data.
Presenter: Rajendra Narayan Mahapatra,
Mindfire Solutions
7. Modular Framework
-----------------------------
modularity framework requires the creation of small,
independent scripts that represent modules, sections,
and functions of the application-under-test. These small
scripts are then used in a hierarchical fashion to construct
larger tests, realizing a particular test case.
It is almost similar to record and playback feature.
Presenter: Rajendra Narayan Mahapatra,
Mindfire Solutions
8. Data Driven Framework
--------------------------------
It facilitates reusability of a function or a test. Using
DataDriven a frame work you can write a method and use
it several times, It also enables you to run multiples sets
of data.
UserName Password
admin admin
Presenter: Rajendra Narayan Mahapatra,
Mindfire Solutions
9. Code For fetching data from excel sheet
-------------------------------------------------------
public String getCellData(String sheetName, String colName, int rowNum) throws
Exception{
String path = System.getProperty("user.dir");
System.out.println("Path :"+path);
try{
Workbook workbook = Workbook.getWorkbook(new
Presenter: Rajendra Narayan Mahapatra,
Mindfire Solutions
File(path+"testdatatestdata.xls"));
Sheet sheet = workbook.getSheet(sheetName);
int i=0;
int colNum;
for(i=0; i<sheet.getColumns(); i++){
if(sheet.getCell(i,0).getContents().equals(colName)){
break;
}
}
colNum = i;
Cell cell = sheet.getCell(colNum, rowNum);
String cellContents = cell.getContents();
System.out.println("CellContents="+cellContents);
return cellContents;
}catch(BiffException getCellDataException){
System.out.println("Error While fetching data from Excel
Sheet :"+getCellDataException.getMessage());
return "Fail :"+getCellDataException.getMessage();
}
}