Subscribe by Email


Showing posts with label Screen. Show all posts
Showing posts with label Screen. Show all posts

Saturday, October 6, 2012

How do u do batch testing in WinRunner & Is it possible to do in QTP, if so explain?


WinRunner provides you the facility of executing a certain batch of the unattended tests. This feature of the winrunner has proved to be quite useful especially in the situations when a large groups of tests have to be run over night i.e., an over night run. 

How to do batch testing in WinRunner?

- A batch test can be viewed as a test consisting of a test script which holds the calls to the other tests. 
- Such call statements execute each and every test called in the list and also save the result up on execution.
- A batch test may consist of n number of tests depending up on the need and requirement of the user. 
- A batch as such just seems like a normal test but with an unusual large number of calls. 
- A batch test can be run by using the option “run in batch mode”. 
- This option is available in the run category of the general dialog box which gets invoke just before the start of the execution of the test. 
- Whenever a test is run in batch mode, all of the messages that may be displayed during the test run are suppressed by the winrunner. 
- This is done so that the winrunner is able to run a batch test unattended. 
- The execution of the batch tests is therefore different from the regular, interactive test runs where you may come across several messages popping up on the screen. 
- In batch tests, this thing is not there and so a lot of time is saved. 
- The current chain of all the called tests can be viewed at a break point in the call chain pane available for viewing in the debug viewer window. 
- After the completion of the batch test run the winrunner makes the results available in the test results window. 
- Winrunner provides you the facility of running the batch test via command line.

Is it possible to do batch testing through QTP?

- The quick test professional is the successor of the winrunner and is quite advanced and efficient in many respects as compared to the winrunner. 
- Batch testing is possible in quick test professional. 
Difference lies in the way in which the batch testing is carried out here. 
- The quick test professional facilitates the batch testing service with the help of a separate built-in tool called the test batch runner or QTP batch testing tool. 
With this tool you can group the tests in to a number of batches which are then executed. 
- The result of this batch test run is made available in the test result viewer. 
- In quick test professional, batch wise viewing of the result is not possible. 
Results for individual tests have to be viewed. 
- For the execution of a test batch you need to open the path of the test batch and give the run command. 
- In quick test professional, other mercury products for batch testing can also be installed and used if one is not comfortable with the in built tool of the quick test professional i.e., the test batch runner. 
- For doing this you need to follow the below mentioned sequence:
Tools menu à options à run à check the check box “allow other mercury products” à apply à ok
- Even a partial batch test is also possible! 
- You just need to deselect the tests that you want to be executed. 
- MTM or multi test manager is another mercury product using which one can carry out batch testing. 


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.  


Sunday, September 9, 2012

How many types of recording modes are there in QTP? Which will be used when?


Unlike Winrunner, Quick test professional comes with three types of recording modes. Two of them are same as what the winrunner had and one is new. 
The 3 types of recording modes available in quick test professional are:
  1. Context sensitive recording
  2. Analog recording and
  3. Low level recording
Now let us discuss about these three recording modes in much detail one by one:

Context Sensitive Recording Mode

- The context sensitive recording mode is considered to be the normal recording mode in the quick test professional. 
- In this recording, full advantage of the test object model of the quick test professional can be taken. 
- In this mode the quick test professional can recognize a particular GUI object perfectly even if its location on the application screen is not known. 
- This recording takes place regardless of the location of the GUI objects on the application interface. 
- In this mode, the objects present in the software application and the operations that are performed in them are recorded. 

Analog Recording Mode

- Each and every movement of the mouse is tracked and recorded as it is dragged across the screen or some window. 
- The analog recording data captured by the quick test professional is saved as what are called tracks and these tracks are in turn saved in the directory of the test that you are going to perform. 
- This technique proves to be useful essentially for recording those operations whose recording cannot be carried out at the level of an object. 
- An example for such operation is making a signature by dragging of the mouse.
- With analog recording two types of recording can be done as stated below:
  1. Recording relative to the screen and
  2. Recording relative to the window.
- When you have to perform the analog operations pertain to just one window then you can very well go for the second one i.e., the recording relative to the window.
- On the other hand when your analog recording is to consist of multiple screen actions like dragging and dropping objects from one window to the other the former option i.e., the recording relative to the screen can be used.

The Low Level Recording Mode

 
- It is used for making recording easy at the level of the objects. 
- With this recording, you can record operations being performed on any of the objects present in the application software. 
- With this mode, even all of the run time objects can be recorded as:
  1. Window test objects or
  2. winObject test objects.
- This mode of recording is independent of whether the quick test professional is able to recognize the specific operation or the specific object. 
- This recording mode should only be used when your tests demand the exact coordinates of the objects.
- An example of this can be given by a hash map. 
-This mode is also used when the recording of a test in a particular environment is not provided recognition by the quick test professional.
- Using this, x and y coordinates of any click can be recorded.
- It has been noted that more disk space is used up in the analog and low level recording modes as compared to the context sensitive mode. 
- For both of the last two modes, one thing should always be kept in mind is that the position of the screen during the run time as well the record should remain identical otherwise the test script may fail. 


