Software Testing Experience

Thursday, April 24, 2008

QTP Frequently Asked Questions Part - 2

66)What are the types of Object Repositories in QTP?

A)There are two types of Object Repository files in QTP

1) Per-Action Repository file The Extension of Per-Action is .mtr
2) Shared Repository file The Extension of Shared is .tsr


We can use Per-Action as Shared one, but we cannot use Shared Object Repository as per-Action mode. when u use like this both file uses same extensions i.e (.tsr)


67)How QTP recognizes Objects in AUT?
A)through object repository qtp can recognize the object in

68)Explain QTP Testing process ?

A)QTP testing process is
1:
Preparing for Record and Run settings
2:Develope the basic script
3:Edit the script

4:Debug the script 5:Run the script 6:Analyze the results 7:Summarise the results

69)how you test broken link using the automated tool QTP ?

A)Gofor Insert->Standered check point->select one object->then select it's parent page->

so i t displays page ckeck point properties then select "Broken link" option from that wizard This the way we can check the broken links..

70)what is batch run ?

A)In QTP, here v do not require to call the tests by scripting.

We can simply run them by selecting the required tests from Test batch runner option and we can stop required tests during test run and the results will be stored in their corresponding result folders

71)What type of VB script u had done in expert view?

A)In Expert view we can use the VB keyword for scripting like Function:

1.Mid Returns a specified number of characters from a string.
2.Strcom Returns a value indicating the result of a string comparison.

3.Instr Returns the position of the first occurrence of one string within another.

4.Isdate Returns a Boolean value indicating whether an expression can be converted to a date.

72)Which object repository we use in real time and can we
merge 2 object repostiory and how?

A)There are usually two types of object repository 1.Shared Mode (.Tsr) 2.Per-Action. (.Mtr) We usually use 1.Shared Mode (.Tsr)object repository. We can merge two object repository.If you go to

QTP-->Test-->Settings-->Resourses
You can use the Resources tab of the Test Settings dialog box to associate specific files with your test, such as VBScript library files and Data Table files, and to specify the object repository mode and file to use for your test

73)can we enable smart identification for test object

A)Tools->Object identification->check the check box Enable smart identification

74)Can anybody give the script to addsheet, add column,add
values under that column in the rows??

A)DataTable.AddSheet("MySheet").AddParameter "Parametername","Value"
75)I have 5 no.of Action in my Test.Out off which i should make 3rd action as my start-up action. How should i make it?

A)i'm afraid thats not the correct answer. As far as i know the only way we can do is through the "Test Flow".

You can switch to the "Keyword View" and choose "Toolbars" under "View" and then choose "Action". This will provide u with a new combo box where u can choose "Test Flow".

then u can drag and arrange the Actions in which ever order u want them to get executed.

Go to keyword view.
Click on the drop down and select test flow.
Now change the order of flow by dragging the required action to top.

76)how to get the object property

A)using getroproperty or using objspy or in the treeview we can select particular object and right-clicking we can see all ties right any thing mistake make it correct Just spy that obect by using GUI spy,then it will show the object properties,if it is not having the standered properties then go for GUI mapconfiguration and add whatever the properites u want

77)we are submitting data one form to another form.defaultly
it is time period set as 5sec. but it is taken 15sec what to do

A)syncronization is the best way to do that perticular task wait() function sends wr in sleepmode,it's wastage of the time if wrong plz....


Synchronization the data or we can also use the delay() function with the specified time intervals.


78)One build is delivered. in that build button name is submit.but in the next buit that name of the button changed as login.are u continue with previous recorded script or u make any changes?


A)So we want to change the logical name of the button through regedit.exe ., ie after executing this we can change the logical name of that particular button U change the logical name of the object which object u change in object repository. or u add new object to the object repository.


79)When The Low Level Recording is Used in QTP


A)Some of the objects are not recognising in default recording mode then switch to low level recording. means it


Captures objects , x & y co-ordinates of screen, keyboard inputs and also mouse clicks.


If QTP fails to Recognize the object in application then the low level recording mode will be used for recognizing objects in application. In low level recording mode QTP will recognize the objects as a "Window" or "WinObject".we can see in Expert View.Sometimes low level recording is used to record unexpected defects that arise due to mouse movement and key strokes.


