Google Search

Sunday, February 23, 2014

Links to some really good articles

Below are some really nice links for the Software Professionals:

1. Real Agile Approach to Performance Testing:

http://www.ministryoftesting.com/2014/02/real-agile-approach-performance-testing/

2. Good websites to learn new technologies:

a) https://www.coursera.org/
b) http://thenewboston.org/

Will Add more as I come across some...

Sample Code to Read data from Excel File !

Below is the sample code to read data from excel file, which i used for Selenium Automation (Selenium WebDriver)

// Code Starts here //

package mentor.qa.selenium;

import java.io.*;

import org.apache.poi.hssf.usermodel.HSSFCell;
import org.apache.poi.hssf.usermodel.HSSFRow;
import org.apache.poi.hssf.usermodel.HSSFSheet;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;


public class ExcelRead {

public static void main (String args[]) throws Exception {

File excel = new File("F:\\Selenium\\data1.xls");
FileInputStream fis = new FileInputStream(excel);


HSSFWorkbook wb = new HSSFWorkbook(fis);
HSSFSheet ws = wb.getSheet("Input");

int rowNum = ws.getLastRowNum()+1;
int colNum = ws.getRow(0).getLastCellNum();

String[][] data  = new String[rowNum][colNum];

for (int i = 0 ; i<rowNum; i++){
HSSFRow row = ws.getRow(i);

for (int j=0;j<colNum;j++){
HSSFCell cell = row.getCell(j);
String value = cellToString(cell);
data[i][j] = value;
System.out.println("Value at position [" +i +"] [" +j +"]is " +value) ;

}

// System.out.println("Value at position [" +i +"] is " +data[i][j]) ;
}

}

public static String cellToString(HSSFCell cell) {

int type ;
Object result ;
type = cell.getCellType() ;

switch (type) {

case 0 : // numeric value in Excel
result = cell.getNumericCellValue() ;
  break ;
case 1 : // String Value in Excel
result = cell.getStringCellValue() ;
break ;
default :
throw new RuntimeException("There are no support for this type of cell") ;
}

return result.toString() ;
}
}

Monday, February 17, 2014

Still interested in Flappy bird ??

If you missed to download the Internet hyped game FLAPPY BIRD, which has been removed from App Store / Play Store. Worry No more. Android to the rescue !!

Just navigate to  below link and download the apk file.

Friday, February 14, 2014

What is a Zombie process?

A zombie process is a process that has completed execution but still has an entry in process table. This entry is required by the parent process  to read exit status of  of its child's process.

This in reference to UNIX or UNIX like OS.