Development of PDF Comparison API is completed


Hello every body just completed development on API

you can donwload code from this link : https://sourceforge.net/projects/pdfcomaprisionjini/files/

Before Using this API in eclipse Project Create Following Folders

1. Differences

2. JPGPDF1

3. JPGPDF2

4. pdf1Images

5. pdf2Images

Example Usage

pdfComparison cmp=new pdfComparison();

//Text Comparison if(cmp.textComparision(“PDF1 path”,”PDF2 path”))

{

System.out.print(“\n**PDF text is identical* “);

  }
  else 
  {
      System.out.print("\n********PDF text is  not identical******* ");

  }
//will extract all images used in pages content and then copy differnce in differences folder
    cmp.extract_ALL_Images_ThenCompare("PDF1 path","PDF2 path");
    cmp.PDF_Convert_To_Jpeg_Comparision("PDF1 path","PDF2 path");
//will compare every page text
cmp.textComparision(String file1,String file2)
 //will convert every page into JPEG and then compare difference is saved in Differences Folder in project 
  cmp.PDF_Convert_To_Jpeg_Comparision();
}
Advertisements

Common Mistakes in Logged Bugs by Tester regarding a mobile phone app


While writing the defect report, it is also important that proper terms and terminologies must be used so that both the developer and the reporter have same understanding of the defect.
Image result for mistakes
Enlisted are a few common mistakes (along with their solutions) that are made while writing defect report.
  • Never write ‘click’ in the defect report of a mobile application. Instead write ‘Tap/Double Tap’ as these are the correct terms
          Image result for Tap on screen
  • A mobile application has ‘screens’ and not ‘pages’. Never use the term ‘page’ in the defect report of a mobile application as only web applications have ‘pages’.
         
  • The ‘keyboard’ that only contains numeric values is called ‘Keypad’. If this ‘Keypad’ is used for dialing numbers, it will be referred to as ‘Dial pad’. So always use the specific terms while reporting the defect.
          Image result for keyboard vs keypad
  • There are two screen views. i) Landscape, ii) Portrait. Used these terms instead of writing ‘horizontal screen’ and ‘vertical screen’ for Landscape and Portrait respectively.
          Image result for Landscape view mobile
  • ‘Drag n Drop’ is a term that is used for web applications. For mobile application, ‘slide to rearrange’ must be used.
          Image result for Drag and drop android
  • ‘Slide’ or ‘Swap/Swipe’ must be used when moving down the application screen instead of ‘scroll’.
  • Particularly in iPhone, there is a three line button on top which is used to show/hide side menu. This button is called ‘hamburger’ button. While writing the defect report, it is mostly referred to as ‘menu icon’ or ‘side menu button’.
         Image result for hamburger button Iphone 4
  • The use of the following terms will also make it easy for the dev to understand the defects properly.
  • Tap: Opens or launches whatever you tap.
  • Double Tap: Zooms in or out in stages.
  • Pan: Moves through screens or menus at a controlled rate.
  • Flick: Scrolls rapidly through menus or pages or moves sideways in hubs.
  • Pinch: Zooms gradually out of a website, map or picture.
  • Stretch: Zooms gradually in a website, map or picture.
  • Rotate: Move a picture or other item(s) on the screen in a circular direction (clockwise or counter-clockwise)

Using SIKULI API with Selenium Web driver for image based recognition


Sikuli API for Java provides image-based GUI automation functionalities to Java programmers. It is created and will be actively maintained bySikuli Lab. The effort of making this API is a response to the desire of many Sikuli users to use Sikuli Script’s functionalities directly in their Java programs, rather than writing Jython scripts. This new Java library has a re-designed API and includes several new functions that were not available in the original Sikuli Script, such as the abilities to match colors, handle events, and find geometric patterns such as rectangular buttons.

You can also download this eclipse project from :
https://drive.google.com/file/d/0B09BIsDTY_AuYVB4ZjJNM3h0ZlE/view?usp=sharing