80)what is qtp automation frame work,what is the use of that
frame work?


A)framework is nothing but separating each and everything related 2 script such as env,tests,or,functions,ip files,results etc


81)Inserting a Call to Action is not Importing all columns in Datatable of globalsheet. Why?


A)As the call is to an Action, the data in the Global sheet will not be available. Only which are necessary for the Action like repository, action's sheet will be imported. So the test's global sheet and its data will not be available in the calling test.


82)How to make arguments optional in a function?


A)Suppose there is alogin window in the user name we can type any thing but while running its giving some error we can avoid that error actually so, we can make that tsl as an optional so that if an error occurs it countinues but not stop


for example


Optional.Dialog("Login").WinEdit("Name:").Set "ssss"


these line make an optional now


83)What is the limitation to XML Checkpoints?


A)An XML checkpoint checks the contents of individual XML data files or XML documents that are part of your Web application.


84)How to Import data from a ".xls" file to Data table during
Runtime.


A)datatable.Import("file path")


datatable.Importsheet("file path",sheetid)


85)How many ways we can parameterize data in QTP?


A)There are four types of parameters.


1.Test, action or component parameters.


2.Data Table parameters.


3.Environment variable parameters.


4.Random number parameters.


86)What is the use of Accessibility check point?


A)when u develop a web application it is necessary to fallow the W3C guidelines. the Accesbility Check Point is used to find wether the web application fallow the W3C guidelines or not.


87)How to open an application through scripting?


A)For web applications we use


web_browser_invoke(IE,"http://mail.yahoo.com/");


for other applications :


invoke_application("uday.exe","DirectoryPath",SW_SHOW/SW_SHOWMAXIMISED/SW_MINIMISED);


Browser = "IE"


StartURL = "www.hotmail.com"


IF Browser = "IE" THEN


set IE = CreateObject("InternetExplorer.Application")


IE.Visible = true


IE.Navigate StartURL


END IF


88)How to retrive the property of an object?


A)using GetROproperty()


89)How to create runtime property for an object?


A)Browser("abcd").SetROProperty("abs_x",158)


90)How to add a runtime parameter to a data sheet?


A)Datatable.GetSheet("Global").AddParameter("NewColumn_Name")


This adds a new column called NewColumn_Name in the datatable under Global Sheet


91)Tell me few important difference Between QTP and WinRunner?


A)1.QTP allows even novice testers to be productive in minutes. You can create a test script by simply pressing a Record button and using an application to perform a typical business process. Each step in the business process is automated documented with a plain-English sentence and screen shot. Users can easily modify, remove, or rearrange test steps in the Keyword View.


2.QTP can automatically introduce checkpoints to verify application properties and functionality, for example to validate output or check link validity. For each step in the Keyword View, there is an ActiveScreen showing exactly how the application under test looked at that step. You can also add several types of checkpoints for any object to verify that components behave as expected, simply by clicking on that object in the ActiveScreen.


3.You can then enter test data into the Data Table, an integrated spreadsheet with the full functionality of Excel, to manipulate data sets and create multiple test iterations, without programming, to expand test case coverage. Data can be typed in or imported from databases, spreadsheets, or text files.


4.Advanced testers can view and edit their test scripts in the Expert View, which reveals the underlying industry-standard VBScript that QuickTest Professional automatically generates. Any changes made in the Expert View are automatically synchronized with the Keyword View.


5.Once a tester has run a script, a TestFusion report displays all aspects of the test run: a high-level results overview, an expandable Tree View of the test script


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 TestFusion reports with Mercury Quality Management, you can share reports across an entire QA and development team.


6.QTP also facilitates the update process. As an application under test changes, such as when a "Login" button is renamed "Sign In," you can make one update to the


Shared Object Repository, and the update will propagate to all scripts that reference this object. You can publish test scripts to Mercury Quality Management, enabling other QA team members to reuse your test scripts, eliminating duplicative work.


