Subscribe by Email

Sunday, September 30, 2012

What are the Features & Benefits of Quick Test Pro (QTP 8.0)?

The first version of the quick test professional had its launch in the month of November of the year 2002 by its sole creator mercury interactive. Later in the year of 2007, HP (Hewlett Packard) took over mercury interactive and quick test professional became its sole property. 

Features and Benefits of the Quick Test Professional 8.0

a) Quick test professional is a tool that follows the object based approach. This means that the quick test professional operates on the principles of test object model for carrying out various testing operations. Therefore, by using quick test professional the test operations can be automated based on either test objects, automation objects or utility objects.

b)The quick test professional has been solely created for carrying out regression as well as functional testing. However, sometimes it may be employed for performing performance testing and compatibility testing.

c)Like a keyword driven test automation frame work, the quick test professional also follows a key word driven approach.

d)Only windows operating environment is supported by the quick test professional. What the quick test professional is actually dependent on is the user interface for the automation of the test objects rather then depending up on the server side interactions.

e)CUI or command user interface is not supported by the quick test professional but it does support the web based and GUI based application software.

f) No matter in which language you are comfortable, the quick test professional provides a multilingual environment to work in. It supports chinese, japanese, korean etc. depending on the license.

g) For data driven testing the excel like sheet has been adopted by the quick test professional and also it has adapted the VBScript by Microsoft for scripting the test cases.

h)  A lot of tool support is available for quick test professional like:
- An integrated VBScript engine so that file system can be used along with the scripting features.
- An integrated SQL engine for using SQL statements to carry out data base operations in quick test professional.
- Integrated spread sheets to carry out data driven testing.
- XML format is available.
- Integration with other tools like quality center and winrunner is possible.
- User interface test case automation is possible along with some non UI test case automation like data base operations and file system operations.

i) It has been derived from the mother tool of quick test professional i.e., the Astra Quick test.

j) Microsoft internet explorer is very well supported by the quick test professional for the purpose of recording tests.

k) It is desk top application.

l) Quick test professional was developed in cooperation with .NET technology.

m) Quick test professional is a stand alone or a first tier application since resources are stored as external and internal files due to the lack of a data base.

n) Two types of licenses have been granted to quick test professional:
- Float license or concurrent license: this license grants access to only one user at a time.
- Node locked license or seat license: this is used from a fixed machine or system.

o) Quick test professional has got support for Unicode.

p) Though the services of the quick test professional cannot be shared from one machine to another, the sharing of resources is on different machines is possible. 

What is the difference between check point and output value in QTP?

Check point value and output value are two very familiar terms in the field of quick test professional. In this article we will be discussing about output value and check point value and also about the differences between them. But before we discuss the differences let us know about what the check points and output values really mean. 

What is a Check Point?

- Whether a web site or web application that is currently under test is working as expected or not, is known with the help of a check point.
- This is done so by making comparison between the expected values of the properties and current values for the same properties.  
- Whenever a check point is added by the user, a similar check point is added by the quick test professional to the current row displayed in the key word view.
- In the expert view, an equivalent check checkpoint statement is added. 
- All this is default process and the name of the test object on which the check point is added is supplied as a name to that particular check point also by default. 
- The name of the check point can be changed as per the needs. 
- Below mentioned are the types of check points:
  1. Image check point
  2. Standard check point
  3. Table check point
  4. Bit map check point
  5. Text check point
  6. Accessibility check point
  7. Data base check point
  8. Page check point
  9. Xml check point
- Return value of a check point in quick test professional is always of Boolean type i.e., it is either true or false. 
- If the return value of the check point is found to be zero then the statement following it, is executed otherwise the further execution is cancelled. 
- The check points of the quick test professional have a very limited scope therefore the best option is to use self created check points wherever possible. 
Check point is one of the key functional testing features among others provided by the quick test professional. 
- “Check” method is used by quick test professional for working up on the check points.
- If the return value of a check point has to be retrieved than it is compulsory that you add parenthesis around the name of the check point present in the check point.

What is a Output Value?

