Sunday 17 May 2015

How to copy Emailable_Report for each instance in TestNg Framework



If we need to copy and paste for each instance then we need to add below code in our framework

We should add this code in @AfterTest Annotation section

 @AfterTest
  public void aftertest() throws IOException
  {
 driver1.close();
 Date dat1=new Date();
 SimpleDateFormat sdf=new SimpleDateFormat("ddMMyyy'_'hh.mm.ss");
 File Source1= new File(System.getProperty("user.dir")+"\\test-output\\emailable-report.html");
 String str=sdf.format(dat1);
 File Destination=new File(System.getProperty("user.dir")+"\\emailable-report_"+str+".html");
 FileUtils.copyFile(Source1, Destination);
 System.out.println(sdf.format(dat1));

  }

Saturday 16 May 2015

How to identify eclipse 32 bit or 64 bit installed in our system



Method 1

-> Open the task Manager

-> For 32 bit : Its run as eclipse.exe *32 in task manager

-> For 64 bit : Its run as eclipse.exe in task manager


Method 2

-> Verify eclips.ini file . Configuration Settings file in eclips installed folder.

-> Check the 4rd line,
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.0.v20100503

-> For 32 bit : Its contains only x86_1

-> For 64 bit : Its contains x86_64_1

Above line from 64 bit

How to identify jdk 32 bit or 64 bit installed our system



Method 1:

-> For 32 bit : jdk or jre installed in below location

C:\Program Files (x86)Java


-> For 64 bit : jdk or jre installed in below location

C:\Program Files\Java




Method 2

-> Open the task Manager

-> For 32 bit : Its run as javaw.exe *32 in task manager

-> For 64 bit : Its run as javaw.exe in task manager