7.QuickTest Professional supports functional testing of all popular environments, including Windows, Web, .Net, Visual Basic, ActiveX, Java, SAP, Siebel, Oracle, PeopleSoft, terminal emulators, and Web services.TP Supports .netApplications & Full fledge java Applications, these are not suppoerted by winrunner .


QTP having 9 check points where winrunner is having 4 check


points.


we can create reuasble action in QTP but not in winner.


these are the major differences.


92)How to export QTP results to an .xls file?


A)Datatable.Export("C:ResultsActuals.xls")


93)How many type of status messages are there ..explain?


A)Status of the report step:


0 or micPass: Causes the status of this step to be passed and sends the specified message to the report.


1 or micFail: Causes the status of this step to be failed and sends the specified message to the report. When this step runs, the test or component fails.


2 or micDone: Sends a message to the report without affecting the pass/fail status of the test or component.


3 or micWarning: Sends a warning message to the report, but does not cause the test or component to stop running, and does not affect the pass/fail status of the test or component.


94)How to get line numbers in your editor in expert view?


A)Tools -> EditorOptions -> General -> Show Line Numbers


95)difference Between LowLevel and Normal Recording Modes?


A)Normal Level Is Object Context Level ; where QTP recognize object with Physical Description Of only interacted object.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 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 or component.Low-Level Recording:Is useful if the exact coordinates of the object are important for ur test.Normal recording:Is useful when the recording operations that cannot be recorded at the level of an object.


96)Can we do Load Teting with QTP?


A)by using start transaction and end trasaction options we can parially conduct performance testiong.And also by using fata driven testing (or loopina one functionality using for loop we can parially conduct load testing. But this can compare with loadrunner.


97)Which Databases supports for QTP?


A)Oracle,MS-Access, SQL Server


98)What is the use of Regular expression?


A)By using RE we can instruct QTP not to consider values of an object but only consider the format.


ex:if u r testing a date field with different values then QTP consider only date format not changing dates.depends on events our application objects (or)windows lables are varying .To create datadriven test on this type of objects and window Test Engineers are inserting regular expression in corresponding gui map entry.


99)What is the current version of QTP?


A)Mercury released beta version not full fledge 9.0


100)How you handles Pop-up windows which are Dynamically changing in Runtime?


A)We use smart-identification for this


101)What are the enhancements u did after recording ur script?


A)After recording script:


* Placing for loop or If loop in order to get the messages as the operation passes or fails.


* Adding the Checkpoints in order to check the functions.


* Doing parameterization in order to using the multiple data for more than one iteration or easy data changes.


102)Explain about reusable actions?


A)if we eant to use the 'call to existing action' option, we have to make an action as reusable action. for that we have to go for action properties and click the check button.let action1 is a reusable action then we call it to any other action. If we change the script in action1 it is affects in all actions in which we called action1.


103)Tell me the situations where we will use Data Driven?


A)If v r testing an application which generate reports on different dates, login page, an application which uploads different files on different dates etc then u want to test functionality of an application with multiple sets data then u go to DATA DRIVEN TEST.


It is very difficult to test in manual for that we go to DATA DRIVEN TEST.


104)What is output value?


A)An Outputvalue is a step in which one or more values are captured at a specific point in Test and stores for the duration of Run.An output value is a value retrived during the test run and entered into your data table. You can subsequently use this output value as input data in your test. This enables you to use data retrived during a test in other parts of the test.


105)How to connect to data base?


A)Public Function database(Str,SQLstr,outResult1,outResult2)


'//Variable Declarations


Dim objConn, rsOut




'//Create a connection object.


Set objConn = CreateObject("ADODB.Connection")




'//Create a ResultSet Object to store the results.


Set rsOut = CreateObject("ADODB.Recordset")




'//Open the Created Connection object


objConn.Open Str




'//Pass the SQL query string and retrieve the Results


through the connection object


rsOut.Open SQLstr,objConn




If rsOut.EOF <> True AND rsOut.BOF <> True Then




'//Store the different column values


retrieved from a record in different variables.


outResult1=rsOut("col1")




outResult2=rsOut("col2")




rsOut.movenext


End If




End Function


106)Use of Debug Viewer?


