Pages

Custom Search

Important Elements of QTP Tools Window

Key Elements of QTP Tool Window

1) Test Pane:
It is programming interface of QTP, used for creating, editing, viewing and deleting test scripts.

Test: It is a set of statements or set of one or more actions. (It is a local concept)

Action: It is a set of Statements. (It is a local concept)

Statement: A minimal executable unit. Statements may have keywords. (Keyword such as function, method, statement etc). It is a global concept.

Test pane has 2 views.

Expert view- Test in VB script format.
Key word view- Test in Icon based GUI format.

Note1: Here in test pane Test is same but views are different, if you perform any modifications in one view those automatically reflects in another view.

Note 2: Technical users use expert view and business user use key word view.

Note 3: User can customize Test pane view options.

Navigation: Tools Menu> view options> we can use font size and colors etc.

2) Active Screen
It has an optional element of QTP, it takes snap shots of every statement that user performed action or operation on AUT.

It can be used for understanding and editing the test easily.

Navigation: View menu>active screen (for launching and closing)

Configuring Active Screen: view>options>active screen tab>increase /Decrease capture level, apply and okay.

Note 1: Generally novice testers use this feature but it occupies lot of memory space on QTP.

3) Data Table
It has an integrated spread sheet (Excel like), used for Data driven testing.

Navigation: View menu>Data table (for launching and closing)

Data driven Testing: Testing the same task(S) or same operation with multiple sets of test data.

It can be used in two ways.

1. Enter test data directly into Data Table and use.

2. Importing data from external files (Flat files, excel sheets, etc) and Data bases (MS access, Sql Server, oracle, etc.)

It has two types of sheets.

1). Global Sheet- for entire Test /used for all actions in the Test.
2). Action Sheets- for specific Action only.

Data table available in 2 ways:

1). Design time data table. (Attached with every test)
2). Run time data table. (Available in result window)

Run time is a carbon copy of design time data table.
QTP has Data table methods for performing operations on data table.

4) Debug Viewer
It is used for locating and rectifying or fixing errors.
It can be used for debugging the tests by step-by-step execution.

We use Step into, Step over and Step out commands for debugging. (debug commands)

Navigation: View menu>debug viewer (for launching and closing)

Through Debug viewer user can watch variables and change values of variables temporarily.

5) Missing Resources

It can be used for showing missing resources that attached to current test such as (Recovery Scenarios, Library files etc).

Navigation: View menu >missing resources (for launching and closing)

6) Information
This pane shows syntax errors automatically during saving the test.
Navigation: view menu> information

7) QTP Commands
QTP Commands are available in 3 ways.

1). Menu options
2). Tool Bar options
3). Short cut keys (for Some important operations only)

QTP Tool Window Menus

File menu: Through file menu user can create, save tests, open existing tests, export tests in zip format.


Edit Menu: It provides editing options and renaming, deleting and splitting actions.

View menu: Through this menu we can launch and close, active screen, Data Table, Debug viewer, information, missing resources etc.

Insert Menu: Through this menu user can inserting check points, out put values, synchronizing points.

In this menu step generator available, using this user can generate recordable and non-recordable scripts.

Through insert menu user can insert VB Script conditional and loop statements and transaction points (Start and End).

Through insert menu user can create new actions, call existing actions and copy existing actions.

Automation Menu: This menu provides Record, Run options and Run setting options

Through this menu we can start normal recording, analog recording and Low level recording.

Through this menu we can stop recoding, running and also we run tests.

Resources Menu: This menu provides object repository and recovery scenarios options.

Through this menu we can create /modify/delete objects information and we can associate repositories.

Through this menu we can create, modify and delete recovery scenarios.

Debug Menu:

This menu provides debug commands for step by step execution.

Through this menu we can insert/remove/break points.

Tools Menu: This menu provides Tools settings option, view options and object identification configuration.

Through this menu we can set tool options as well as test pane view options.

In this menu object spy option available, through this we can get object's information.(Properties and values)

