Subscribe by Email


Sunday, September 23, 2012

What is keyword view and Expert view in QTP?


In quick test professional you get two types of views namely the key word view and the expert view which we are going to discuss in this article. 

Keyword View in Quick Test Professional

- The key word view is more like a table like view which consists of a finite number of rows and columns. 
- Each row in the key word view represents a separate step. 
-On the other side, different parts of the steps are marked by the corresponding columns. 
- There is a separate column called the item column which holds the item on which the user wants the step to be carried out. 
- Also, in this column the hierarchy of the GUI object on which the operations are to be carried out. 
- There is another column by the name operation column consisting of the operations to be performed on the item as required. 
- One more column called value column holds the values of the arguments for the operation selected by the user. 
- Each step is documented by the quick test professional under the column titled documentation by the quick test professional for the ease of understanding. 
- The above mentioned 4 columns are the default columns provided by the quick test professional however comment and assignment columns in key word view can be used. 
- With the aid of key word view you can create as well as view the steps of the operation in a tabular, modular and key word driven format. 
- Full access is granted to the test automation experts via some debugging environment and integrated scripting that has round trip synchronizing with the key word view. 

Expert View and Differences between expert and keyword view in Quick Test Professional

- The expert view also displays the same object hierarchy all mapped to the same arguments value and same operation. 
- The basic difference lies between the formats in which the same data is arranged in the two. 
- Both have a distinct way of representing the data though the data displayed is same. 
- All the operations like creation of a step, modifying it and so on can be carried out in the key word view. 
- Expert view as the name suggests is a more advanced way of dealing with the data and requires mastery over the tool. 
- After all of the operations are recorded, they are displayed as steps in the quick test professional in key word view whereas these steps are generated as scripts in the expert view. 
- Expert view is for the advanced testers, using which they can view as well as edit their tests as and when required. 
- This also reveals the underlying standard of the VBscript that is used by the quick test professional. 
- Any changes that are made to the scripts in the expert view are automatically reflected in the key word view also.  
- However, in key word view the exact recording of the applications can be viewed. 
- In key word view, the steps can be created as well as viewed and can be modified by making a selection of the operations as well as items in the key word view and putting in the information as and where required. 
- In the expert view each of the operations that are performed in the form of VB script statements are displayed. 
- There exists a row in the key word view for every method and object. 
- To put it simply, it can be said that the VBscript format is used by the expert view whereas the scripts are represented using graphical user interface which is divided in to 4 default columns as mentioned earlier in the article in key word view. 
- Also, in the expert view all the test statements are displayed.  


What are the different types of Test Automation Frameworks?


Test automation frame work has got its own importance in the field of software testing. It can be defined as a set that consists of concepts, tools and assumptions that can be used to support the automated software testing. The basic advantage of using a test automation frame work is that maintenance costs are reduced by large margins. If any changes to the test case are made then there is a need to update only the test case files. No updates are to be made to the following two scripts:
  1. Startup script and
  2. Driver script
In some ideal cases there is no need of even updating the scripts in case changes are made to the application software. In order to have all the advantages of using a test automation framework it is important that you select the right one otherwise you will face the problem the other way round. 

There are various frame work techniques that are used namely:
1. Key word driven
2. Data driven
3. Structured
4. Linear
5. Hybrid and so on.

Purpose of Test Automation Framework

  1. Defining of format for expressing the expectations
  2. Creation of a mechanism for driving the application under a particular test.
  3. Execution of the tests
  4. Reporting of the results.
A test automation frame work consists of the following four components namely:
  1. Test automation interface
  2. Interface engine
  3. Interface environment
  4. Object repository

Types of Test Automation Frameworks

1. Ad-hoc test automation framework: 
- The scripting involved in this is developed in reactionary mode with the purpose of testing a single issue only. 
- The test case steps form part of each action script and exhibit low re-usability and call for high maintenance. 
- This frame work consists of some data inputs that are stored in the data sheet of the test script.

2. Data driven test automation frame work: 
- In this framework the scripts are considered to be an assembly of the function calls. 
- Data for the tests is supplied from the external source such as ODBC database, spreadsheets and so on. 
- Results are captured externally for each script separately.

3. Keyword driven test automation frame work: 
- A sequence of the key word prompted actions are used to be express the test cases. 
- Action scripts which serve the purpose of calling functions are executed by the driver script. 
- For this frame work no special scripting knowledge is required.

4. Model driven test automation framework: 
- This test automation framework makes use of descriptive programming for testing the dynamic applications inclusive of the web applications and sites. 
- The parametric code defines the objects and the work flow capabilities are enhanced by the custom functions.