A)Debug viewer is used to view, set ,or modify the current value of object and varaibles in test when it stops at break point to look at the values of variables at run time for easy debugging


107)How u perform Batch Program in QTP?


A)we can perform bacth programming in QTP using tool called Test Batch Runner which comes with QTP by adding the paths of all Tests which are need to be grouped and executing same.


108)What is Virtual object wizard in QTP?


A)Virtual Object Wizard in the QTP is used to map an object, which is not recognized by the QTP as Virtual Object in order to recognize it during the Run time virual object wizard is used to recognize object which were fail to recognize in any manner.but is final solutions and it is not at all advisable.becuase it recognize the objects by using coordianates, so if a single fixel is changed also it fails.


109)How many types of Recordings are there in QTP and what are they?


A)There are 3 types of Recording modes available in QTP.


They are



1, Standard Recording mode: It is default mode


2, Analog Recording mode


3, Low Level Recording mode


110)How to parameterize in QTP?


A)Paramaterization can be done in this way:


#1. In the sheet "Action 1", write some parameters undercolumn A like name1, name2.


#2. In the code,


Browser("browser_name").Page("page_name).Webedit("textbox_name").Set Datatable("A","Action 1").


111)How to make an Action as reusable?


A)Go to Tree View. Select the action and right click. Go to Action Properties and check the chekbox 'Reusable acion'.


112)Can u call winRunner scripts from QTP?


A)Yes We can Call the Win Runner scripts from QTP using follwing function: TSLTest.RunTestEx from the Expert view or Call to Win Runner test Dialog box



113)Associated files in QTP?


A)Associated files are the script files(in which the functions/methods are defined)


Ex: If you want to add a associated file, make a file with functions in vb script, having extension .vbs


Using the file.


In Test ->Settings ->Resources. add a associated file by selecting from proper location.It can be made default for a test.


114)What is Expert view?


A)Expert view is one view in which VBscript is generated during recording.


115)What is Tree view?


A)It is an icon based view generated during recording by QTP.


116)How many check points are there in QTP and what are they?


A)QTP supports 9 types of check points.


1.Standard check point.


2.Image check point.


3.Bitmap check point.


4.Page check point.


5.Text check point.


6.Text Area check point.


7.Database check point.


8.Accessibility check point.


9.XML check point.


117)Recovery Manager means..?


A)It provides a wizard that guides through the process of defining a recovery scenario. Here recovery scenario is a definition of an unexpected event and the operation(s) necessary to recovery the test run.


118)What is runtime objects and test objects? What is the difference between them?


A)TEST OBJECT:A test object is an object that QuickTest creates in the test to represent the actual object in the application.QTP stores information about the object that will help to identify and check the object during the test run.


RUNTIME OBJECT:Is an actual object in the application on


which methods are performed during the test run.


119)Use of Multiple Actions in QTP?


A)When v create a new test, it contains one action.by dividing ur tests into multiple actions, v can design more modular and efficient tests.reusablility,reliability,clear


120)What is Active Screen in QTP?


A)In Active Screen window, QTP captures AUT screens and highlights the object on which we perform action during recording.


121)Per-Action Vs Shared repository?


A)1.Shared repository objects can be used for the entire test where as Per-action repository objects can be used for that particular action only.


2.Shared repository occupies less memory compare to per-action repository.


3.If any change occurs in application we need to make changes only once in shared repository where as per-action repository needs change in every action respository.


In per-action instructs QTP to refer to the external action repository whereas in shared instructs QTP to use test shared object repository for this action.


Per-action:In qtp we select per-action mode then for each action it creates a object repositary.This type of process is memory westage process.


Shared repository:In qtp we select shared mode then for all actions it creates one object repositary in a test.This not memory westage process we can this repository in other tests also.

Labels:

posted by Balaji Visharaman at 12:49 AM 0 comments

QTP Frequently Asked Questions Part - 1

1)what is the use of VIRTUAL OBJECTS? explain ?

AThe use of virtual objects in qtp is identifies the objects including pixels(with co-ordinates.)