- Output value step captures a value of a property of an object which is then termed as an output value. 
- This value is captured at a specific point and can be stored at any desired location. 
- These output values then can be used to serve as inputs at several different points of the test script.
- As required the user can select and output multiple properties of an object. 
There are 4 typical types of output values:
  1. Text output value: Text content present in the bitmap can be retrieved.
  2. Text area output value: It is used for outputting text strings with a defined area of the screen.
  3. Standard output value: Number of properties pertaining to an object can be retrieved.
  4. Xml output value: It is obtained from resources and applications containing xml content stored in some specific column although the run session.
  5. Data base out put value: This output value facilitates the checking of the content present in the data table and has been stored in a particular column during the run session.
- The output values are stored only till the duration of the run session ends and are obtained from AUT.
- Output values are suppose to have a dynamic nature.

Saturday, September 29, 2012

What is Reporter.ReportEvent? What is GetRoProperty? (In QTP)

In this article we are going to discuss regarding the two main things namely:
  1. Reporter. Report event and
  2. GetRoproperty
As far as the purpose of the reporter object is concerned it is used for sending or reporting the information to the results of the test. With a reporter object the following tasks can be performed:
  1. For reporting of the status of the results of the tests like success, failure, warning, error and so on.
  2. For enabling or disabling reporting of the steps that immediately follow the executed statement.
  3. For retrieving the folder path where the results of the current tests can be stored.
  4. For retrieving the execution status at the current point of the execution process.
There are many methods and properties that are associated with the reporter object and the reporter. Report event is one of them. 
Those methods and properties are as mentioned below:
  1. Reporter event method
  2. Filter property
  3. Run status property
Here the thing to be discussed is about the first one i.e., the reporter event method in detail. 
- This is the most commonly method that is used with the help of a reporter object. 
- It is certain that even if one has worked on quick test professional for a very short period of time then he/ she might have come across the use of this object. 
The syntax for using this object is as mentioned below:
Reporter. Reportevent event status, report step name, details [, image file path]

The event status can be one of the following:
  1. Mic Pass or 0: If the test step passes the run.
  2. Mic Fail or 1: If the test step fails the run.
  3. Mic done or 2: If the status of the test is not affected by the run of the test step.
  4. Mic warning or 3: If the status of the test is not affected by the run of the test step and a warning has to be issued.
- Next step i.e., the report step name represents the name of the step that is currently being executed. 
- The last aspect i.e., the details represent the details of the step as defined by the user. 
- The reporter. Report event can be used for reporting of the custom steps in the test results of the quick test professional.

- After the tests have been executed, the results can be stored in a text file or in an xls file via VBScript library functions. 
- It can be considered to be a kind of reporting mechanism of the quick test professional. 
- As the name itself specifies it means reporting an event to the test results. 

What is GetRoProperty in QTP?

- The GetRoproperty is used basically for the following two tasks:
  1. For returning the run time value or the current value of the test object property from the objects present in the software system or application.
  2. For retrieving the current property value during the run session of the object present in the software system or application.
- Actually GetRoProperty is one of the 4 methods provided by the quick test professional for working on the test object repositories and the other 3 are:
  1. GetToProperty
  2. SetToProperty
  3. GetToProperties
- Most of the developers often get confused with these methods and do not use the appropriate method for the situation. 
- For employing either of these methods, it is important that you should know and understand the details of the test object properties which can be identified by the quick test professional as a standard set of properties. 

Friday, September 28, 2012

What is a Run-Time Data Table? Where can I find and view this table?

The quick test professional always makes it a point to produce a run time data table at the end of every run session so that the user can have a live view of the data table that is currently associated with the test being carried out at that time. 

What is a Run-Time Data Table?