In this menu Virtual object option available; through this option we can create virtual objects.

Window Menu: This menu provides QTP tool window style settings.

Help Menu: This menu provides QTP help as well as VB Script help.
Through this menu we can contact technical support people and we can send feedback.
Through this menu we can check for updates and download or install directly.

An overview on Test Automation


An overview on Test Automation

Test Automation

Basically Software Testing is 2 types

1) Manual Testing
2) Test Automation

Manual Testing:
Testing software manually is called Manual Testing. we can test all accepts of software manually. 

Below Testing Types can be tested manually

Test Types:
a) Functional Testing
b) Regression Testing
c) GUI Testing
d) Usability Testing
e) Security Testing
f) Compatibility Testing
g) Recovery Testing
h) Reliability testing
Etc…
 

Drawbacks of Manual Testing

(i)Time consuming.
(ii) More resources required.
(iii)Human Errors
(iv)Repetition of the Task is not much
(v)Tiredness
(vi)Simultaneous auctions are not possible (Parallel) 


Test Automation:

Testing Software using any Automation tools is called Test Automation

Advantages of Test Automation:

a) Fast: Tools are faster in execution than human users

b) Reliable: Tools are reliable in complex calculations and tasks

c) Reusable: we can reuse Automated Tests at any number of times

d) Repeatable: we can repeat same operations for required number of times

e) Programmable:we can use flow control statements for appalying logic

f) Comprehensive: we can execute test batches without human interaction also 


Test Automation can be used in below areas of Testing:

a)  Functional & Regression Testing

b) Load/Stress/Performance Testing

c) Security Testing

d) Unit Testing

Drawbacks of Automation Testing
1)It is expensive
2)We cannot automate all areas.
3)Lack of expertisation.
4)It has some limitations (It cannot test every thing) 


Which Software Testing should be automated?

Tests that need to be execute of every build of the application (Sanity Testing)
 

Tests that use multiple data values (Retesting / Data Drives Testing) 

Tests that required data from application intimates (G.U.I. Attributes) Load and Stress Testing

Which Software Testing should not be automated?

 

Usability Testing One time testing
 

Quick look Tests or A.S.A.P (As soon as possible) Testing Ad-hoc testing / Random Testing
 

Customers requirement are frequently changing.

QTP Supports

QUICK TEST PROFESSIONAL


QTP is a Functionality Testing Tool developed by Mercury Interactive later merged with HP

QTP has released in following Versions. 5.5 6.5 8.0 8.2 9.0 9.1 9.2

9.5

10.0 (Latest)

License

They are Two types of licenses (1) Seat License (Single User) and (2) Concurrent License (Multiple Users).

Technologies


QTP 9.2 Supports following Technologies

.Net, VB, JAVA, ActiveX Controls, Web Servers, People Soft, SAP, Oracle, Terminal Emulators, HTML, DHTML, XML ….. etc.,

QTP 9.5 Supports following Technologies

Power Builder, Oracle Forms10, Apps 12, New Terminal Emulator Versions (Mainframe Application Technologies), .Net (3.5)

Environments


QTP 9.2 Support on following Environment

Windows 2000 Server, 2000 Professional, 2003 Server, XP etc.,

QTP 9.5 Support on following Environment

Windows Vista (64 Bit), Eclipse (3.2 & 3.3), Netscape 9.0, Firefox (3.0)



Note:

QTP does not support on Linux / Unix Operating Systems. X-Runner supports on Linux / Unix Operating System.

QTP can support client / Server, Web Applications.

QTP Records the business operations in VB Script (It can also support JAVA Script)

QTP can support Multimedia Applications such as Flash, Windows Media Player, Real Video etc.,

AUTOMATION TESTING

MANUAL TESTING

Testing an application with human interaction is called Manual Testing.

Drawbacks of Manual Testing

(i) Time consuming.

(ii) More resources required.

(iii) Human Errors

(iv) Repetition of the Task is not much

(v) Tiredness