2)In 1st screen,if v enter a/c no. in one field, the information of the subscriber will be displayed. The details should be displayed only in screen 3(NOTE:details should not display in screen 2 How can v do using QTP.

A)from where ur picking the value for entering A/C no, If you are picking into a variable u can check the same variable with the GetROProperty of the object in the 3rd page.

3)The extension of the Script file is .mts ok What is stand
for mts?

A)Mercury Test Script.


4)HOW TO DO THE BATCH TESTING USING QTP?

A)go to tools ,options and select the test batch runner and select the scripting functions one by one by keeping it in wait mode and execute it.

5)WHAT IS THE USE OF "FUNCTION GENERATOR" IN QTP?

A)1)the use of functional generator in qtp is which lists out the all the built in functions in qtp and helps you to write the vb script for un known objects.

2)it is also used to reduce the typing mistakes & syntax errors.

6)WHAT IS ENVIRONMENT VARIABLES?

A)As for as i know the use of environment variables in qtp is . in qtp the variable which you have in one action cant be used in some other action .so by using environment variables we can use the variables in one action in to another action

7)WHAT IS A TEST STRATEGY & WHAT IS THE DIFFERENCE BETWEEN

TEST STRATEGY & TEST PLAN?

A)Test strategy is a company level document and which says the approch for testing.the test strategy doc also says that the scope,business issues,test delivarables,tools used ,risk analysis etc.where as test plan is document which says what to test,when to test ,how to test and who to test.the test plan document was prepared by the test lead.

Test strategy:i hope that brief version of your test cases

Test plan:this is one of the document in your testing process contains testing envinornment,s/w&h/w requriements,test data creation etc.

8)WHAT IS THE DESCRIPTIVE programming when it is useful? &
when to use this ?

A)descriptive programming in QTP means whenever qtp facing dificulty with obj identification then we will go with regular exp or desc prog it means identifying obj unique prop from the script itself.

ex:vbwindow("").vbedit("attached text:=username") set cdbjd

9)HOW to invoke any recorded script in QTP with out using
RECORD & PLAYBACK CONCEPT?

A)invoke_record (path of the record)

10)can we run the scripts of qtp 8.2 in the qtp7.0?

A)No,becse 8.2 is the advansed version(add some additional properties) of 7.0.so,we run the scripts of qtp 7.0 in qtp 8.2

11)how we can take data in the username field text box into
variable in web application explain with example and give all functions to get data into variables

Any Application, it may be web or it may be window based applications, we use GetROproperty() method to get the data from the Editbox.Same way if u want to set the data to the editbox we use set()method.

for example:

Dim variable name

variable name = Browser(browser).page(pagename).GetROproperty("Logical name")

if u want to print in dialogbox use msgbox()function OR if u want to print in test result use reporter.reporter event() function

12)What are the file extensions for per-action, shared object
repository files and what is the extension for library files?

A)Per-Action OR : .mtr

Shared OR : .tsr

Library files : .vbs, .txt File extension for above files are

Per-Action Object Repository - .mtr(Mercury test Script)

Shared Action object Repository - .tsr(Test repository)

Library files - .vbs or .txt

13)How do you handle XML exceptions in QTP(Here it is Exception,not the checkpoint)

A)using recovery scenario in QTP we can handle any type of exceptions

14)What is iteration? How it is related to Test Results in QTP

A)Here iteration means repeat the processes, with same values or different values,when You take the datadriven test with different values... the test process repeats that much of time.

15)Difference between image checkpoint and bitmap checkpoint

A)In Bitmap checkpoint, we can compare the exact images, means the source image(in Build1) with the destination image (in build2). So it compare the exact image between both the builds. Here, even we can check the part of images between source and destination.

where as in Image check point, we can check all the values and properties of an image. Ex. The destination address once we click on the image, image type etc.

16)what is descriptive.create()in qtp?

A)To create properties collection and we can create properties object(MYDescription).once we have filled properties collection with a set of properties objects (properties,values) we can specify properties object in place of an obj name

17)what is TOM in qtp?

A)Test Object Model

18)Tell about descriptive programing in qtp8.2?

A)Descriptive Programming is all about identifying an object uniquely. And there is no defined frame work for it. Frame work depends on the project.This is the code for Yahoo Photos Website you can do the same for the yahoo by changing the values in the required places.