Steps:
  1. Open Eclipse IDE
  2. Create a new Project
  3. Download Selenium Bindings
  4. Download Sukuli JAR
  5. Right click on you project
  6. Open New>Class


  1. Right click on you project

  1. Open Build Path>Configure Build Path


  1. Open Libraries Tab
  1. Click add External Jars button
  2. Add Following Imports
import java.io.File;
import java.util.concurrent.TimeUnit;


import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.NoAlertPresentException;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.sikuli.api.*;
import org.sikuli.api.robot.Mouse;
import org.sikuli.api.robot.desktop.DesktopMouse;


  1. Add Selenium and Java Bindings
  2. Paste Following code in Your Class


   @BeforeClass
   public static void setUp() throws Exception {
       wd = new FirefoxDriver();
       wd.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
  }
   
   @Test
   public void TestCase1() throws InterruptedException {
   
   }
   
   @After
   public void tearDown() {
       wd.quit();
   }
   
   public static boolean isAlertPresent(FirefoxDriver wd) {
       try {
           wd.switchTo().alert();
           return true;
       } catch (NoAlertPresentException e) {
           return false;
       }
  }
  1. Open Flash Calculator Link in Browser “http://www.terrence.com/flash/calculator.html “
  1. Take small images of required number and operations like 1.png,2.png , equal.png and multiply.png etc. you can use snipping tool utility for this purpose its pre-installed in Win 7 or greater
Like These


  1. Now Create  function which takes path of image as string and click on that image
Code is:
public void click_Image(String img)
{
s = new DesktopScreenRegion();
target = new ImageTarget(new File(img));
r = s.find(target);


// Create a mouse object
mouse = new DesktopMouse();
// Use the mouse object to click on the center of the target region
mouse.click(r.getCenter());
}


  1. Now add Following code in your test case first navigate to URL by web driver and then click by images which you created example code is
 @Test
   public void register() throws InterruptedException {
    click_Image(“IMG\\1.png”);
    click_Image(“IMG\.png”);
    click_Image(“IMG\\plus.png”);
    click_Image(“IMG\\2.png”);
    click_Image(“IMG\\equal.png”);
   }


Your final code would be:


import java.io.File;
import java.util.concurrent.TimeUnit;


import org.junit.After;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.NoAlertPresentException;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.sikuli.api.*;
import org.sikuli.api.robot.Mouse;
import org.sikuli.api.robot.desktop.DesktopMouse;


public class testAutomation {
public static FirefoxDriver wd;


ScreenRegion s;
Target target ;
ScreenRegion r;


// Create a mouse object
Mouse mouse ;


public void click_Image(String img)
{
s = new DesktopScreenRegion();
target = new ImageTarget(new File(img));
r = s.find(target);


// Create a mouse object
mouse = new DesktopMouse();
// Use the mouse object to click on the center of the target region
mouse.click(r.getCenter());
}
   @BeforeClass
   public static void setUp() throws Exception {
       wd = new FirefoxDriver();
       wd.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);
   }
   
   @Test
   public void register() throws InterruptedException {
    click_Image(“IMG\\1.png”);
    click_Image(“IMG\.png”);
    click_Image(“IMG\\plus.png”);
    click_Image(“IMG\\2.png”);
    click_Image(“IMG\\equal.png”);
   }
   
   @After
   public void tearDown() {
       wd.quit();
   }
   
   public static boolean isAlertPresent(FirefoxDriver wd) {
       try {
           wd.switchTo().alert();
           return true;
       } catch (NoAlertPresentException e) {
           return false;
       }
   }


}

Points to be kept in mind when testing web services


testing a web service is bit boring because its not having any UI Interface but it can be exciting when you are able to find exciting bugs :

There are some common mistakes by dev side that must be kept in mind i have compiled following few point which a tester must keep in his mind .