(vi) Simultaneous auctions are not possible (Parallel)

Automation Testing

Testing an application with 3rd Party Software help is called Automation

Testing.

(or)

Testing an application with an Automation Tool is also called as

Automation Testing.

Benefits of Automation Testing:

a) Fast

b) Reliable

c) Repeatable

d) Reusable

e) Comprehensive

f) Programmable.

a) Fast

Automation tool runs tests significantly more faster than human

users.

b) Reliable

Automation tool can perform the same operation each time, if you repeated multiple times, so that we can eliminate human errors.

c) Repeatable

We can check how application or website reacts after repeated the same operation with multiple times.

d) Reusable

Automation scripts are reusable on different version of the application of websites even if the user interfaces changes.

e) Comprehensive

In automation testing we can build a suit of tests that covers every feature in the application or website.

f) Programmable.

We can program sophisticated Tests that bring out hidden information from the application.

Drawbacks of Automation Testing

1) It is expensive

2) We cannot automate all areas.

3) Lack of expertisation.

4) It has some limitations (It cannot test every thing)

Which Software Testing should be automated?

Tests that need to be execute of every build of the application (Sanity Testing)

Tests that use multiple data values (Retesting / Data Drives Testing) Tests that required data from application intimates (G.U.I. Attributes) Load and Stress Testing

Which Software Testing should not be automated?

Usability Testing One time testing

Quick look Tests or A.S.A.P (As soon as possible) Testing Ad-hoc testing / Random Testing

Customers requirement are frequently changing.

Type of Tools

Generally they are (4) Types of tools are available in the market. They are

1) Functional Tools:

QTP, WinRunner, Silktest, Rational Robot, TestPartner, etc.,

2) Performance Tools:

LoadRunner, J-Meter etc.,

3) Test Management Tools:

Quality Center (QC), Test Director.

4) Version Control Tools

VSS (Visual Safe Source), PVCS (Polytron Version Control System) etc.,

Automation Frameworks

There are several test automation frameworks available, among these the selection is made based on the factors such as reusability of both the scripts and the test assets. The different test automation frameworks available are as follows,
 Test Script Modularity
 Test Library Architecture
 Data-Driven Testing
 Keyword-Driven or Table-Driven Testing
 Hybrid Test Automation

Framework 1: Test Script Modularity

The test script modularity framework is the most basic of the frameworks. It's a well-known programming strategy to build an abstraction layer in front of a component to hide the component from the rest of the application.
This insulates the application from modifications in the component and provides modularity in the application design. When working with test scripts (in any language or proprietary environment) this can be achieved by creating small, independent scripts that represent modules, sections, and functions of the application-under-test.
Then these small scripts are taken and combined them in a hierarchical fashion to construct larger tests. The use of this framework will yield a higher degree of modularization and add to the overall maintainability of the test scripts.

Framework 2 : Test Library Architecture

The test library architecture framework is very similar to the test script modularity framework and offers the same advantages, but it divides the application-under-test into procedures and functions (or objects and methods depending on the implementation language) instead of scripts.
This framework requires the creation of library files (SQABasic libraries, APIs, DLLs, and such) that represent modules, sections, and functions of the application-under-test. These library files are then called directly from the test case script.

Much like script modularization this framework also yields a high degree of modularization and adds to the overall maintainability of the tests.

Framework 3: Data-Driven Testing

A data-driven framework is where test input and output values are read from data files (ODBC sources, CVS files, Excel files, DAO objects, ADO objects, and such) and are loaded into variables in captured or manually coded scripts. In this framework, variables are used for both input values and output verification values.

Navigation through the program, reading of the data files, and logging of test status and information are all coded in the test script. This is similar to table-driven testing (which is discussed shortly) in that the test case is contained in the data file and not in the script; the script is just a "driver," or delivery mechanism, for the data. In data-driven testing, only test data is contained in the data files.

Merits of data-driven testing

The merits of the Data-Driven test automation framework are as follows,

Ø Scripts may be developed while application development is still in progress