CODE: Browser("title:=Yahoo!Photos*.*").page("title:=Yahoo!Photos*.*").WebEdit("name:=login").set "srinivas"

Browser("title:=Yahoo!Photos*.*").page("title:=Yahoo! Photos*.*").WebEdit("name:=passwd").set "test"

Browser("title:=Yahoo!Photos*.*").page("title:=Yahoo!Photos*.*").WebButton("name:=SignIn").click

19)how to merge object repositories?

A)In QTP8.2 provide a facility to add repositories.

when u installed qtp 8.2 software to show a option in Tools Merge object Repositories. Through U can add object Rep.

20)what is the Command used to start the QTp from Run.(start-> Run)

A)systemutil.run"path of the file"

21)1)what is the Exact Meaning of Environment Variables?

2)what is Compile Module in QTP? what exactly it contains Functions or Actions?

A)win runner contains compile module.but qtp does not support complie module.compile module means library files in qtp ,which contains functions not the actions

22)what is Compile Module in QTP? what exactly it contains Functions or Actions?

A)Compile Module means library files. It contains functions.

23)Tell me the QTP Advantages and Disadvatages ?

APros:Will be getting the initial focus on development of all new features and supported technologies.

•Ease of use.


•Simple interface.


•Presents the test case as a business workflow to the tester (simpler to understand).


•Uses a real programming language (Microsoft's VBScript) with numerous resources available.


•QuickTest Pro is significantly easier for a non- technical person to adapt to and create working test cases, compared to WinRunner.


•Data table integration better and easier to use than WinRunner.


•Test Run Iterations/Data driving a test is easier and better implement with QuickTest.


•Parameterization easier than WinRunner.


•Can enhance existing QuickTest scripts without the "Application Under Test" being available; by using the ActiveScreen.


•Can create and implement the Microsoft Object Model (Outlook objects, ADO objects, FileSystem objects, supports DOM, WSH, etc.).


•Better object identification mechanism.


•Numerous existing functions available for implementation – both from within QuickTest Pro and VBScript.


•QTP supports .NET development environment (currently WinRunner 7.5 does not).


•XML support (currently WinRunner 7.5 does not).


•The Test Report is more robust in QuickTest compared to WinRunner.


•Integrates with TestDirector and WinRunner (can kick off WinRunner scripts from QuickTest).


Cons:


•Currently there are fewer resources (consultants and expertise) available due to QTP being a newer product on the market and because there is a greater Demand than Supply,thus fewer employee/consulting resources.


•Must know VBScript in order to program at all.


•Must be able to program in VBScript in order to implement the real advance testing tasks and to handle very dynamic situations.


•Need training to implement properly.


•The Object Repository (OR) and "testing environment" (paths, folders, function libraries, OR) can be difficult to understand and implement initially.


24)What is throw object?


A)It is exception handling

25)How will you handle the situation when object is not captured during record?

A)While recording the object is not recognised--go for low level recording.

virtual object vizard too right. But, if u find object not recognised by tool before start generating script.


26)What kind of errors can b handled in QTP in real time scenario?


A)1) Pop-up Window

2) Object state

3) Test run error

4) Application Crash


27)an objects recogonised without repository?


A)Yes. In descriptive programing, we dont use object repository. we give proprties of the object in order to recognise it uniquely, in script.


28)What is smart identification?


A)Smart identification comes into picture when Quick Test fals to recognise an object uniquely using the recorded properties. It follows the following process to identify the object:


1. QuickTest "forgets" the recorded test object description and creates a new object candidate list containing the objects (within the object's parent object) that match all of the properties defined in the base filter property list.


2. From that list of objects, QuickTest filters out any object that does not match the first property listed in the Optional Filter Properties list. The remaining objects become the new object candidate list.


3. If the new object candidate list contains more than one object, then step 2 is repeated with the second property listed in Optional Filter Properties list.

4. Step 3&4 are repeated until an the object in recognised uniquely.


29)in howmany ways you perfrom batchtesting


A)I hope its in only one way. By going into


Start-> Programs-> QuickTestPro-> Tools-> Test Batch Runner


