Wednesday, February 2, 2011

QTP FAQ 10

Here it goes:"C:Program FilesMercury InteractiveQuickTest PlusUtilitiesCommandLineQuickTestLauncher.exe" /t "C:Automated ScriptsRegressionReg_Drilling" /r "D:results1" /logThe Syntax will be:"" /t "" /r "" /log
Creates and returns a reference to an Automation object
syntax: CreateObject(servername.typename [, location])
Arguments
servername:Required. The name of the application providing the object.
typename : Required. The type or class of the object to create.
location : Optional. The name of the network server where the object is to be created.
Stub and driver is tempory programs which use to testing.

STUB : when main program is ready and sub modules are not ready at that time tester create tempory program which is called as "STUB". then connect main program with stub.
afterword perform testing.

DRIVER: when sub modules are ready and main program is not ready then software tester create driver tempory program to connect sub modules for testing.
QTP identifies the object in the application by Logical Name and Class.
Photoshop is a .Net application and QTP does recognises the objects of a .Net application
The Bitmap Check Point Information saved in the Below File:C:Program Files Mercury InteractiveQuick Test ProfessionalTestsAction NameRes1

QuickTest records and runs steps on ActiveX controls as it does on any other object.

Using the Insert>Step Option , we can activate ActiveX control methods, retrieve and set the values of properties and check the object exists.

It is recommended that to begin recording session before opening the application containing the ActiveX controls on which you want to record.
1. enter the data in data sheet(global/action).

2.right click on actionbutton it showing all possible codition.

3. choose run all Iteration row by row. in Qtp8.2

just choose optiones and run
Frame Work:
1.Smoke Testing - Environmental checkup of the application.
2.Driver - Business functionality
3.Application Business Functionality Execution
4.Verification checker
5.Reporter generation
6.Terminator
Code file extension is.vbs and object repository is.tsr


scripts.mts for the code & objectrepository.bdb
Unlimited. Although I believe it will only support up to 255 excel documents. It then becomes a question of how much memory your system has...



The action sheet need to have a column name and using parametrizing the action specifying the sheet name. column name and iteration parameters, we can ensure that test run for each row in the action sheet
Right-click an object with the property or value you want to find in the Keyword View or Active Screen and choose Object Properties (or View/Add Object in the Active Screen), and then click the Repository button, choose Tools > Object Repository, or click the Object Repository toolbar button
Output values enable to view the values that the application talks during run time. When parameterized, the values change for each iteration. Thus by creating output values, we can capture the values that the application takes for each run and output them to the data table.
To know the size follow following steps

1) First export repository from tools-> object repository ->export

2 Then save it to some location and after that check the size of the file


If a check point fails qtp interuppts the executions and waits for user interaction . it displays a window which contains various options like stop,skip,debug...

by clicking stop u can break the test execution
Data driven Testing where you can drive whereas data with one application to check wheather it works for variable data (many inputs),keyword driven testing where the key word(keywordinput) of that perticular applicaton can be driven
Once a tester has run a test, a Test Fusion report displays all aspects of the test run: a high-level results overview, an expandable Tree View of the test specifying exactly where application failures occurred, the test data used, application screen shots for every step that highlight any discrepancies, and detailed explanations of each checkpoint pass and failure. By combining Test Fusion reports with Quick Test Professional, you can share reports across an entire QA and development team.
You need to select multimedia add-in to test flash objects in your test at start menu , or else id you are already opened qtp and want to enable or to load multimedia ad-in, you goto or slect or open test settings-->>select properties tab -->> click modify you are able to view add-in which or loaded and also addin's supportedd by QTP you need to check un check check boxes according to you requirement then click save.
In my veiw V-Model(it is one of the sdlc model) is the best model for qa's becoz in all phases of v-model qa role is must be there and qa has to do review's from starting phase to ending phase. qa is process oriented,his task

is to do verification it involves reviewing the plans and all documents . overall

