Welcome To Automation Testing

Before starting with tips of automation of SAP using QTP Let me give a small introduction of SAP and QTP.

SAP stands for System Applications and Products. It is the name of both the online financial and

Administrative software and the company that developed it. SAP is made up of individual modules that perform various organizational system tasks.



Quick Test Professional (QTP) is an automated functional Graphical User Interface (GUI) testing tool that allows the automation of user actions on a web or client based computer application.

It is primarily used for functional regression test automation. QTP uses a scripting language built on top of VBScript to specify the test procedure, and to manipulate the objects and controls of the application under test. It supports many applications through the support of add-ins.



We will be using SAP add-in with QTP to work on the SAP automation.

Thursday 27 September 2012

Generating random number in vbscript

I have received couple of mails regarding generating random number in vbscript. So here i am with the post on random number.

There are two ways of generating random numbers in VBScript which are as follows:



1. Using randomize keyword.

'consider the below example of generating a random number between 10 -99, i.e., 2 digit number.

intMaxValue=99 '
intMinValue=10

Randomize  'This will generate a unique number every time
         
intRndVariable= Int((intMaxValue-intMinValue+ 1) * Rnd +intMinValue)


intRndVariable will hold the random number.



2. Use RandomNumber function

intRandomNumber=RandomNumber(intLoweLimit,Upperlimit)

e.g., a=RandomNumber(10,99)