Subscribe by Email


Showing posts with label Image. Show all posts
Showing posts with label Image. Show all posts

Saturday, October 27, 2012

How to fix the bitmap that failed to stabilize error?


It may happen that the bitmap might fail to stabilize the error in silk test. It is quite a frequently occurring problem but needs to be addressed seriously. 
Most of the times you might have been asked for or required creating a test case that can be straight-forward put to use in carrying out the bitmap verification. 
You set down to create such a test case and go for the verification of the full window while the recording is in progress. 
During the execution of the test case all of a sudden you get an error as stated below:
“Error: bitmap failed to stabilize”

Finding such an error can even be a nightmare for you and sometimes the whole quality assurance team may fail to think of a solution for this. You won’t even find solution for this in the silk test documentation. 

- There are situations that the bitmap issue might be stated in a described state.
- It is only when there is some instability in the verified windows that is to say that some element of the screen is experiencing frequent changes. 
- In such a situation, the stable copy of the bitmap is captured by the silk test automation tool. 
- If in case it could not get the window tested within a specific time interval, then it generates an exception saying “E _ BITMAP _ NOT _ STABLE”.
- Different approaches to such a situation might be used by the different quality assurance engineers. 
- You need to set the below mentioned options to 0 in the 4test code:
Agent. Set option ( OPT _ BITMAP _ MATCH _ COUNT, 0 )
Agent. Set option ( OPT _ BITMAP _ MATCH _ TIME OUT, 0 )
Agent. Set option ( OPT _ BITMAP _ MATCH _ INTERVAL, 0 )

- Another way of doing this is going to the options menu, then agent, then bitmap and change the required values. 
- Another error occurs while capturing image via the capture bitmap method. 
- In some cases when this method was executed the silk test was observed giving the following error:
“bitmap region size (some coordinate) is not valid”

- In such a case the getrect method can be used for obtaining the coordinates of the bitmap. 
- The getrect method returns the following:
  1. X coordinate of the active bitmap
  2. Y coordinate of the active bit map
  3. Width of the active image
  4. Height of the active image
- For capturing an image, one requires two coordinates of the image i.e., (x1, y1) and (x2, y2).
- Here the coordinates correspond as follow:
1. First co-ordinate is for the top left corner of the image whereas
2. The second coordinate points to the right bottom corner of the image. 

- You can even take help of the identify object feature of the silk test workbench for discovering these coordinates. 
- To avoid these errors it is necessary that you fix the screen resolution in the first go itself i.e., using the first script itself using the following function:
Maximize()
- Once this function has been implemented, and then you should go for capturing the screen shot. 
- If this is not done then there are chances that the screen size may keep on changing i.e., it may expand or shrink according to the settings that you made for the previous scripts. 
- This may also cause the coordinates to shift on the screen which may cause the script to capture something else than what was expected. 
- However, the getrect method can return both absolute as well as the relative methods. 


Thursday, October 4, 2012

Explain the check points in QTP? In how many ways we can add check points to an application using QTP?


Check points in quick test professional have always proved to be an efficient tool. In this article, we discuss exclusively about the check points in quick test professional and the ways in which the check points can be added to an application with the help of quick test professional. 

What is Check Point? How it is added to an application?

- Check point can be thought of as a point to confirm or verify whether the application under test or AUT is working properly or not. 
- This is verified by making comparisons between the current value of some property and the expected value of the same property decided earlier. 
- Whenever a check point is added by the user, an equivalent check point is added by the quick test professional to the present row in the key word view as well as a “check check point” statement is added to the expert view. 
- The name of the test object also serves as a name for the check point that has been added to it. 
- The check points can be added via an active screen by placing the cursor on the desired location and clicking the insert standard check point option. 


Types of Check Points

It is on the basis of this expected value that the check points have been classified in to various types as described below:

1. Page check point: 
- This check point is the check point that is created exclusively for a web page. - This check point keeps a count of all the images and links present on that particular web page. 
- Another purpose for which page check point is used for checking the time taken by the web page to load fully i.e., the load time.

2. Bitmap check point: 
- This check point is the check point that helps in checking of the bitmap of either a full web page or an image. 
- Two images are provided to this check point, one the actual image and the other one expected image. 
- These two images are compared pixel by pixel by the bit map check point.

3. Image check point: 
- This check point is used for keeping a check on certain properties belonging to a web page such as the source file location of the image. 
- However, being a image check point, it cannot check pixels of an image like a bitmap check point does.

4. Text check point: 
- This check point is the check point that is employed in checking the expected text in a web application or web page. 
- This text may belong to a specific region of the text displayed or application under test.

5. Accessibility check point: 
- This check point verifies whether or not the accessibility standard of the application under test matches with the accessibility guidelines laid down by the W3C or world wide web consortium for information systems and technology which are web based.

6. Data base check point: 
- This check point performs the task of generating a query while the recording is in progress. 
- The values stored in the data base serve as expected values. 
- This query is executed during the run time to obtain the actual value which is then compared with the expected value.

7. Table check point: 
This check point is the one that is used for checking various table properties such as cell width, row width and so on.

8. XML check point: 
This check point is the one that is used to verify the following:
a)     XML schema
b)     XML data etc.



Monday, September 24, 2012

What is the Difference between Bitmap Check point & Image Check point in QTP?


There are two types of major check points that are provided by the quick test professional namely:
  1. Bit map check point and
  2. Image check point

What is Bitmap and Image Check Point?

- The expected bit map of an object is captured using the bitmap check point while the recording process is in progress. 
- While a run session is in progress and the actual bitmap matches, a pass to the test result is returned by the expected bitmap. 
- If the above is not the case, the test is said to have failed. 
- While the recording is in progress, it is better to insert the bitmap check point rather than inserting it in the active screen. 
- Inserting the check point in the active screen would pose the problem since the possibility is that the active screen may or may not have the latest bitmap updates and making changes to the screen at that time can cause the whole program to fail. 
- To know the difference in the scripts before and after inserting a check point, simply disable a button and run the script. 
- Then insert the check point, enable the button and run the script again. You would be able to see the difference for yourself. 
- For inserting the bitmap check point in to the test script open up a blank test in quick test professional and then open the application that you want to check and start recording. 
- You will get a record and run settings window, select the tab titled “windows application”, then “record and run test on any windows based application” and hit OK. 
- Go to the check point’s option in the insert menu and select the bitmap check point option and insert it where you want.  
- The bitmap check point properties can be changed. 
- Now when the test is run a pass in the test result is recorded by the quick test professional. 
- The basic use of the bitmap check points is in making comparisons between objects and images pixel by pixel. 
- The comparison is carried out for the following:
  1. RGB color variations and
  2. Total deviation in number of pixels.
- By matching the captured bitmaps one can the appearance of the elements in the application. 
- Bitmap check point has proved to be great help in checking bitmap of a full web page or an image. 
- On the other hand, an image check point cannot check the pixels and therefore it is basically employed in checking properties like source file location of a web site or web page. 
- The area of an application or a web page can be checked as a bitmap. 
- The area to be checked can be specified by selecting an object while creating a test. 
- The selected object is specified as a bitmap and then the check point can be inserted in the test. 
- This calls for a large disk space so in order to save space you have the option of saving only the selected area of the object.
- The bitmap check point also allows you to check the zooming property of the maps and they can be created for all supporting testing environments. 
- The results of the bit map check point may be affected by color settings, screen resolution and operating system but this is not so in the case of the image check points. 
- The properties of an image are verified by image check point under AUT whereas only an area of the AUT is verified as a bitmap by the bitmap checkpoint.  


Facebook activity