Ø Utilizing a modular design, and using files or records to both input and verify data, reduces redundancy and duplication of effort in creating automated test scripts

Ø If functionality changes, only the specific "Business Function" script needs to be updated

Ø Data input/output and expected results are stored as easily maintainable text records.

Ø Functions return "TRUE" or "FALSE" values to the calling script, rather than aborting, allowing for more effective error handling, and increasing the robustness of the test scripts. This, along with a well-designed "recovery" routine, enables "unattended" execution of test scripts.



Demerits of data-driven testing

The demerits of the Data-Driven test automation framework are as follows,

Ø Requires proficiency in the Scripting language used by the tool (technical personnel)

Ø Multiple data-files are required for each Test Case. There may be any number of data-inputs and verifications required, depending on how many different screens are accessed. This usually requires data-files to be kept in separate directories by Test Case

Ø Tester must not only maintain the Detail Test Plan with specific data, but must also re-enter this data in the various required data-files

Ø If a simple "text editor" such as Notepad is used to create and maintain the data-files, careful attention must be paid to the format required by the scripts/functions that process the files, or script-processing errors will occur due to data-file format and/or content being incorrect

Framework 5: Hybrid Test Automation Framework

The most commonly implemented framework is a combination of all of the above techniques, pulling from their strengths and trying to mitigate their weaknesses. This hybrid test automation framework is what most frameworks evolve into over time and multiple projects. The most successful automation frameworks generally accommodate both Keyword-Driven testing as well as Data-Driven scripts.

This allows data driven scripts to take advantage of the powerful libraries and utilities that usually accompany a keyword driven architecture. The framework utilities can make the data driven scripts more compact and less prone to failure than they otherwise would have been.
The utilities can also facilitate the gradual and manageable conversion of existing scripts to keyword driven equivalents when and where that appears desirable. On the other hand, the framework can use scripts to perform some tasks that might be too difficult to re-implement in a pure keyword driven approach, or where the keyword driven capabilities are not yet in place.

0 comments

Labels: Automation Framework

Framework 4: Keyword-Driven Testing

This requires the development of data tables and keywords, independent of the test automation tool used to execute them and the test script code that "drives" the application-under-test and the data. Keyword-driven tests look very similar to manual test cases. In a keyword-driven test, the functionality of the application-under-test is documented in a table as well as in step-by-step instructions for each test. In this method, the entire process is data-driven, including functionality.



Example

In order to open a window, the following table is devised, and it can be used for any other application, just it requires just changing the window name.



Test Table for Opening a Window

Window


Control


Action


Arguments

Window Name


Menu


Click


File, Open

Window Name


Menu


Click


Close

Window Name


Pushbutton


Click


Folder Name

Window Name





Verify


Results

Once creating the test tables, a driver script or a set of scripts is written that reads in each step executes the step based on the keyword contained the Action field, performs error checking, and logs any relevant information.

Merits of keyword driven testing

The merits of the Keyword Driven Testing are as follows,

Ø The Detail Test Plan can be written in Spreadsheet format containing all input and verification data.

Ø If "utility" scripts can be created by someone proficient in the automated tool’s Scripting language prior to the Detail Test Plan being written, then the tester can use the Automated Test Tool immediately via the "spreadsheet-input" method, without needing to learn the Scripting language.

Ø The tester need only learn the "Key Words" required, and the specific format to use within the Test Plan. This allows the tester to be productive with the test tool very quickly, and allows more extensive training in the test tool to be scheduled at a more convenient time.

Demerits of keyword driven testing

The demerits of the Keyword Driven Testing are as follows,

Ø Development of "customized" (Application-Specific) Functions and Utilities requires proficiency in the tool’s Scripting language. (Note that this is also true for any method)

Ø If application requires more than a few "customized" Utilities, this will require the tester to learn a number of "Key Words" and special formats. This can be time-consuming, and may have an initial impact on Test Plan Development. Once the testers get used to this, however, the time required to produce a test case is greatly improved.