Friday, March 16, 2012

What causes browser display differences?

Most of the time while browsing the same over many browsers you might have noticed considerable differences between the displays across the various browsers. These differences cause a lot of annoyance to the users.

There are various reasons why there occur differences across the different browsers. This article is focussed up on such browser display differences and errors as well as suggestions to avoid them.

ABOUT WEB BROWSER DISPLAY DIFFERENCES


- Earlier it was quite difficult and time consuming task to compare the web sites displays under many different browsers but nowadays several tools have been developed that have proven to be quite effective in testing the appearance of a web site on various browsers.

- These tools help in checking out the differences by taking the snap shots of the web site across the various browsers and then comparing them.

- You can even have the snap shots of your web page under different computers and screen resolutions.

- An HTML tool box is incorporated in these tools which tell whether the differences have occurred due to the incompatibility of the HTML code used in the web site or are they because of the browser incompatibility.

- The HTML tool box in some of the tools has also the capability for repairing off the code errors in just a few clicks.

Some of the most common factors that causes browser display differences are:
1. Browser bugs
2. Browser incompatibility
3. HTML errors
4. Different font sizes
5. Different computer types
6. Different screen sizes
7. Different versions of the browsers

RARE CASES
- In some very rare cases, the problem of differences might also occur due to certain features of a web site that have been exclusively designed for certain browsers and are not meant for others.

- Usually a web site is developed so that all of its features are accessible by all the web sites.

- For example, the web site for downloading Google chrome extensions and tools has been designed exclusively for the Google chrome browser.

- Though this web site can be viewed in any other browser but, one cannot download extensions through that browser.

STEPS FOR ELIMINATING DISPLAY DIFFERENCES ARE:



There are several steps that one can take for eliminating such differences:
1. Avoiding using cutting edge HTML as far as possible.
2. Set some goals for your web site.
3. Always check for the browsers incompatibilities.
4. Follow the trial and error debugging method.
5. Never forget to validate your web pages.

WHAT WEB BROWSERS ACTUALLY DO?


- They translate the web site code in to the formatted web pages.

- Every individual web browser has its own way of translating the web pages.

- This can be compared to the following example: you give a sentence written in German to a few people and ask them to translate it in to English. Checking the results, you will observe that all of them though have translated the sentence but their ways of translation are different i.e., the have used different words and grammar composition.

- Though the rules and standards for using HTML have been stated by the World Wide Web consortium, web site designers have their own way of implementing it.

- There is a fact that you should know which is that there is no such an effective browser that supports the hundred percent of the HTML, though there are certain browsers that come a little far away than their counterparts.

- If your browser does not supports a part of the code, it is sure to affect the display of your web site.

- This problem is further exaggerated by the HTML extensions that are specific to certain browsers.

- Such problems have forced the designers to put a label on their web site stating on which browser their web site can be viewed.


Thursday, October 14, 2010

Validation phase - Unit Testing - how to write Unit test cases

Preparing a Unit test case document commonly referred as UTC is an important task in unit testing activity. Having a complete UTC with every possible test case leads to complete unit testing and thus gives an assurance of defect free unit at the end of unit testing stage.

While preparing unit test cases the following aspects should be kept in mind-

Expected functionality
Write test cases against each functionality that is expected to be provided from the unit being developed. It is important that user requirements should be traceable to functional specifications which should be traceable to program specifications which should be traceable to unit test cases. Maintaining such traceability ensures that the application fulfills user requirements.

Input Values
- Write test cases for each of the inputs accepted by the unit. Every input has certain validation rule associated with it. Write test cases to validate this rule.
- There can be cross-field validations in which one field is enabled depending upon input of another field. Test cases for these should not be missed.
- Write test cases for the minimum and maximum values of input.
- Variables that hold data have their value limits. In case of computed fields, it is very important to write test cases to arrive at an upper limit value of the variables.
- Write test cases to check the arithmetic expressions with all possible combinations of values.

Output Values
- Write test cases to generate scenarios which will produce all types of output values that are expected from unit.

Screen Layout
Screen/report layout must be tested against the requirements. It should ensure that pages and screens are consistent.

Path Coverage
A unit may have conditional processing which results in various paths, the control can traverse through. Test cases must be written for each of these paths.

Assumptions and Transactions
A unit may assume certain things for it to function. Test cases must be written to check that the unit reports error if such assumptions are not met.
In case of database applications, test cases should be written to ensure that transactions are properly designed and in no way inconsistent data gets saved in the database.

Abnormal terminations and Error messages
Test cases should be written to test the behavior of unit in case of abnormal termination.
Error messages should be short, precise and self explanatory. They should be properly phrased and free of grammatical mistakes.


Facebook activity