![]() |
|||||
|
Home | About Us | Products | Sales | Demos | Links | Support | Contact Us |
|||||
|
PRODUCTS
|
Page 9 — Masking Just as there are three ways to verify the correct operation of your application (bitmap image, window information and file contents), there are three types of mask that you can create to filter out information that is variable or is not important for the success of the test. Each type of mask corresponds to one of the tree types of comparisons that HighTest does and are detailed below: Screenshot Masking When you are viewing a screenshot that you have taken during a record session, you may find that there is information in the image that changes every time, such as a date/time stamp and that it is not important to the success of the screenshot. To put a mask around it, click on the mask button on the CompareBar and the image will zoom to full screen mode. Creating a mask is as simple as clicking and dragging. Just press the left mouse button, drag the mouse to the opposite corner of the region to mask out (a rectangle will follow the mouse movements, also known as a rubber band box) and release the mouse button. There is no limit to the number of masks that you can create.
The image above contains a mask rectangle around the date/time stamp that was inserted into the image at record time. This same image can be seen on Page 5 of the Tour without the mask. Deleting a mask is even easier. Just right click within the rectangle to delete and it will be deleted. Note that if you click in a spot that is covered by more than one mask, all rectangles will include the point where you clicked will be deleted. Window Information Masking When HighTest captures the internal details of a window and it child controls, it captures some information that may not be important to you. When viewing the Window Information, you have the option of telling HighTest to ignore some of these details. The information that HighTest can ignore are:
ID Ignores the window and control ID values that typically uniquely identify the control. If your application creates the IDs on the fly each time, these may be variable and can cause the comparison to fail. Location If the position of the controls within the window change, and your interest is in making sure that the controls exist, but not their exact placement on the screen, select this option and the location of the controls will be ignored. Order The order of controls usually will not change, but could change between one release of your application and another. If the order that you tab through the controls is not important, select this option to have HighTest ignore the order. File Masking Select Comparisons/File Mask from the main toolbar and HighTest will present you with a list of file comparisons that are stored in its database. Select one of these and the following screen will be displayed:
HighTest supports masking both binary and text format files. The options available when masking a file depend on whether you are doing a binary or text file comparison. Text file comparisons using the CompareTextFile( ) command support all of the features of binary file comparisons using CompareFile( ) and add additional capabilities discussed below. Binary file comparisons support pattern masking with the wildcard character ‘?’, to match any single character, allowing you to create masks for variable information without having to have a static portion of text to search for as a starting point. In the image above, there is one mask created that will filter out all dates that fit the pattern ??/??/????. You may also specify either a text string or a position within the file to start the comparison by entering one of them into the dialog. When a starting point is specified, HighTest will search for that point in the file and start comparing from that location. Text file comparisons may also specify the line number to start the comparison on. While CompareFile( ) comparisons can be used for comparing text files, HighTest uses a comparison method that works equally well for comparing files that cannot be viewed as a text file. This allows you to compare configuration files, database files, etc and verify that they contain the same data. Ignore Masks During Playback Occasionally, you may decide that you don’t want to use a mask for a particular run of a script. HighTest provides you with the ability to ignore the masks that you have created, without having to delete the masks. This option is available on the Playback Options preference page and is detailed on Page 1 of the Tour. |
||||