5. 3rd party test automation frame work like HP’s quick test professional: 
- This test automation frame work is also key word driven but its control is taken by the HP quality center data base. 
- It can be used in projects where there is a requirement for collaborative work efforts. 
- This framework has high level test requirements and the tests are defined as scripted components.

6. Intelligent query driven test automation frameworks: 
- This framework is object oriented and works on the agile principles. 
- It was constructed as a series of framework layers which compiles data at the run time with the help of data mining techniques which can be combined based up on the cope of the requirements of the test.


Thursday, September 20, 2012

What is Object Spy? How to Use it?


Object spy is one of the most important tools in winrunner as well as in quick test professional. In this article we are going to discuss what role object spy serves in quick test professional and how it is used in the same. 

What is an Object Spy?

- With the help of object spy the basic structure of any of the test objects can be known. 
- The best thing about object spy in quick test professional is that the structure of a particular object can be viewed in the tree format. 
- All this makes understanding of the test objects much easier. 
- In addition to this use, the object spy can also aid us in viewing the test object and run time properties as well as methods of all the objects present in the software system or application. 

How the object spy can be used in quick test professional?<>

- For launching object spy just go to tools menu and click on the object spy tab. 
- Clicking on this tab will open up a dialog box named “object spy”.
- In that dialog box you need to select the application software whose object methods and properties you wish to see. 
- After this in the object spy window you need to select the pointer image. 
- All the objects present in that particular application will be listed and from these you can select the one whose object methods and properties you wish to view. 
- There are two particular things that can be viewed using the object spy as mentioned below:
  1. Properties of a specific object and
  2. Methods applicable for that object.
- Many different properties of the selected objects can be viewed. 
- This viewing of the object methods and properties is facilitated by the pointing hand mechanism of the object spy. 
- As this pointer is hovered above the objects, their corresponding methods and properties are displayed in the window of the object spy dialog box. 
- The details of the object may also include the hierarchy tree of the test objects. 
- The object spy also displays the syntax for the object methods at your command. 
- Different properties can be viewed in different environments. 
- Objects such as following can be viewed using the object spy in quick test professional:
  1. Dialog
  2. Static
  3. Active X
  4. Edit and so on.
- The object spy can be considered to be the same as the GUI spy that comes with the winrunner. 
- The object spy contributes a lot while writing descriptive programming. 
- In object, the properties of the objects are displayed along with their corresponding values. 
- Object spy is such a feature provided by the quick test professional with which the total information regarding the objects can be obtained.
- There are 3 tabs in the object spy dialog box namely:
  1. Properties tab
  2. Methods tab and
  3. Navigation tab
- Clicking on the properties tab all the properties of the objects along with the values and hierarchy tree are displayed. 
- Clicking on the methods tab all the methods of the test objects and run time objects are displayed. - Clicking on the navigation tab, the tool bar is displayed. 
- Object spy just like the gui spy of the winrunner is an in built feature. 
- For opening the object spy apart from just clicking on the object spy option on the tool bar there are two more ways:
  1. Go to the object repository window and double click the object spy icon.
  2. After opening the object repository navigate to the tools and select the object spy option. 


Wednesday, September 19, 2012

What are the types of environment variables in QTP?


The quick test professional comes with a whole lot of environment variables and under many types. In this article we are going to discuss about the same but first let us focus what actually these environment variables are. 

What are Environment Variables

- The environment variables have come to be termed as “dynamic named values” which have the ability to affect the way the processes behave on a computer system while in execution phase.
- With the environment variables an operating environment is created in which the applications or processes are supposed to run. 

We give an example to make it easy for you to understand the concept of environment variables:
- Suppose a particular system uses a particular location for storing its temporary files. 
- This location can be designated with an environment variable having a standard name. 
- This location may differ from computer to computer. 
- This environment variable can be accessed by any of the processes using the standard name assigned to it. 
- This mechanism makes sure that the process stores the temporary files in a directory or a folder that surely exists and has sufficient place for storing the data. 
- In systems having UNIX or UNIX like operating systems each process is provided with its own set of environment variables.

More about Environment Variables
- Whenever a process is created from its parent process a duplicate environment of the parent process is inherited by the child process by default. - However, the explicit changes are not inherited. 
- From command shells, the environment variables can be changed by the user by an indirect invocation or by using the below stated notation:
ENVIRONMENT _ VARIABLE  = VALUE
- Even the operating systems like MS- DOS, Microsoft windows etc come with environment variables. 
- However, all of these do not make use of the exact same environment variables. 
- For the purpose of configuration, the values of these environment variables can be used by the running processes. 
- Below we are stating some common examples of the environment variables:
  1. HOME
  2. USER PROFILE
  3. PATH
  4. TERM
  5. MAIL
  6. TEMP