he prevents the defects
We can test data reports by using descriptive programming
You can instruct QTP to recover unexpected events or errors that occured in your testing environment during test run. Recovery scenario manager provides a wizard that guides you through the defining recovery scenario. Recovery scenario has three steps
1. Triggered Events
2. Recovery steps
3. Post Recovery Test-Run
The syntax of a Function:

[Public [Default] | Private] Function name [(arglist)] [statements] [name = expression] [Exit Function] [statements] [name = expression]End Function
Arguments
Public
Indicates that the Function procedure is accessible to all other procedures in all scripts.
Default
Used only with the Public keyword in a Class block to indicate that the Function procedure is the default method for the class. An error occurs if more than one Default procedure is specified in a class.
Private
Indicates that the Function procedure is accessible only to other procedures in the script where it is declared or if the function is a member of a class, and that the Function procedure is accessible only to other procedures in that class.
name
Name of the Function; follows standard variable naming conventions.
arglist
List of variables representing arguments that are passed to the Function procedure when it is called. Commas separate multiple variables.
statements
Any group of statements to be executed within the body of the Function procedure.
expression
Return value of the Function.
Note: So, to return a value, assign the return value to the function name.

For Eg:

Function BinarySearch(. . .)
. . .
' Value not found. Return a value of False.
If lower > upper Then
BinarySearch = False
Exit Function
End If
. . .
End Function
Mercury has determined that 1.4 MB is the maximum size of a XML file that QTP 6.5 can handle.

A red color indicates failure. Here we analyze the cause for failure whether it is a Script Issue or Environment Issue or a Application issue.

Keyword driventesting is new concept in qtp.

QTP has two views:

1.Keyword view

2. expert view

in keyword view one can see the object ,the operation performed on it and it's value

In keyword driven testing you use the recorded object to generate operations on it.

i mean you select a object and press f7 or right click the mouse and select insert step menu.that way you can generate code without having to generate it manually.

This is called keyword driven testing.Each object visible can be thaught of as keyword

DataDriven testing:

Datadrivent testing means testing the same functionality of application with different set of data to check whether it works on all kind of data.

For this case you parameterize a step in qtp,put alll the data values in datatable and run the script for number of iterations equal to number of rows in datatable.


msgbox Browser("QTP : How do you retrieve").Page("QTP : How do you retrieve").Frame("google_ads_frame").Link("Fast Object Db/ODBMS").GetROProperty("micclass")

If a script is not reusable then you can call it in other script by using call to copy action.

for the date format "dd/mm/yyyy" the equivalent regular expression would be

Set regExp_Term = New RegExp
regExp_Term.pattern = "11/11/1981"
validation=regExp_Term.test("date to be validated")

if validation="True" Then

-----------------

End If


regular expressions are used while defining the property values of an object,while parameterize a step,while creating checkpoints with varying values

Q.131 How you write scripts in QTP? What's the main process in QTP? How do you run scripts in QTP?
Main process in QTP is Recording, stores the properties in object repository then Running the script and then Test Results.

Recording: QTP 'looks' at the object on which we are recording and stores it as a test object, determining in which test object class it fits like standard window dialog box or web button etc. Then for each test object class, QTP has list of mandatory properties that it always learns. When we record an object, QTP learns these default property values, and then 'looks' at the rest of the objects in the page , to distinguish and identify the object uniquely.If not it adds assistive properties , one ny one, to the description, until it has compiled a unique description.If no assistive properties are not available , it adds a special 'ordinal identifier' such as objects location on the screen.

Running the scripts: While running the script, QTP searches for a run time object that exactly matches the description of the test object it learned while recording. If it is not matching, QTP uses ' smart identification' mechanism to identify the object.

We can run the scripts from Test>Run

After running the script we can see the Test Results also .
Ya QTP has this facility

for this u r require to create dsn and then recordset for more information refer

QTP plus help file it contain code how to write SQL statment for the QTP

means "database connection" help
While opening the test the open dialog box opens

there is check box like as read only as it is on

then the test is read only

"while open the test uncheck the read only"

No comments:

Post a Comment