Here, you can call any number of scripts and run at once. All the scripts are run one after the other in the order they are placed in batch runner.


30)What is the differnce between action & script


A)A sequence of related statements are called "Action".But a script will contain more than one Action


31)Synchronozation types in QTP


A)There are four type of synchronozation point in qtp


1) wait 2) local 3) exit 4) global


32)How u perform exception handling in QTp,what is other name for this


A)The other name for Exception handling is Recovery scenario.There are 4 Triggers


1.Popup Window.


2.Object State.


3.Test Error.


4.System Crash.


The solution are


1.Function call.


2.Keyboard or mouse Operation.


3.Restart.


33)How you automate testscripts one by one or module wise or all at once


A)Test Automation is process which follows the framework designed for the company. This framework varies from one organization to other. Here are some basic steps which are follwed in general...


Step1: Segregate the test cases to be automated.


Step2: Prepare the test data for the selected test cases


Step3: Make scripts for repeatable or functional scenarios


Step4: Convert those scripts as Reusable functions


Step5: Make test scripts by calling the reusable functions and adding the conditions as per your

requirements.


34)How you automate test scripts


A)we can automate test scripts by means automation reference model,by which we can automate the qtp itself


35)What do you do if QTP doesn't recognize object ,what action
should be taken


A)first of all we have find the object by means of object repository if it is not identifying the nature of the object we can go for object identification ,even though if QTP is not recognising the object we can map the object by means of virtual manager wizard.QTP does not recognize the object means, you dont have proper add-ins. In this case, QTP treats the objects as non-standard objects. We can map these non-standard objects to standard objects by using virtual object wizard. Once mapped sucessfully, QTP can identify the objects.


36)After running scripts how you report results ,there is any
specific report form


A)report.reportevent event status,stepname,detailsUsing QTP utility statement we can send report to Test


Result Window.Here the utility statement is


syntax is


report.reportevent event status,stepname,details


Argument-1 : event status are 4 types


1)micpass


2)micfail


3)micdone


4)micwarnin


Argument-2 : The status of object we are going to report


Argument-3 : The details of the object.


37)Anybody explain me, the concept of checkpoint declaration
in the QTP mainly for the Objects, Pages, Text and Tables ?


A)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.


Object, Page and Table checkpoints can be added using Standard check point.



1.
A page checkpoint checks the characteristics of a Application


2.
An object checkpoint (Standard) checks the values of an object on a Application.


3.
A table checkpoint checks information within a table on a Application


4.
A text checkpoint checks that a text string is displayed in the appropriate place on a Application.


38)How to use Regular Expressions in QTP? give an example.


A)In QTP, delaing of Regualar Expressions and varing object descriptions can be handled by using Description Programming.


Ex. of using Regular expression is:u just record yahoo login operaion and click on Inbox link. Assume u got 10 new mails, then it shows like Inbox(10). Read one mail, now it shows like Inbox(9). Now try to play the recorded script. It wont work. Now use Regular expression in Inbox link like:"Inbox.*". At that time it wil work.


39)ake a situation when you are working with QTP, suddenly system has crashed.so you again start the system. My questyion is how can QTP directly opened when the system
desktop appears.


A)we can set the error or event in the recovery scenarion wizard and if the system faces such situation by the recovery scenario the system will get back to the desired action or events


40)give me descriptive programing code sample flight
application in qtp?


A)Browser(name:=Mercury FlightApplications).Page(title:=FlightApplications).Exist


41)where is the bitmap checkpoint be saved


A)Not only Bitmap Check point Any check point will be saved in a Tmp/the script saved


Folder along with the script there is no any other place to save


42)what happen in object repository(shared)if we call an existing action from an external action ? and what happen in object repository(peraction)if we call an existing
action from an external action ?


A)As you said, the existing action already recorded the objects into object repository pertaining to the when you call the external action,it will added the objects to the existing one


43)how can we retrieve ten rows from the data table using loop
concept?


A)Assume "Column1" is my column name in the Global Data table, then use this code:


for i=1 to 10


datatable.setcurrentrow(i)


returnvalue=datatable.value("Column1","Global")


msgbox(returnvalue)


next