- For the batch files as well as the shell scripts the environment variables serve the purpose of communicating the preferences to child processes and data. 

Environment Variables in QTP

Now we shall see the concept of environment variables in quick test professional. 
- In quick test professional the environment variables are more like global variables which can be accessed by any part of the test script.
- The values of the environment do not change by any number of the iterations but yes they can be changed by modifying them in the script. 
- The basic advantage of the environment variables is that they can be used or shared across several reusable actions. 
- 2 types of environment variables have been defined namely:
  1. Built in environment variables and
  2. User defined environment variables.
- The first type of the environment variables defines the internal variables that are a property of quick test professional and hold valuable information like path of the folders, name of iteration, and version of the operating system and so on.
- The user defined environment variables can be further defined in to 2 types namely:
  1. User defined internal: variables defined within the test and accessible only within the test and
  2. User defined external: Variables predefined in the external environment variable file.
Below mentioned are the built in environment variables in quick test professional:
  1. ActionName
  2. ActionIteration
  3. OS
  4. OSversion
  5. ProductName
  6. ProductVer
  7. ResultDir
  8. TestDir
  9. UserName
  10. TestName
  11. UpdatingActiveScreen
  12. UpdatingCheckPoints
  13. GroupName
  14. ScenarioID
To get the values from the environment variables during the run time you should know the path of the folder where the test is located. 


Tuesday, September 18, 2012

How can you handle exceptions in QTP?


Exception handling is one of the major features of any test automation and testing software suite. The same is with the HP’s quick test professional which is also a test automation and software testing suite. 

How exceptions are handled in QTP?

- The exception handling thing is managed by the quick test professional by means of some recovery scenarios. 
- The basic goal of exception handling in quick test professional is to have the tests running even if some unexpected failure is encountered. 
- There is some memory space associated with the applications that are tested. 
- This memory space is hooked by the HP quick test professional and this in turn gives rise to some exceptions which may cause the quick test professional to falter, terminate and become unrecoverable. 
- The recovery scenarios used by the quick test professional come in built with the whole software package. 
- But it is not always beneficial to rely on the recovery scenarios rather it is always better if you can handle the exceptions and errors yourself. 
- A recovery scenario manager is also available which has an in – built wizard using which you yourself can define you very own recovery scenarios. 
- This wizard can be accessed by going to the tools menu and then selecting the option “recovery scenario manager”. 
- These recovery scenarios deal in three steps as stated below:
  1. Triggered events
  2. Recovery steps and
  3. Post recovery test run.
Some may think that using the recovery scenarios is the only option for handling the exception in quick test professional but it is not so.  

- Another option is which involves the use of descriptive programming.
- This approach is better than the former option since using it your application can gain more visibility and robustness. 
- Though, the recovery manager can be used for many scenarios but some of the real time scenarios cannot be handled using it. 
- In such cases descriptive programming is the alternative. 
- Third option will be make use of the exception handling capabilities of the visual basic script like the following:
  1. Err object
  2. On error resume next
  3. On error go to 0 statements and so on.
- The last two can be used at the script level. 
- The in–built recovery scenario of the quick test professional supports only 4 exceptions:
  1. Object state exceptions
  2. Pop up exceptions
  3. Application crash exceptions and
  4. Test run error exceptions
- A simple example is when you play back the recorded script, the AUT screen is minimized and a run time error is generated as “object not visible”.
- A “test run handler” can be used for this. 
- Four trigger events have been defined during which the recovery manager is supposed to be used:
  1. When  a pop up window appears while an application is open for the test run,
  2. When the value or the state of a property of an object changes,
  3. When a step in the test run becomes unsuccessful or fails terribly, and
  4. When the open application itself fails while the test is in progress.
- All of the above mentioned 4 triggers are nothing but exceptions. 
- The quick test professional can be instructed accordingly regarding how to recover from an unexpected event or failure that occurred during the test run in the application development environment. 
- Separate individual files can be created for different scenarios as per the requirements. 
- If you search the web you can find an advance qtp script that can attach as well as enable the recovery scenario file when the test run is in progress. 


Explain Quick Test Professional (QTP) Testing process?


The quick test professional is a software package that facilitates both the test automation as well as the software testing. To be an expert in quick test professional it is important that you understand both the test automation and software testing using the quick test professional. 
When the software testing process is carried out using the quick test professional it is referred to as the quick test professional test process. By now you must have got it that the emphasis of this article is on the same testing process. 
To say the quick test professional testing process constitutes of the following steps as mentioned below:
  1. Configuring of the record and run settings
  2. Creating an object repository (this step is optional is many cases)
  3. Creating the basic automation scripts
  4. Editing or enhancing the script
  5. Executing the script
  6. Debugging the script
  7. Analyzing the results
  8. Summarizing the results (this includes tracking the discovered defects and generating the report)

