Google Search

Saturday, September 13, 2014

Sample Java Codes - Part 6

Code 34: Composition


Code a:


public class Test{
public static void main(String args[]){
Class3 Class3Object = new Class3(4,5,6);

}
}

Monday, August 25, 2014

Sample Java Codes - Part 5

Code 29: Time Class


Code a:


public class Test{
public static void main(String args[]){
Class2 Class2Object = new Class2();
System.out.println(Class2Object.toMilitary());
Class2Object.getTime(3, 59, 9);
System.out.println(Class2Object.toMilitary());

}
}

Wednesday, August 20, 2014

Sample Java Codes - Part 4

Code 13: Conditional Parameters


import java.util.Scanner;
public class Test{
public static void main(String args[]){
Scanner iage = new Scanner(System.in);
System.out.println("Hey ! Lets decide if you ae over or under a certain age");
int age = iage.nextInt();
System.out.println(age>50?"You ae over 50": "You ae under 50");
}
}

Friday, August 15, 2014

Test Planning Flow

Find below the flow diagram for Test Planning

Test Planning Flow

Defect management Flow

Defect management is essential part of Software Test Life Cycle (STLC), and it is essential to follow the Defect Management Flow. Here is the flow diagram for the same.

Defect Management Flow

Thursday, August 14, 2014

Sample Java Codes - Part 3

Code 9: Many Methods & Instances


Code a:

import java.util.Scanner;
public class Test{
public static void main(String args[]){
Class2 Class2obj = new Class2();
Scanner input = new Scanner(System.in);
System.out.println("Enter your name");
String name = input.nextLine();
Class2obj.setName(name);
Class2obj.message();
}
}

Sunday, August 10, 2014

Sample Java Codes- Part 2

Code 5: Switch case examples


import java.util.Scanner;

public class Test{
public static void main (String args[]){
System.out.println("Program to depict usage of switch case");
Scanner iage = new Scanner(System.in);
System.out.println("Enter age now:");
int age = iage.nextInt();
switch(age) {
case 1:
System.out.println("Kid can crawl");
break;
case 2:
System.out.println("Kid can walk");
break;
case 3:
System.out.println("Kid can talk");
break;
default :
System.out.println("Kid is a trouble! Send him School");
break;
}

}
}

Friday, July 25, 2014

Sample Java Codes - Part 1

Code 1: Hello World


class hello{
public static void main (String args[]){
System.out.println("Hello World");
}
}

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.