44)How to covert a String to an integer?


A)you can use cint function



cint(10) will convert integer 1


45)How to "Turn Off" QTP results after running a Script?


A)Go To Menu . Tools > Options > Run (Tab)



Uncheck The "View Results when run session ends"


It will Turn Off The QTP.


46)Does QTP is "Unicode" compatible?


A)yes , QTP is Unicode compatible


47)How to supress warnings from the "Test results page"?


A)From test result window, Click View->Filter menu then uncheck the warning check box to filter the warning from the test result


48)How to open any application during Scripting in QTP?


A)you can launch any exe files using following code



systemUtil.Run "PATHFilename.EXE"


ex:


systemUtil.Run "C:Calc.exe"


invokeapplication(PATHFilename.EXE")


49)How to retrieve the property of an object in QTP?


A)using Getroproperty("text") we will find out the what ever object properties u want other wise by using object spy also we will get object properties


50)How to change the run-time value of a property for an
object in QTP?


A)use 'SetToProperty' method of an object to change the property of object at run-time....


example :


browser(" ").page(" ").winedit("username").setToProperty "Property", Value


Property can be any physical property of the object such as


Name, type, color........


51)How to execute a WinRunner Script in QTP?


A)insert->callto winRunner->select test or function


52)how to add a runtime parameter to a data sheet?


A)1)you can pass datasheet value to test during run time


DataTable.SetCurrentRow(1)


var= Datatable.Value("Column Name","Sheet name")



2)
you can write value to datasheet during run time


DataTable.SetCurrentRow(2)


Datatable.Value("Column Name","Sheet name") = Value


53)How to create a Runtime property for an object in QTP?


A)Using GetROProperty()


54)Tell me Three major differences between QTP & Winrunner?


A)a) Winrunner using TSL for programming Resource availablity


is less but QTP using VB script we can find more resource.



b)
in QTP we can See the result With Step by step With SCreenshot



c)
The GUI map can be difficult to understand and implement


55)How to export QTP results to an ".xls" file?


A)Datatable.export stmt


56)How to export data present in Datatable to an ".xls" file?
A)DataTable.Export("Path of the sheet")

or DataTable.ExportSheet("Path of the sheet",Index of the runtime datatable u want to export")

57)what does it mean when a check point is in red color? what
do u do?

A)red is symbol for failure

58)How do u do batch testing in WR & is it possible to do in
QTP, if so explain?

A)it is possible to run test batch in QTP,the option is

Programs->Quick test professional->Tools->test Batch runner

then it will open test batch runner window then u have to add the test that u want to automate for qtp tool,how to add the tests is..

File->New
Batch->Add
like that u can add,what ever the test u want to automate

59)How many ways we can parameterize data in QTP ?

A)Parameterization can be possible in the following ways

1:local data sheet

2:Environment Variables

3:DataTable

4Random Variables

60)What is Object Spy in QTP?

A)Object spy is used to know physical properties and the methods containing to an object we
want to know the object properties & methods then we will use object spy

61)What is test object model in QTP ?

A)Test Object Model in QTP, is the combination of Test Object and Run Object information of the objects used.

62)What is Parameterizing Tests?

A)when converting test into data driven tests - we replace fixed values with parameters/variale - is known as parameterizing the tests. Then you test ur application we may want to test how the application performs same operations with multiple sets of data

63)How does QTP identifies the object in the application

A)Mainly objectives are three type's OF PROPERTIES namely

1) Mandatory properties, 2) Assistive properties 3) ordinal identifier firstly QTP traying to identifies mandatory properties if it is not unique then identifies assertive properties if it is not unique then go to identifies ordinal identifier.

64)In how many ways we can add check points to an application
using QTP.

A)1.place the cursor in the script where u want checkpoint and right click in there option is there checkpoint.

2.go after recording script u can go active screen area there snopshoots what ever u record in u r application that images will be there put u r mouse point to that image and right click there also u will get checkpoint option

3.insert menu---checkpoint

65)Explain the check points in QTP?

A)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 Acessiblity 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


A)using Enviromental variables

Labels:

posted by Balaji Visharaman at 12:47 AM 0 comments