Major stages of the QTP testing process

1. Analyzation of the application
- This is the first test and is aimed at finding your testing needs. 
- This phase involves the type determination of the development environment of your application i.e., whether it is a web application or a windows application. 
- In either of the cases, you will need to load your quick test professional software with appropriate add ins. 
- There are available separated add – ins for both the web type and windows type applications. 
- These add – ins are required since they only give the power to quick test professional to identify as well work with the objects present in the application. - Next thing to determine are the business processes and functionality required. 
- For determining these two things you need to think about what your customer will do with the application. 
- The required business processes are then divided in to smaller groups or units and the actions based on these units are created. 
- This is done so because with smaller modular actions it becomes easy to read, follow and maintain the tests in the long term.

2. Preparation of the testing infrastructure: 
- Based on the needs that you determined in the first phase, the resources required are determined in this second phase. 
- The resources are either obtained or created as required. 
- The resources may include the following:
      a)   Object repositories along with the test objects.
      b)   Function libraries along with the functions that add to functionality of the quick test professional and so on.
- Also in this phase the settings of the quick test professional are configured as per the tasks need to be performed.

3. Building of the tests and addition of the steps to them: 
- By now the testing infrastructure is complete and now you can start developing your tests. 
- Any number of empty tests can be created and actions can be added to them so as to form the testing skeletons. 
- Relevant actions can be associated with the corresponding object repositories.
- Relevant tests can be associated with the function libraries. 
- Steps can be inserted with the help of key words and test preferences are also considered.

4. Enhancement of the test: 
- This phase includes insertion of the checkpoints so that you can easily search for a specific value of object, page or text etc and know whether or not your application is functioning properly.

5. Debugging, execution and analyzation of the test: 
- This phase ensures that the application is working without encountering any interruption. 
- Only if a test is running properly, it can correctly check the behavior of the application.

6. Reporting of the defects: 
- The defects discovered can be reported to the quality center if you have it installed on your machine. 


Monday, September 17, 2012

Explain about the QTP Automation Object Model? What is the use of Text output value in QTP?


Automation object model or AOM is one of the important utilities provided by the quick test professional and this is what that has been discussed in this article. 
Before going on to the main topic we shall discuss about what an object model is?

What is an Object Model?

- An object model can be considered to be a structural representation of the classes or the software objects that are responsible for the implementation of the software system or application. 
- A set of classes and interfaces is defined by an object model along with their other aspects like:
  1. Relationships between them
  2. Events
  3. Methods
  4. Their properties and so on.

What is Quick Test Professional Automation Object Model?

- The quick test professional automation object model can be used to write the test scripts. 
- The test scripts that are written using the qtp automation object model are used in the process of the automation of the operations of the quick test professional. 
- Objects, their methods and properties are provided by the qtp automation object model which enables the tester to control the quick test professional via some other software system or application. 
- For automating any of the quick test professional operations scripting languages like those mentioned below:
  1. Java Script
  2. Visual C++
  3. .net
  4. Visual basic script and so on.
- This quick test professional automation object model basically serves the purpose of automating the operations of the quick test professional. 
- With the new version of the quick test professional automation object model the test management process can be also automated. 
- With this feature a virtual control over each and every feature of the quick test professional can be maintained and also grants power to control the capabilities. 
- The capabilities can be controlled with the properties, methods and objects that are included with the quick test professional automation object model. 
- The quick test professional automation object model has made it quite easy to perform the quick test operations multiple times in multiple tests. 
- There is no need to open the quick test application software again and again. - There are several other tasks that can be performed using the quick test professional like:
  1. Such scripts can be written that can modify the properties of the test object description in the object identification dialog box.
  2. Scripts that can perform an update run on all the tests can be written.
  3. A newly installed add- in can be associated to all the relevant tests by means of an automation script.
  4. Automation scripts for running a selected batch of tests can be written.
  5. In quick test professional the settings for a test can be defined. Then clicking up on the “generate script” will generate an automation script that will be based up on the current settings of the test. These same current test settings then can be applied to multiple tests automatically without any manual intervention.
- The automation object model is considered to be a collection of objects, their methods and properties by most of the people.
- Any of the quick test operation that has been described in the quick test professional interface can be performed throughout this quick test professional automation object model. 
- It would not be wrong to say that the automation object model is a concept that is implemented in order to automate the whole quick test professional.

Use of Text Output Value in QTP

- There are certain types of output values in qtp and text output value is one of them. 
- With the help of these values the values which the software system or application is taking can be viewed. 
- They provide a means for capturing the values taken by the application in every run and put them in the data table. 


Facebook activity