- While the run session is still in progress, the run time data table is displayed in the data table pane of the quick test professional window. 
- This is to make it easy for the user to view any changes that are constantly made to data during the run session.
- At the end of the run session, this run time data table is closed and in the data table pane the stored design time data table is displayed again in the place of the run time data table. 
- In some of the cases the data which entered in to the run time data table during the run session is not saved along with the test.
- At the end of the run session the data in the table is finalized and is displayed is run time data table column of the results window of the test. 
- The name of the run time data table was derived from the fact that it is generated during the run time. 
- With every script or component there is an associated run time data table which serves the purpose of displaying the data.  
- One run time data table has the property to access the data from some other data table during the run time. 
After a particular test has been executed with either of the following:
  1. Data table parameters and
  2. Data table output value steps
The following are displayed by the run time data table:
  1. Parameterized values that were used during the testing and automation and
  2. Output values that were saved in the data table during the run session.
Certain data table methods are provided by the quick test professional with the help of which the user can alter the data table as required and these are:
  1. Add sheet: This data table method can be used to add sheets in to the pre existing run time data table. Syntax used is:
Datatable.addsheet (name of the sheet)
  1. Delete sheet: This data table method as obvious from its name is used for deletion of the already added sheets in a run time data table. However at one time only one sheet can be deleted. Syntax used is:
Datatable. Deletesheet (“ID of the sheet”)
  1. Get sheet count: This data table method gives you the number of sheets that you have in your run time data table. Syntax used is:
Datatable. Getsheet count
  1. Get sheet: This methods returns the sheet specified from the run time data table by the user. Syntax used is:
Datatable. Getsheet( ID of the sheet)
  1. Get row count: Returns the number of rows present in a particular sheet of the run time data table. Syntax used is:  datatable. Getrowcount
  2. Value: This data table method serves two purposes i.e., using it you can either obtain value of a specified cell or you can modify the value of the cell. Syntax for both the cases is:
Variable = datatable. Value( name of the parameter, name of the sheet)
Variable = datatable. Value( name of the parameter, name of the sheet) = value
  There are some other data table methods also like:
  1. Set current row
  2. Set next row
  3. Set previous row
  4. Import
  5. Export and so on.

What is a QTP batch testing tool?

Under the context of quick test professional the term given for the execution or running of multiple tests or a series of tests at the same time is “batch testing” or sometimes it is also called “batch execution”. 
However, this batch testing cannot be performed normally like the other applications, a special tool is needed. Quick test professional provides such a tool and it is called “batch testing tool” or the “test batch runner”. 
The batch testing process follows the below mentioned process:
  1. Creation of individual tests.
  2. Execution of the individual tests created in the first step.
  3. Formation of batches using the batch testing tool.
  4. Execution of the batch tests on tests from batch testing tool.
  5. Observation of result via test result viewer.
Here one thing to be noted is that the provision of viewing batch wise result is not available in quick testing professional for the batch testing sessions. 

Creating a Test Batch

- For creating a test batch, you need to hog down to the tools menu in the menu bar of the quick test professional window.
- Then select test batch runner, then batch, then add option, then specify the path of the test to be added, then save it with appropriate extension like MTB or module test batch and  finally close the test batch runner. 

Execution of Test Batch

- For the execution of a test batch you again need to open the batch testing tool i.e., the “test batch runner” by following the same sequence of steps as discussed for the creation of a test batch. 
- But instead of the add option you need to select the run option. 
- When you do this, the test batch runner is launched and the tests are executed one by one. 

Here if you don’t want to use test batch runner or if you are facing issues with it, you can go for batch testing using other mercury products by checking the “allow other mercury products” check box and clicking OK. 

- In some cases it may be required to run only some specific tests and not all.
This is also possible in quick test professional via test batch runner. 
- For doing this, you just need to open the test batch runner like always and go to option “open test batch”, then select or deselect from the lists of the tests and go for run test batch. 
- The selected tests are kept in waiting mode till they are all executed one by one. 
- Another mercury product that serves the same purpose as the test batch runner is the “multi test manager”
- After the execution of the scripts is complete via test batch runner you can open up that particular test script, then go to automation, then results option and here you have the results. 
- When your test batch is set to batch mode, the entire results cannot be viewed at a time. 
- This whole program can be scheduled if you want it to be scheduled by going to the scheduled tasks option in the control panel. 
- There are some known issues with the quick test professional’s batch testing tool like consolidated test results cannot be viewed and if by chance the batch test execution stops in the mid way, the batch cannot be executed again. 
- The batch runner window should be closed and opened again. 
- Whenever a test is completed, the QTP window comes in the front and the AUT window goes back, the next is opened and executed. 
- For multi test manager the same steps are followed as for the quick test professional. 

