Ans: Determine testing needs – Define testing environment, Analyse your application and plan actions Set up repositories – Local or Shared OR Define function libraries Generate test steps – Add steps, Add checkpoints Data drive your tests Run the tests
Ans: No, QTP works only in the Windows environment.
Ans:
Keyword view:
This view is a tabular representation of all the objects and the actions that are performed on them. Every row in the table is a step performed on the AUT and can be modified. Some of the most common columns displayed are item, operation, value and documentation.
Expert view:
As the name indicates, this view is for more technical users who would want to tweak the source code as per their requirements.
Ans: 5 types of steps : Test Object ( Performs actions on a TO) – Functions – Utility (Steps to control run session. Eg: Reporter. report) – Comment – Programming logic (Loop, conditions…etc)
Ans: The Quick Test Professional process consists of the following main phases:
Analyzing Application: before preparing test cases need to analyze the application to find out the testing needs.
Preparing Testing Infrastructure: based on testing needs create those resources, resources like, shared repository, function library etc.
Building Test Cases: create test script containing action to be performed while testing. Add object repository with the test function libraries.
Enhancing Test: by making use of checkpoints, broadening the scope of test, add logic and condition to test for checking purpose.
Debugging, Running and Analyzing Test: debug the test so that it works without interruption. Run these test and analyze the test result generated by QTP
Report Defects: lock bug into the bug report and send it to the development team.
Ans: The QTP enable us with three types of recording mode:
Normal (by Default recording): In this recording mode QTP identify the object irrespective of their location on the screen. It is done by recording object based on application window.
Analog Recording: It is used when exact mouse movement and action performed by mouse is important. Used in testing the paint application and signature made with the help of mouse.
Low Level Recording: It helps in identifying those objects which is not recognized by the QTP. It is used when the location of object is changing inside the screen.
Ans:
Object Repository:
When QTP learn any object from application it stores those object in the Object Repository with the properties of the object. It is used to identify the object. There are two types of object repository:
Shared Object Repository:
It can be shared between multiple tests but it does not allow making changes in the repository. Mostly used in Keyword Driven methodology. It is saved with .TSR extension.
Local Object Repository:
This type of object repository is linked with only one test. In this we can perform change in the repository, like changing the properties of the object, adding object in the repository. It is saved with .MTR extension.
Ans: Step Generator in QTP helps in creating those steps which is performed over the object while testing. Use of Step Generator in QTP:
Ans: Action Split: It is used to split the action into two parts. There are two type of split an action:
Splitting into two sibling actions: Both split actions are independent of each other.
Splitting into Parent-Child nested action: In this second split action is only called after the execution of the parent split action. Child split action depends upon the parent split action.
QTP generated the duplicate copy of the object repository when we perform the Split action. We can add object to anyone spilt action which is not added into another split action’s repository.
Ans: Add-Ins: these are small programs or files which can be added to a computer in order to enhance the capabilities of the system. The purposes of loading Add-Ins into QTP are following:
Interested in mastering QTP Training? Enroll now for FREE demo on QTP Training. |
Ans: Data-Driven is an automation testing part in which test input or output values, these values are read from data files. It is performed when the values are changing by the time. The different data files may include data pools. The data is then loaded into variables in recorded or manually coded scripts. In QTP to perform the data to drive the test, we use the parameterization process. When we do data-driven test, we perform two extra steps:
Ans: It is the process of making use of different values in place of recorded values which is replaced by variable which contains different values that can be used during the execution of the scripts. QTP enable us with different type of Parameterization, passing of data:
Ans: Yes, QTP enables us to call from one action to another action. There are two ways of calling action:
Call to Copy of action: in this, we generate the copy of action in our repository which enables us to perform changes to the copy of action.
Call to Existing action: we call to action which is made up earlier. This generates the reference to the action. We can access the action in read-only mode. In this, no copy of the existing script and data table is made.
Ans: When generating the test script, it includes only one action. Action contains the number of steps to be performed on the application to test the application.
There are three types of action in QTP:
1. Non-Reusable action: it can be called by test only once in which it is stored.
2. Reusable action: it can be called by test multiple times in which it is stored.
3. External action: it is reusable action but stored in an external test. We can call external action but it will be available in read-only mode we cannot perform any change to the External Action.
Ans:
Ans: In this case, descriptive programming can be used instead of having an OR. Even while descriptive programming tries to use regular expressions to identify the unique property of the objects.
Ans: The difference between the Run time Object and the Test objects are:
Ans: Measuring transaction means that to measure how much time it takes to execute a set of step over the application. A transaction is a collection of steps that we are intended to know how much time it takes to execute. We can define the transaction by enclosing the set of steps with the start transaction and end transaction.
Start transaction: after the encounter of start transaction time measurement start.
End transaction: it is used to stop the time measurement.
Ans: Checkpoint is a point where QTP current value or property of the object with the expected value or property of the object. When we insert the checkpoint in the test, then in the keyword view checkpoint is added in front of the current row and in the expert view a checkpoint statement is added. QTP enable us with the following types of checkpoint:
Standard Checkpoint: check properties of objects like buttons, combo boxes, lists etc.
Image Checkpoint: check the value of an image
Bitmap Checkpoint: check image zooming capability.
Table Checkpoint: check information of a table.
Text Checkpoint: check text is displayed in the correct place.
Text Area Checkpoint: check text is displayed in a specific area.
Accessibility Checkpoint: used to determine a website that is not as per W3C guidelines.
Page Checkpoint: checks properties of the webpage.
Database Checkpoint: check the content of the database.
XML Checkpoint: check XML content.
Ans: Synchronization Point: When the application response speed is not the same as the test execution speed this may cause an error. In order to remove this error we use Synchronization point. Synchronization is done by making a QTP test to wait until the application is ready for execution. When we insert the Synchronization point in the test then QTP generates the WaitProperty Statement in the ExpertView. For synchronization, we can use:
Increase the defaulted time of QTP waits for the web page to load.
Ans:
Expert View: It contains the steps performed over the application in VBScript language.
Expert view enables us to edit the script.
In keyword view, a row exist for each object and method which is mentioned in Expert View.
Keyword View: contains the steps executed on the application in keyword-driven tabular form in the English language.
Keyword View contains four fields: ITEM, Operation, Value, and Document.
By selecting items and operations we can create and modify tests.
Ans: In Keyword driven framework the QTP executed script which is written in the Excel sheet with the help of Driver Script. For making Keyword Driven Framework we have two ways:
Specify Script Values Directly in Excel
Write Global Functions to perform the action on the application as function keywords in Excel.
Ans: The benefits of QTP are:
Ans: Following are the Disadvantage of recording test cases in QTP
Ans:
Expert View: It contains the steps performed over the application in VBScript language.
Expert view enables us to edit the script.
In keyword view, a row exists for each object and method which is mentioned in Expert View.
Keyword View: contains the steps executed on the application in keyword-driven tabular form in the English language.
Keyword View contains four fields: ITEM, Operation, Value, and Document.
Selecting items and operations we can create and modify tests.
Ans: We can synchronize QTP and AUT by applying any one of the following methods:
Ans: The differences between the Design time and Run timetable are:
Ans: The difference between Shared and Local Object Repository are:
Shared OR can be shared between multiple tests whereas Local OR can only link with one test.
Shared OR does not allow making changes in the repository but Local OR enables the tester to perform the change in the object property present in the Object Repository or add an object in OR.
Mostly used in Keyword Driven methodology. It is saved with.TSR extension where as Local OR is saved with.MTR extension.
Ans:
Ans: While executing a test, some unexpected errors and events may occur.
To overcome this we take the help of Recovery Scenario.
The Recovery Scenario Consist of the Following:
Trigger Event: when unexpected events or errors invoke.
Recovery Operation: Operation needed to perform for running the remaining test script.
Post-Recovery Test Run Option: after recovering from an unexpected error where to start the remaining test execution
Ans: The Recovery Scenario Wizard consists of the following steps:
Ans: In QTP, there are the following types of triggers:
1. POP-UP window: QTP identifies the POP-UP window based on the window title and textual content.
2. Object State: object state is identified by its properties.
3. Test Run Error: when the test run result value is failed it is identified.
4. Application Crash: this state is identified by a predefined list of applications.
Ans: The following type of Recovery Operation is available in QTP:
Ans:
Function procedure: it consists of steps of statements written in VBScript with some return value.
SYNTAX of Function Procedure:
[Public][Default][Private] Function name [(arglist)] [Statements]
[name = expression] [Exit Function] [Statements] [name = expression]
End Function
Ans: You will need to select and load the Java Add-in. Then you can record and work on a Java Tree object just like you would with any other object.
Ans: Calling one action from the other can be done by “Inserting a call” to an existing action or by creating a new action. Please refer to tutorial #21 for a detailed explanation.
Ans: You can do that with the help of the environment variable. The exact variable is, OS and OS Version is for the version information.
Ans: You can identify and act on any browser that you opened again by referring to its ‘creation time’ property and use it like you would with a browser object in your OR.
Ans: Actions have their own Datatables and OR, but functions don’t. More importantly, Functions are a VB Scripting element, not only applicable to QTP. Please refer article 21 a detailed explanation of these.
Ans: To remove the associated Function Library we can perform any one of the following methods:
METHOD 1:
METHOD 2:
METHOD 3:
Ans: An action that can be called multiple times within or outside the same test is called reusable action. By default all actions are reusable.
Ans: The different attributes of Regular Expression are:
Backslash(\): when it is encountered the next character is treated as a literal character.
Period(.): is used to search any single character.
Square Bracket[ ]: is used to search for a single character within a list of characters.
Caret(^): is used to match any character in the list except those specified in the string.
Asterisk(*): to match zero or all occurrences of the preceding characters.
Ans:
Global Sheet: Globally accessible by all tests. Used when we have to perform many actions by using a single script.
Action Sheet: Locally accessible in a test. It is used when only one action is performed with one script.
Ans: XML Checkpoints are used for the verification of the current and expect value or properties of the XML documents. A checkpoint fails when actual and expected values or properties are not same.
QTP enables us with three types of XML Checkpoints:
Ans: To modify the Checkpoint in QTP we do the following:
Ans: Syntax to load the function at run time:
LoadFunctionLibrary strCurrentLibPath + “DialogCrashChecks.qfl”, strCurrentLibPath + “DialogL18nChecks.qfl”
Ans: Ordinal Identifiers are used to initialize the value to the object which is in numeric form and it is used to find out its order with respect to other objects.
QTP enable us with the following types of Ordinal Identifiers:
Index: indicates the order of objects.
Location: determine the location of the object like inside the parent window, frame or dialog box relative to other objects.
Creation Time: determine the order in which the web browser opens.
To delete an object from the repository:
Ans: Cross Site Scripting is a thread in the dynamic website. It is also known as XSS. Cross-site scripting occurs when a web application gathers malicious data from a user. The data is collected in the hyperlink form which contains malicious content within it. It allows malicious code to be inserted into the web page. The web page can be a simple HTML code or a client-side script. When the malicious code is inserted into a page and clicked by some user, the malicious code becomes a part of the web request of the user. This request can also execute on the user’s computer and steal information.
Ans: The object Repository stores the element identification properties extracted from the application during recording. ID will be generated for each element and this ID is used for Object identification in the application. The object Repository acts as a repository for the application elements. Object Repository contains two properties of each object for identification:
Ans: Yes. Frameworks are mostly based on how and where you want your test assets to be placed and how they are to be accessed for maximum efficiency. They do not restrict how you write you test itself.
Ans: The hybrid framework is nothing but a combination of frameworks that make you arrive at a solution for your testing needs by taking what works best for your scenario. The obvious advantage is the versatility. It can be tailored to meet any testing project’s needs.
Ans: Sub procedure is a series of VB Script statements (enclosed by Sub and End Sub statements) that perform actions but don’t return a value. A Sub procedure can take arguments (constants, variables, or expressions that are passed by a calling procedure). If a Subprocedure has no arguments, its Sub statement must include an empty set of parentheses ().
Ans: It is not case-sensitive with respect to command and variable names. Everything else, like strings (text), is.
Ans: They are two ways QTP shows your test. Each one has its own features and caters to users of different levels of expertise.
Keyword view: This is a tabular representation of your test that has information like the Item, Operation, Data and Comments.
Expert view: This displays your test in terms of the actual lines of code. It is more like a VB Script editor and is used by advanced users.
You liked the article?
Like: 0
Vote for difficulty
Current difficulty (Avg): Medium
TekSlate is the best online training provider in delivering world-class IT skills to individuals and corporates from all parts of the globe. We are proven experts in accumulating every need of an IT skills upgrade aspirant and have delivered excellent services. We aim to bring you all the essentials to learn and master new technologies in the market with our articles, blogs, and videos. Build your career success with us, enhancing most in-demand skills in the market.