Important QuickTest Professionals (QTP) Interview Questions
Q – 1 How to make arguments optional in a function?
Ans- this is not possible as default VBS doesn’t support this. Instead you can pass a blank scring and have a default value if arguments r not required.
Q – 2 How to verify the Cursor focus of a certain field?
Ans- Use “focus” property of “GetRoProperty” method”
Q – 3 Any limitation to XML Checkpoints?
Ans- Mercury has determined that 1.4MB is the maximum size of a XML file that QTP 6.5 can handle
Q – 4 How to add a runtime parameter to a datasheet?
Ans- DataTable.LocalSheet
The following example uses the LocalSheet property to return the local sheet of the run-time Data Table in order to add a parameter (column) to it.
MyParam=DataTable.LocalSheet.AddParameter(“Time”, “5:45”)
Q – 5 How to retrieve the property of an object?
Ans- using “GetRoProperty”.
Q – 6 How to open any application during Scripting?
Ans-
SystemUtil , object used to open and close applications and processes during a run session.
(a) A SystemUtil.Run statement is automatically added to your test when you run an application from the Start menu or the Run dialog box while recording a test
E.g : SystemUtil.Run “Notepad.exe” SystemUtil.CloseDescendentProcesses ( Closes all the processes opened by QTP )
Q – 7 How to covert a String to an integer?
Ans- CInt()—> a conversion function available.
Q – 8 Explain the terms TEST and Business Component?
Ans- Test-A collection of steps organized into one or more actions, which are used to verify that your application performs as expected. By default each test begins with a single action. Business Component-A collection of steps representing a single task in your application.
Business components (also known as components) are combined into specific scenarios to build business process tests in Mercury Quality Center with Business Process Testing. A component does not contain actions, you add steps directly to a componenet.
Q – 9 What do you mean by iteration?
Ans- Each run session that uses a different set of parameterized data is called an iteration.
Q – 10 What are the views available in QuickTest Professional (QTP)?
Ans-
(1) Keyword View
(2) Expert View
Q – 11 How many Add-ins comes by default with QuickTest Professional (QTP)?
Ans- There are 3 Add-ins comes with QTP:
(1) ActiveX
(2) Visual Basic
(3) Web
Q – 12 What is output value?
Ans- An output value is a value retrieved during the run session and entered into your Data Table or saved as a variable or a parameter. Each run session that uses a different set of parameterized data is called an iteration.
Q – 13 How many tabs are available in Debug Viewer Pane?
Ans- The Debug Viewer pane contains three tabs to assist you in debugging your test or component-Watch Expressions, Variables, and Command. Watch Expressions The Watch Expressions tab enables you to view the current value of any variable or other VBScript expression.
Variables The Variables tab enables you to view the current value of all variables that have been recognized up to the last step performed in the run session.
Command The Command tab enables you to execute a line of script in order to set or modify the current value of a variable or VBScript object in your test or component. When you continue the run session, QuickTest uses the new value that was set in the command.
Q – 14 What is Active Screen?
Ans- The Active Screen provides a snapshot of your application as it appeared when you performed a certain step during a recording session.
Q – 15 Explain different recording modes?
Ans- QuickTest’s normal recording mode records the objects in your application and the operations performed on them. This mode is the default and takes full advantage of QuickTest’s test object model, recognizing the objects in your application regardless of their location on the screen.
Analog Recording – enables you to record the exact mouse and keyboard operations you perform in relation to either the screen or the application window. In this recording mode, QuickTest records and tracks every movement of the mouse as you drag the mouse around a screen or window.
This mode is useful for recording operations that cannot be recorded at the level of an object, for example, recording a signature produced by dragging the mouse. Note: You cannot edit analog recording steps from within QuickTest. ?
Low-Level Recording – enables you to record on any object in your application, whether or not QuickTest recognizes the specific object or the specific operation. This mode records at the object level and records all run-time objects as Window or WinObject test objects.
Use low-level recording for recording tests in an environment or on an object not recognized by QuickTest. You can also use low-level recording if the exact coordinates of the object are important for your test. Note: Steps recorded using low-level mode may not run correctly on all objects.
Q – 16 Explain different types of checkpoints?
Ans- There are 10 types of checkpoints you can insert: Standard Checkpoint checks the property value of an object in your application or Web page. The standard checkpoint checks a variety of objects such as buttons, radio buttons, combo boxes, lists, etc. Image
Checkpoint checks the value of an image in your application or Web page. For example, you can check that a selected image’s source file is correct. Bitmap Checkpoint checks an area of your Web page or application as a bitmap. Table Checkpoint checks information within a table.
For example, suppose your application or Web site contains a table listing all available flights from New York to San Francisco. You can add a table checkpoint to check that the time of the first flight in the table is correct. Text Checkpoint checks that a text string is displayed in the appropriate place in your application or on a Web page.
Text Area Checkpoint checks that a text string is displayed within a defined area in a Windows application, according to specified criteria. Accessibility Checkpoint identifies areas of your Web site that may not conform to the World Wide Web Consortium (W3C)
Web Content Accessibility Guidelines. Page Checkpoint checks the characteristics of a Web page. For example, you can check how long a Web page takes to load or whether a Web page contains broken links.
Database Checkpoint checks the contents of a database accessed by your application. XML Checkpoint checks the data content of XML documents in XML files or XML documents in Web pages and frames.
Q – 17 How many types of parameters are there?
Ans- There are four types of parameters: 1. Test, action or component parameters 2. Data Table parameters 3. Environment variable parameters 4.
Random number 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.0 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.
Q – 18 What is parameter in QTP?
Ans- A parameter is a variable that is assigned a value from an external data source or generator. If you wish to parameterize the same value in several steps in your test or component, you may want to consider using the Data Driver rather than adding parameters manually.
Q – 19 When and Why to use Descriptive programming?
Ans- Below are some of the situations when Descriptive Programming can be considered useful:
The objects in the application are dynamic in nature and need special handling to identify the object. The best example would be of clicking a link which changes according to the user of the application, Ex. “Logout <>”.
When object repository is getting huge due to the no. of objects being added. If the size of Object repository increases too much then it decreases the performance of QTP while recognizing a object.
When you don’t want to use object repository at all. Well the first question would be why not Object repository? Consider the following scenario which would help understand why not Object repository
Scenario 1:
Suppose we have a web application that has not been developed yet. Now QTP for recording the script and adding the objects to repository needs the application to be up, that would mean waiting for the application to be deployed before we can start of with making QTP scripts.
But if we know the descriptions of the objects that will be created then we can still start off with the script writing for testing
Q – 20 How to use Descriptive programming?
Ans-
There are two ways in which descriptive programming can be used
By creating properties collection object for the description.
By giving the description in form of the string arguments.
By creating properties collection object for the description.
To use this method you need first to create an empty description
Dim obj_Desc ‘Not necessary to declare
Set obj_Desc = Description.Create
Now we have a blank description in “obj_Desc”. Each description has 3 properties “Name”, “Value” and “Regular Expression”.
obj_Desc(“html tag”).value= “INPUT”
Q – 21 When should I use SMART Identification?
Ans- SMART Identification
Smart Identification is nothing but an algorithm used by QTP when it is not able to recognize one of the object. A very generic example as per the QTP manual would be, A photograph of a 8 year old girl and boy and QTP records identification properties of that girl when she was 8, now when both are 10 years old then QTP would not be able to recognize the girl.
But there is something that is still the same, that is there is only one girl in the photograph. So it kind of PI (Programmed intelligence) not AI.
When should I use SMART Identification? Something that people don’t think about too much. But the thing is that you should disable SI while creating your test cases. So that you are able to recognize the objects that are dynamic or inconsistent in their properties.
When the script has been created, the SI should be enabled,so that the script does not fail in case of small changes. But the developer of the script should always check for the test results to verify if the SI feature was used to identify a object or not. Sometimes SI needs to be disabled for particular objects in the OR, this is advisable when you use
Q – 22 What is a Recovery Scenario?
Ans- Recovery scenario gives you an option to take some action for recovering from a fatal error in the test. The error could range in from occasional to typical errors. Occasional error would be like “Out of paper” popup error while printing something and typical errors would be like “object is disabled” or “object not found”.
A test case have more then one scenario associated with it and also have the priority or order in which it should be checked.
Q – 23 Can I change properties of a test object?
Ans- Yes. You can use SetTOProperty to change the test object properties. It is recommended that you switch off the Smart Identification for the object on which you use SetTOProperty function.
Q – 24 Where to use function or action?
Ans- Well answer depends on the scenario. If you want to use the OR feature then you have to go for Action only. If the functionality is not about any automation script i.e. a function like getting a string between to specific characters, now this is something not specific to QTP and can be done on pure VB Script, so this should be done in a function and not an action.
Code specific to QTP can also be put into an function using DP. Decision of using function/action depends on what any one would be comfortable using in a given situation.
Q – 25 What is checkpoint in QTP?
Ans- Checkpoint is basically a point in the test which validates for truthfulness of a specific things in the AUT. There are different types of checkpoints depending on the type of data that needs to be tested in the AUT. It can be text, image/bitmap, attributes, XML etc….
Q – 26 How can I check if a environment variable exist or not?
Ans- When we use Environment(“Param1”).value then QTP expects the environment variable to be already defined. But when we use Environment.value(“Param1”) then QTP will create a new internal environment variable if it does not exists already. So to be sure that variable exist in the environment try using Environment(“Param1”).value.
Q – 27 How can I import environment from a file on disk?
Ans- Environment.LoadFromFile “C:Env.xml”
Q – 28 How to connect to a database?
Ans- code:
Const adOpenStatic = 3
Const adLockOptimistic = 3
Const adUseClient = 3
Set objConnection = CreateObject(“ADODB.Connection”)
Set objRecordset = CreateObject(“ADODB.Recordset”)
objConnection.Open “DRIVER={Microsoft ODBC for Oracle};UID=;PWD=
”
objRecordset.CursorLocation = adUseClient
objRecordset.CursorType = adopenstatic
objRecordset.LockType = adlockoptimistic
ObjRecordset.Source=”select field1,field2 from testTable”
ObjRecordset.ActiveConnection=ObjConnection ObjRecordset.Open ‘This will execute your Query
If ObjRecordset.recordcount>0 then
Field1 = ObjRecordset(“Field1”).Value
Field2 = ObjRecordset(“Field2”).Value
End if
Q – 29 What is the difference between Call to Action and Copy Action?
Ans- Call to Action :
The changes made in Call to Action , will be reflected in the orginal action( from where the script is called).But where as in Copy Action , the changes made in the script ,will not effect the original script(Action)
Q – 30 Few basic questions on commonly used Excel VBA functions?
Ans- common functions are:
Coloring the cell
Auto fit cell
setting navigation from link in one cell to other saving
Q – 31 Types of properties that Quick Test learns while recording?
Ans-
(a) Mandatory
(b) Assistive .
In addition to recording the mandatory and assistive properties specified in the Object Identification dialog box, QuickTest can also record a backup ordinal identifier for each test object.
The ordinal identifier assigns the object a numerical value that indicates its order relative to other objects with an otherwise identical description (objects that have the same values for all properties specified in the mandatory and assistive property lists). This ordered value enables QuickTest to create a unique description when the mandatory and assistive properties are not sufficient to do so.
Q – 32 How does Parameterization and Data-Driving relate to each other in QTP?
Ans- To datadrive we have to parameterize.i.e. we have to make the constant value as parameter, so that in each iteraration(cycle) it takes a value that is supplied in run-time datatable. Through parameterization only we can drive a transaction(action) with different sets of data. You know running the script with the same set of data several times is not suggestable, & it’s also of no use.
Q – 33 Differences between QuickTest Professional (QTP) and Winrunner?
Ans-
(a) QTP is object bases Scripting ( VBS) where Winrunner is TSL (C based) Scripting.
(b) QTP supports “.NET” application Automation not available in Winrunner
(c) QTP has “Active Screen” support which captures the application, not available in WR.
(d) QTP has “Data Table” to store script values , variables which WR does not have.
(e) Using a “point and click” capability you can easily interface with objects, their definitions and create checkpoints after having recorded a script – without having to navigate back to that location in your application like you have to with WinRunner. This greatly speeds up script development.
Q – 34 What is the difference between check point and output value?
Ans- An outPut value is a value captured during the test run and entered in the run-time but to a specified location. EX:-Location in Data Table[Global sheet / local sheet]
Q – 35 What is a Run-Time Data Table? Where can I find and view this table?
Ans-
-In QTP, there is data table used , which is used at runtime.
-In QTP, select the option View->Data tabke.
-This is basically an excel file, which is stored in the folder of the test created, its name is Default.xls by default.
Q – 36 How to handle dynamic objects in QuickTest Professional (QTP)?
Ans- QTP has a unique feature called Smart Object Identification/recognition. QTP generally identifies an object by matching its test object and run time object properties. QTP may fail to recognise the dynamic objects whose properties change during run time. Hence it has an option of enabling Smart Identification, wherein it can identify the objects even if their properties changes during run time.
Check this out-
If QuickTest is unable to find any object that matches the recorded object description, or if it finds more than one object that fits the description, then QuickTest ignores the recorded description, and uses the Smart Identification mechanism to try to identify the object.
While the Smart Identification mechanism is more complex, it is more flexible, and thus, if configured logically, a Smart Identification definition can probably help QuickTest identify an object, if it is present, even when the recorded description fails.
Q – 37 How to handle Run-time errors?
Ans- On Error Resume Next :
causes execution to continue with the statement immediately following the statement that caused the run-time error, or with the statement immediately following the most recent call out of the procedure containing the On Error Resume Next statement.
This allows execution to continue despite a run-time error. You can then build the error-handling routine inline within the procedure.
Using “Err” object msgbox “Error no: ” & ” ” & Err.Number & ” ” & Err.description & ” ” & Err.Source & Err.HelpContext
Q – 38 How many types of Actions are there in QuickTest Professional (QTP)?
Ans- There are three kinds of actions:
non-reusable action-an action that can be called only in the test with which it is stored, and can be called only once. reusable action-an action that can be called multiple times by the test with which it is stored (the local test) as well as by other tests.
external action-a reusable action stored with another test. External actions are read-only in the calling test, but you can choose to use a local, editable copy of the Data Table information for the external action.
Q – 39 How to export QuickTest Professional (QTP) results to an .xls file?
Ans- By default it creates an “XML” file and displays the results
Q – 40 How to export data present in Datatable to an .xls file?
Ans- DataTable.Export “….xls file name…”
Q – 41 How does QuickTest Professional (QTP) identifies the object in the application?
Ans- How does QTP identifies the object in the application? QTP identifies the object in the application by LogicalName and Class. For example: The Edit box is identified by Logical Name : PSOPTIONS_BSE_TIME20 Class: WebEdit …
Q – 42 I want to open a Notepad window without recording a test and I do not want to use SystemUtil.Run command as well How do I do this?
Ans- U can still make the notepad open without using the record or System utility script, just by mentioning the path of the notepad “( i.e., where the notepad.exe is stored in the system) in the “Windows Applications Tab” of the “Record and Run Settings window. Try it out. All the Best.
Q – 43 Explain the concept of object repository and how QuickTest Professional (QTP) recognises objects?
Ans- Object Repository:
displays a tree of all objects in the current component or in the current action or entire test( depending on the object repository mode you selected). we can view or modify the test object description of any test object in the repository or to add new objects to the repository.
Quicktest learns the default property values and determines in which test object class it fits.If it is not enough it adds assistive properties, one by one to the description until it has compiled the unique description.If no assistive properties are available, then it adds a special Ordianl identifier such as objects location onthe page or in the source code.
Q – 44 What do you call the window testdirector-testlab?
Ans- “Execution Grid”. It is place from where we Run all Manual / Automated Scripts
Q – 45 What is the file extension of the code file and object repository file in QTP?
Ans-
File extension of
— Per test object rep :- filename.mtr
— Shared Oject rep :- filename.tsr
Code file extension id script.mts
Q – 46 How do u do batch testing in WR and is it possible to do in QTP, if so explain?
Ans- Batch Testing in WR is nothing but running the whole test set by selecting “Run Testset” from the “Execution Grid”.The same is possible with QTP also. If our test cases are automated then by selecting “Run Testset” all the test scripts can be executed. In this process the Scripts get executed one by one by keeping all the remaining scripts in “Waiting” mode.
Q – 47 What is the Diff between Image check-point and Bit map Check point?
Ans- 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.
Q – 48 How To clear the AutoComplete?
Ans-
1 In your Internet Explorer’s menu bar, choose Tools > Internet Options > Content tab.
2 Click AutoComplete in the Personal information area. The AutoComplete Settings dialog box opens.
3 In the Use AutoComplete for area, clear the User names and passwords on forms option.
4 Click OK to save your changes and close the AutoComplete Settings dialog box, then click OK again to close the Internet Options dialog box.
Q – 49 How to execute a WinRunner Script in QuickTest Professional (QTP)?
Ans-
(a) TSLTest.RunTest TestPath, TestSet [, Parameters ] –> Used in QTP 6.0 used for backward compatibility Parameters : The test set within Quality Center, in which test runs are stored. Note that this argument is relevant only when working with a test in a Quality Center project. When the test is not saved in Quality Center, this parameter is ignored.
e.g : TSLTest.RunTest “D:test1”, “”
(b)TSLTest.RunTestEx TestPath, RunMinimized, CloseApp [, Parameters ] TSLTest.RunTestEx “C:WinRunnerTestsbasic_flight”, TRUE, FALSE, “MyValue” CloseApp : Indicates whether to close the WinRunner application when the WinRunner test run ends. Parameters : Up to 15 WinRunner function argument
Q – 50 Object Repositories types, Which and when to use?
Ans- Deciding Which Object Repository Mode to Choose
To choose the default object repository mode and the appropriate object repository mode for each test, you need to understand the differences between the two modes.
In general, the object repository per-action mode is easiest to use when you are creating simple record and run tests, especially under the following conditions:
You have only one, or very few, tests that correspond to a given application, interface, or set of objects.
You do not expect to frequently modify test object properties.
You generally create single-action tests.
Conversely, the shared object repository mode is generally the preferred mode when:
You have several tests that test elements of the same application, interface, or set of objects.
Q – 51 Discuss QuickTest Professional (QTP) Environment?
Ans- QuickTest Pro environment using the graphical interface and ActiveScreen technologies – A testing process for creating test scripts, relating manual test requirements to automated verification features – Data driving to use several sets of data using one test script.
Q – 52 What does it mean when a check point is in red color? what do you do?
Ans- A red color indicates failure. Here we analyze the the cause for failure whether it is a Script Issue or Envronment Issue or a Application issue.
Q – 53 How do u create new test sets in TD?
Ans- Login to TD.
Click on “Test Lab” tab.
Select the Desired folder under which we need to Create the Test Set. ( Test Sets can be grouped as per module.) Click on “New Test Set or Ctrl+N” Icon to create a Test Set.
Q – 54 What are the properties you would use for identifying a browser and page when using descriptive programming?
Ans- “name” would be another property apart from “title” that we can use. OR We can also use the property “micClass”. ex: Browser(“micClass:=browser”).page(“micClass:=page”)….
Q – 55 If an application name is changes frequently i.e while recording it has name, in this case how does QTP handles?
Ans- If an application name is changes frequently i.e while recording it has name Window1 and then while running its Windows2 in this case how does QTP handles QTP handles those situations using Regular Expressions. …
Q – 56 IF we use batch testing.the result shown for last action only.in that how can i get result for every action.?
Ans- You can click on the icon in the tree view to view the result of every action
Q – 57 How to Import data from a .xls file to Data table during Runtime?
Ans-
Datatable.Import “…XLS file name…”
DataTable.ImportSheet(FileName, SheetSource, SheetDest)
DataTable.ImportSheet “C:name.xls” ,1 ,”name”
Q – 58 Syntact for how to call one script from another? and Syntax to call one Action in another?
Ans-
RunAction ActionName, [IterationMode , IterationRange , Parameters]
Here the actions becomes reusable on making this call to any Action.
IterationRange String Not always required. Indicates the rows for which action iterations will be performed. Valid only when the IterationMode is rngIterations. Enter the row range (i.e. “1-7”), or enter rngAll to run iterations on all rows.
If the action called by the RunAction statement includes an ExitAction statement, the RunAction statement can return the value of the ExitAction’s RetVal argument.
Q – 59 How the exception handling can be done using QuickTest Professional (QTP)?
Ans- It can be done Using the Recovery Scenario Manager which provides a wizard that gudies you through the process of defining a recovery scenario. FYI.. The wizard could be accesed in QTP> Tools-> Recovery Scenario Manager …….
Q – 60 Analyzing the Checpoint results?
Ans- Standard Checpoint :By adding standard checkpoints to your tests or components, you can compare the expected values of object properties to the object’s current values during a run session. If the results do not match, the checkpoint fails.
Q – 61 What are the different scripting languages you could use when working with QTP?
Ans-
Visual Basic (VB),
XML,
JavaScript,
Java,
HTML
Q – 62 Explain the keyword createobject with an example?
Ans- 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.
Q – 63 How to do the scripting. Is there any inbuilt functions in QTP as in QTP-S. Whatz the difference between them? how to handle script issues?
Ans- Yes, there’s an in-built functionality called “Step Generator” in Insert->Step->Step Generator -F7, which will generate the scripts as u enter the appropriate steps.
Q – 64 Explain the concept of how QuickTest Professional (QTP) identifies object?
Ans- During recording qtp looks at the object and stores it as test object.For each test object QT learns a set of default properties called mandatory properties,and look at the rest of the objects to check whether this properties are enough to uniquely identify the object. During test run,QT searches for the run time obkects that matches with the test object it learned while recording.
Q – 65 Can we Script any test case with out having Object repository? or Using Object Repository is a must?
Ans- No. You can script with out Object repository by knowing the Window Handlers, spying and recognizing the objects logical names and properties available.
Q – 66 Why divide a test into three action calls?
Ans- When you create a new test, it contains a call to one action. By dividing your tests into calls to multiple actions, you can design more modular and efficient tests.
Q – 67 What is Object Spy in QuickTest Professional (QTP)?
Ans- Using the Object Spy, you can view the properties of any object in an open application. You use the Object Spy pointer to point to an object. The Object Spy displays the selected object’s hierarchy tree and its properties and values in the Properties tab of the Object Spy dialog box.
Q – 68 How many ways we can parameterize data in QuickTest Professional (QTP)?
Ans- 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.
Q – 69 How to use the Object spy in QuickTest Professional (QTP) 8.0 version?
Ans- There are two ways to Spy the objects in QTP
1) Thru file toolbar
—In the File ToolBar click on the last toolbar button (an icon showing a person with hat). 2) Tru Object repository Dialog
—In Objectrepository dialog click on the button”object spy…”
In the Object spy Dialog click on the button showing hand symbol. the pointer now changes in to a hand symbol and we have to point out the object to spy the state of the object if at all the object is not visible..or window is minimised then Hold the Ctrl button and activate the required window to and release the Ctrl button.
Q – 70 How to Creating an Output Value using QuickTest Professional (QTP)?
Ans-
1 Start QuickTest and open the Parameter test.
2 Save the test as Output.
3 Confirm that the Active Screen option is enabled.
4 Select the text you want to use as an output value.
5 Set the output value settings.
6 Modify the table checkpoint.
7 Save the test.
Q – 71 Explain the check points in QuickTest Professional (QTP)?
Ans- A checkpoint verifies that expected information is displayed in a Application while the test is running. You can add eight types of checkpoints to your test for standard web objects using QTP.
• A page checkpoint checks the characteristics of a Application
• A text checkpoint checks that a text string is displayed in the appropriate place on a Application.
• An object checkpoint (Standard) checks the values of an object on a Application.
• An image checkpoint checks the values of an image on a Application.
• A table checkpoint checks information within a table on a Application
• An Accessiblity checkpoint checks the web page for Section 508 compliance.
• An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application.
• A database checkpoint checks the contents of databases accessed by your web site
Q – 72 Explain in brief about the QuickTest Professional (QTP) Automation Object Model?
Ans- Essentially all configuration and run functionality provided via the QuickTest interface is in some way represented in the QuickTest automation object model via objects, methods, and properties.
Although a one-on-one comparison cannot always be made, most dialog boxes in QuickTest have a corresponding automation object, most options in dialog boxes can be set and/or retrieved using the corresponding object property, and most menu commands and other operations have corresponding automation methods.
You can use the objects, methods, and properties exposed by the QuickTest automation object model, along with standard programming elements such as loops and conditional statements to design your program.
Q – 73 How to analyzing Test Results using QuickTest Professional (QTP)?
Ans- When QuickTest finishes running the test, the Test Results window opens.
Initially, the Test Results window contains two panes for displaying the key elements of your test run.
. The left pane displays the results tree, an icon-based view of the steps that were performed while the test was running. The results tree is organized according to the Web pages visited during the test run and can be expanded (+) to view each step. The steps performed during the test run are represented by icons in the tree.
You can instruct QuickTest to run a test or action more than once using different sets of data in each run. Each test run is called an iteration, and each iteration is numbered. (The test you ran had only one iteration.)
. The right pane displays the test results details. The iteration summary table indicates which iterations passed and which failed. The status summary table indicates the number of checkpoints or reports that passed, failed, and raised warnings during the test.
1 View the test results for a specific step.
In the results tree, expand (+) Test Recording Summary > Recording Iteration 1 (Row 1) > Action1 Summary > your application > your test name .
Q – 74 In how many ways we can add check points to an application using QTP?
Ans- We can add checkpoints while recording the application or we can add after recording is completed using Active screen (Note : To perform the second one The Active screen must be enabled while recording).
Q – 75 What is Parameterizing Tests?
Ans- When you test your application, you may want to check how it performs the same operations with multiple sets of data. For example, suppose you want to check how your application responds to ten separate sets of data. You could record ten separate tests, each with its own set of data.
Alternatively, you can create a parameterized test that runs ten times: each time the test runs, it uses a different set of data.