Thursday, September 27, 2012

How would you connect to database using vbscript?

VBScript or visual basic scripting edition is the basic scripting language for the HP test automation suite called the quick test professional. This scripting language is quite a lively script whose interpretation is done via script host of the Microsoft windows. This scripting language comes with a whole lot of excellent and powerful functions with good support for data types, error handling and variables. 

There are two engines that can interpret the VBScript namely:
  1. Wscript.exe and Cscript.exe: it works in the GUI environment f the windows with the help of the WSH or windows script host. However this engine is basically used for automating the administration tasks as well as to automate the systems.
  2. VBScript.dll- this engine can be invoked by asp.dll and basically serves in the web environment.
VBScript is used as the following in quick test professional:
  1. Data base record set object
  2. Data base command object
  3. Data base connection object
Here in this article, it has been discussed about how a connection between data base and quick test professional can be established through the VBScript. 

The below mentioned are the various VBScripts available for connecting and accessing data base in quick test professional:
  1. Updating records in a record set
  2. Deleting a record from the record set
  3. Finding a record in record set
  4. Clearing a data base table
  5. Connecting to an ADO data base
  6. Adding a new record to the data base

How to connect to a database using VBScript?

- To connect to a data base using VBScript, a DSN inventory is required. 
- An ADO connection is another requirement for making an open connection with a specific data source. 
- Once this connection is established, the data base can be easily accessed as well as manipulated. 
- Also, once this connection is established it is not important how many times that data base is accessed. 
- Another way to establish a connection with the data base using VBScript is by passing a connection string through some record set object or a particular command. 
- Though this method is quite quick but it holds good only for the single specific queries. 
- An essential connection from a web server to a data base is nothing but a data source. 
- This connection can either be established via a dedicated machine running SQL server or through a data base file on a web server at some other location. 

Two types of DSNs or data sources are available namely:
  1. File DSN: This is the connection that is created by the script when an access to the data base is required. Here the path and name of the data base to be accessed needs to be specified. Another condition for this DSN to work is that the data base to be connected to must be residing on a server in a directory which must be accessible by the script.
  2. System DSN: Creation of this kind of connection is under the charge of the administrator of the web server which consists of the required data base. This is the most popular data base connection since it is much reliable than its former counterpart.
- After the access to the data base is complete it is important that the connection should be closed at the end of each page. 
- For creating any application, the foremost thing that is required is data base itself. 
- A number of programs are available for developing a data base, however, the Microsoft access remains the most popular of them all. 
- It is important for web application designer to know the basics of the data base usage with VBScript as well as active server pages for developing real web applications.

How will you check a web application for broken links using QTP?

Checking for the broken and ill links forms a very important aspect of any web testing profile. The below mentioned are few testings which take the priority of the web testing check list:
  1. Usability testing
  2. Functionality testing
  3. Compatibility testing
  4. Interface testing
  5. Security testing
  6. Performance testing
Out of all these the functionality testing tests the following basic aspects of a web page or site or application:
  1. all the links in web pages
  2. data base connection
  3. forms in the web pages
  4. cookies
When it comes to checking of the links the following links are tested:
  1. out going links from a specific domain
  2. internal links
  3. links jumping on same page
  4. links for sending mails
  5. orphan pages and lastly
  6. broken  links
Our focus is on last aspect i.e., testing of the broken links in a web page, site or web application with the help of the quick test professional. 

What are broken links?

- Broken links are also termed as dead links since they are permanently unavailable and hence cannot be accessed by the user. 
- If you would have observed you might have surely come across 404 error while browsing some site. 
- This signifies the presence of a broken link. 
- Using quick test professional, the broken links can be identified during the run time itself by following any one of the two methods mentioned below:
  1. via manual creation of a check point
  2. via automatic page check point