1. There must be strong validation when a request is submitted to server . Try to input mall ware inputs like SQL injection scripts . Mostly it is observed that we-services are not having data validation when request is submitted so it becomes prone SQL injection and other hacking techniques

2. In case you see a web service that will be used commonly and will be flooded by users never hesitate to perform a load test.
Image result for software Load Test

3. Ensure by inspecting code that there is none such response in which system errors are sent to end users.

How can a testing team improve its reputation in a firm where its new and at initial stages


For testing team to become as important for management as they consider dev team is a tough ask but it is possible and I would like to share my experience what I did to grow reputation of my team.
I compiled following things:
1. Always tell about your work and its benefits effectively.
Image result for speak loud

Testing team must be a good communicator. Logging bugs in bug management tool is not enough you must email a comprehensive report in which quality of your work must be shown. So that when someone from management in CC views that work he has an idea how much work testing team has done they don’t have time to see bugs in management tool. So it’s always better to create a summary report in email when task is completed. Other examples can be like you automated some test cases now it’s on you to tell benefits of it like how much time it’s saving how much percentage of efficiency it will increase be a good communicator and learn to portrait your work in better way.
2.   Be innovative.
Image result for innovation

What I mean by being innovative is introduce new things which are not yet used in organization
Like:
·         Introducing new tools
·         Introducing automation testing
·         Introducing Load Performance testing
You will find many new things which you can introduce in your organization but remember one thing before introducing any new thing do proper homework regarding benefits of that tool or technique.
3.   Try to figure out repetitive bottle necks in organization process that effects quality.
Image result for issues in process

This is something which you will get figured after working for some time in a company you will see a flaw in process that are causing major issues e.g there is no unit testing at dev side when handing over release to test team identify such issues and suggest improvements in product.

4.       Must be Functional domain expert when it comes to about knowledge regarding firm’s products and domains in which they work.

Image result for Domain expert

What I mean by this is testing team is functionally more involved In product feature even more then BA or product owner. So don’t keep this knowledge inside you when there is a meeting regarding product in front of management speak and express your knowledge so that everybody knows you guys are domain experts.

For any Newbie eager to learn coded UI


You guys can check links mentioned below to have an overview of automation in coded UI . These links will help you better understand coded UI.
I also urge you guys to follow following blogs regarding MS Coded UI .
If you don’t have previous exposure of .net C# I urge you guys to first have a look at turtorial mentioned below
beside This knowledge of Nunit is also copulsery but not required in so much details basic is enough . I suggest to go through the link mentioned below

Why its important for software test engineer to not just stick to manual testing


Manual testing is good for starting things but to me limiting your skills just in this domain is not a wise choice .

Reasons for that are :

  1. To excel in IT continuous learning is must thing .
  2. Automation Load and security testing are disciplines of STE domain if you wont learn some one else will and you will be behind them when competing for a job .
  3. To grow your  importance in team you must possess more and more skills just being a manual tester means you have only one skill. 
  4. A time will come when you and a guy which was your junior would mean same to management when you both are simple manual testers . 
  5. Larger you will have skill set in your armory larger will you have reputation in market.
At last i would say don’t just sit behind don’t back your self from these skills simply try again and gain one day you will be an expert in these skills too . Happy learning 🙂

Reasons why we should avoid recorder generated automation frame works


If using recorder generated scripts just for learning commands in tools then its ok but if you are trying to automate large not test of application using recorder then you are making a mistake.

Reasons why recorder generated automated scripts are not useful.
  1. Too much extra useless code is generated in un-manged fashion . 
  2. Code is too much Fuzzy . 
  3. Updation is difficult.
  4. When no of test case increase a time will come when you wont be able to manage anything .
There fore my preference is hand coding reasons for that are : 
  1. You can create Automation frame work in some order managed way.
  2. You can customize scripts to any level.
  3. Scripts are efficient as there are less useless lines of code .
  4. Re-usability of scripts.
There are many more  reasons for choosing hand coding . What i want to tell is for learning using recorder is ok but don’t just stick to it .