Sunday, September 23, 2007

Free Download QTP

Download QTP 9.0

How will you perform data driven testing inQTP

In automation, data driven testing is very inportant and if you are using QTP then you must be master of Keyword driven testing as well as data driven testing.

In QTP, data driven testing can be done by two ways
1. Using Global Sheet
2. Importing Excel Sheet in your script and fetching each row in a loop

The most professional and acceptable method is by importing excel sheet.

The following example uses the ImportSheet method to import the first sheet of the name.xls table to the name sheet in the test's run-time Data Table(I hope every body aware of run time data table)

DataTable.ImportSheet "C:\name.xls" ,1 ,"name"

To simply import excel sheet to run time data table then use.

Datatable.Import("c:\name.xls")

In order to fetch the current row you can make use of following method.

Datatable.GetCurrentRow

You can create one varible and store the value of current row and can use it, further in your script. This is more convienent in practice.

Wednesday, September 19, 2007

When will you use Keyword Driven Testing?

Recording Steps: When the application is new or major new functionality has been added to the module or when you have short span of time and the business requirement is not yet fulfilled and need to quickly create a test.

Keyword : It enables the user to create a test at business level rather than at object level. So we can modify the scripts easily as per the requirement and necessity.

Keyword Driven Testing

Generally people get confused with the Keyword driven testing and data driven testing.

Friends Keydriven testing is generally for QTP as we can develop script in QTP using keywords. Simply you can say it is technique which seaprates the programming work from the actual test steps. So we can develop the test using the already shared repositories and function libraries.

It divides test creation in two stages.

1. Preparing test automation infrastructure - It includes one ore more shared object repositories as well as function libraries
2. Creating test in Keyword view

Basic of QTP

QTP : Quick Test Professional

It is a Mercury Interactive Functional Testing Tool and uses VB scripting. QTP is based on two concept
1. Recording
2. Playback

It has three types of recording context/standard/normal recording, analog recording, low level recording. Novice user should know the process of testing in QTP

1. Application should be testable
2. Preparing a set of testing reseources(object respositories, function libraries)
3. Recording session
4. Enhancing your test
5. Debugging Test
6. Running Test
7. Analayzing Test Result
8. Reporting defects