How a broken link be checked manually by creating a page check point?

- A direct menu option is not available in the quick test professional for incorporating a page check point. 
- Therefore, you need to take assistance of a standard check point. 
- What you actually need, is to click on the start recording session and then select insert option, then check point and finally standard check point option.
You can use F12 if it works for you.
- Get the hand pointer on the web page and click OK. 
- You will get a page check point properties dialog box which has a broken link check box. 
- You need to check that box and click OK. 
- After this, you need to run the scripts and check the status of links in broken link result. 
- If the links pointing only to the current host have to be checked then you need to check the box titled check only links to current host by going to the tools menu and then selecting web options. 
- Similarly, if the links pointing to all the hosts have to be checked then this box has to be kept unchecked. 
For following the second method you need to go through the following:
Tools à options à web à advanced
- You will get two boxes labeled “broken links” and “create a check point for each page while recording”, check these both boxes. 

Now every time the quick test professional starts recording on a new page, a check point will be automatically included for all the broken links. 
One thing that you should know is that the quick test professional experiences some issues with the windows vista if the internet explorer version that you using is 7.0. 
Tabbed browsing is something that is not supported by the quick test professional especially in Microsoft internet explorer. 
An alternative to this can be to disable tabbed browsing first and then proceed with quick test professional. In internet explorer the quick test professional may not be able to recognize the web objects. 

Tuesday, September 25, 2012

What is the difference between functions and actions in QTP?

Functions and actions are two different aspects of quick test professional. In this article we will talk regarding the two and see what the differences between them are. 

What are functions in QTP?

- In most of the cases you may need to use some segments of code again and again in your tests. 
- In such a case a user defined function can be created which will not only reduce the length of your tests but will also make it easier to be designed, read and maintained. 
- The created functions can consist of the following:
  1. Sub routines,
  2. Modules
  3. VBScript functions and so on.
- Three simple tests need to be followed if a function is to be used in the test from a library:
  1. For creating a new function you can select new function library from the file menu. This cause a new tab to open up in the quick test professional window. You can even opt for multiple tests in the same file.
  2. Next you need to save the function with extension “.qfl” and associate the appropriate library with that particular function. “Associate function library” option can be accessed from file menu.
  3. Now the third step is to invoke the function using the usual simple function call. Quite advanced or sophisticated functions can be generated using DCOM and COM.

What are actions in QTP?

- Whenever you have a piece of code at your disposal you get two options in quick test professional i.e., to either turn it in to a function or a reusable action.
- When the quick test 9 was introduced by the mercury, an argument was made in the favor of the functions for making them more compelling by the means of multi document interface. 
- Many function libraries can be used at once but still mostly one test is used. 
- If you want a reusable action to be edited, the current test has to be shut down. 
- Then you need to open the test in which you want to make the changes, make the changes and then save and close. 
- Later, the original test can be re-opened.

Differences between Functions and Actions in QTP

Now we are stating below some very basic differences between the functions and actions in quick test professional:

1. Passing of Data: 
Functions can access a variety of objects advance as well as primitive like arrays, test objects (such as frames, pages and so on.) and dictionary objects. But this is not the case with the actions rather they can accept only primitive kind of data types such as parameters like integers, strings and so on.

2. Use of Resources: 
Each action is provided with the following basic things:
a)   A folder
b)   3 separate VBS files
c)   A subfolder for keeping snapshots
d)   A certain amount of load time
e)   An excel spreadsheet and
f)    A local object repository.
On the other hand a function consists of only the code and nothing else.

3. API: 
For functions, the function libraries can be attached to the test scripts through the API of the quick test professional. As for the actions the insertion of the calls in the existing actions is not possible through the API of the quick test professional rather it can be done only through the interface.

4. Return Values: 
Actions return the values which are quite difficult to be read in syntax as well as understand. On the other hand the return values of the functions work well and similarly in all the languages.
With actions your test can be divided in to business processes or logical units along with the scripts that are more efficient as well as modular.

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