Creating and Calling user define funtion

Test Conditons: Creating and Calling user define funtion

1. Crate small add function and make it compile module.

2. calling that function in other test (using user defined data values)


[ Pre Requesties : Nothing ]

1a. open win runner blank test and add this below data

public function add(in a, in b)
{
return a+b;
}


1b. Go to File menu --> Test Properties (Test Properties window will open)
in General Tab --> Test Type= Compile module and ok

1c.Save the test in some location (Ex c:/tt )

2a.Before writing code , you have to load the funtction in to your folder , globally available to all tests.

2b. Go to Tools menu --> General Options
--- Select Folder option in the left pan.
-- Search Path for called test below enter the path of compile module
(c:/tt) and press "+" button to add in to.

2c. Write down the bleow code in the new test

load("c:/tt");
l= create_input_dialog("Enter First value");
j=create_input_dialog("Enter Second Value");
k=add(l,j);
report_msg(k);
unload("c:/tt");


[ load( ) , unload ( ) - to lload and unload from the memory ]

[Same way You can use Winrunner TSL Script to User Defined function

Diff between Image & Bit map Check point

Image checkpoints enable you to check the properties of a Web image. You can check an area of a Web page or application as a bitmap. While creating a test or component, you specify the area you want to check by selecting an object. You can check an entire object or any area within an object. QuickTest captures the specified object as a bitmap, and inserts a checkpoint in the test or component. You can also choose to save only the selected area of the object with your test or component in order to save disk Space For example, suppose you have a Web site that can display a map of a city the user specifies. The map has control keys for zooming. You can record the new map that is displayed after one click on the control key that zooms in the map. Using the bitmap checkpoint, you can check that the map zooms in correctly.

You can create bitmap checkpoints for all supported testing environments (as long as the appropriate add-ins are loaded).
Note: The results of bitmap checkpoints may be affected by factors such as operating system, screen resolution, and color settings.

How many ways we can parameterize data in QTP?

There are four types of parameters:
Test, action or component parameters enable you to use values passed from your test or component, or values from other actions in your test.

Data Table parameters enable you to create a data-driven test (or action) that runs several times using the data you supply. In each repetition, or iteration, QuickTest uses a different value from the Data Table.

Environment variable parameters enable you to use variable values from other sources during the run session. These may be values you supply, or values that QuickTest generates for you based on conditions and options you choose.

Random number parameters enable you to insert random numbers as values in your test or component. For example, to check how your application handles small and large ticket orders, you can have QuickTest generate a random number and insert it in a number of tickets edit field.

Choosing a test automation framework

There are lot of resources on the internet explaining different types of automation frameworks and how to go about selecting one of them those suites your environment.

Below are few links which provide you solid understanding of the software test automation frameworks.

http://www.ibm.com/developerworks/rational/library/591.html

www.research.ibm.com/journal/sj/411/rankin.pdf

http://www.wilsonmar.com/WRSAFS/Docs/CHAPTER1.doc

http://en.wikipedia.org/wiki/Test_Automation_Framework

www.michaeldkelly.com/images/Choosing_a_Test_Automation_Framework.PDF

www.logigear.com/resources/articles_lg/Automation_Framework.pdf