Posts

Dataprovider: Excel reporting using selenium webdriver.

Class Name:- ExcelReporter.Java public class ExcelReporter { private static XSSFWorkbook workbook = null; private static XSSFSheet sheet = null; private static XSSFRow row = null; /*  * this method creates the header for reporter  */ static void createReportHeader(String testcaseSheetName) {     workbook = new XSSFWorkbook();     sheet = workbook.createSheet(testcaseSheetName);     row = sheet.createRow(0);     // row.createCell(0).setCellValue("SNo");     row.createCell(0).setCellValue("Step No");     row.createCell(1).setCellValue("Description");     row.createCell(2).setCellValue("Status"); } static void flushWorkbook(String testCaseName) throws IOException {     FileOutputStream fos = new FileOutputStream(new File(System.getProperty("user.dir")+"\\report\\"+testCaseName+".xlsx"));     work...

Dataprovider:- Getting data from excel sheet using Selenium Webdriver

Class Name:- DataInputProvider.java public class DataInputProvider { public static ArrayList<ArrayList<String>> getSheet(String dataSheetName, String SheetName) throws IOException{     ArrayList<ArrayList<String>> data = new ArrayList<ArrayList<String>>();     try {         FileInputStream fis = new FileInputStream(new File(System.getProperty("user.dir")+"\\data\\"+dataSheetName+".xlsx"));         XSSFWorkbook workbook = new XSSFWorkbook(fis);         XSSFSheet sheet = workbook.getSheet(SheetName);         // get the number of rows         int rowCount = sheet.getLastRowNum();         // get the number of columns         int columnCount = sheet.getRow(0).get...

Testing Interview Questions(Mobile and Web Applications)

1. Differentiate between QA and QC? QA:       It is process oriented       It involve in entire process of software development.       Prevention oriented. QC:      It is product oriented.      Work to examine the quality of product.      Deduction oriented. 2. What is a bug? A computer bug is an error, flaw, mistake, failure, or fault in a computer program that prevents it from working correctly or produces an incorrect result. 3. What is a test case? Test case is set of input values, execution preconditions, expected results and execution Post conditions, developed for a particular objective or test conditions, such as to exercise a particular program path or to verify compliance with a specific requirement. 4. What is the purpose of test plan in your project? Test plan document is prepared by the test lead, it con...