Custom Search

HP QTP Question Database: Q. 111 to 120

HP QTP Question Database: Q. 111 to 120

Q. 111: How can we check the location of a cell to be checked in a Row of a table?

By the use of Identify columns option available in Cell Identification tab. This specifies the location of the row containing the cells with which you want to compare the expected data. This is done in two ways:

1) By row number: This is the Default option. It locates cells according to the row position. A shift in the position of any of the rows within the table results in a mismatch.

2) By selected key columns: It locates the rows containing the cells to be checked by matching the value of the cell whose column was previously selected as a key column. A shift in the position of the row does not result in a mismatch. If more than one row is identified, QTP checks the first matching row. We can use more than one key column to uniquely identify any row.

<<<<<< =================== >>>>>>

Q. 112: How can we ensure that a text string appears in a specified area in QTP?

With the help of Text Area Checkpoint, we can ensure that a particular text string appears within a defined area in a Windows application, according to the specified criteria. It is supported for a variety of QTP add-in environments, like Standard Windows, Java, Visual Basic, and ActiveX etc.

<<<<<< =================== >>>>>>

Q. 113: How QTP retrieves Text while checking the text during the test?

QTP tries to retrieve the text directly from the object. If QTP cannot retrieve the text in this manner in some case where the text happens to be the part of a picture, it tries to retrieve the text using an OCR commonly known as optical character recognition mechanism.

<<<<<< =================== >>>>>>

Q. 114: How can we check the databases accessed by our application in QTP?

We can use database checkpoints to check the databases accessed by your application. For this, we define a query on the database. Then we create a database checkpoint for checking the results of the query. A database query can be defined in two ways like:

1) By Microsoft Query: We can install Microsoft Query from the custom installation of the Microsoft Office.

2) By manually defining an SQL statement.

<<<<<< =================== >>>>>>

Q. 115: How can we check a current data value with a value stored in a database in QTP?

With the help of database checkpoint we can check a current data value with a value stored in the database. When we run the test, the database checkpoint compares the current data in the database to the expected data defined in the Database Checkpoint Properties dialog box. If the expected data and the current results do not match, the database checkpoint fails.

<<<<<< =================== >>>>>>

Q. 116: What is the maximum number of rows, which can be defined in a database in QTP?

We can specify a maximum of 32,000 rows.

<<<<<< =================== >>>>>>

Q. 117: What is XML?

XML also called as Extensible Markup Language is a meta-markup language for text documents. This is recognized as a standard by the World Wide Web Consortium or called W3C in short. XML makes the complex data structures portable between different computer environments and programming languages, facilitating the sharing of data.

XML files contain text with simple tags that describe the data within an XML document. These tags describe the data content, but not the presentation of the data. Applications that display an XML document or file use either Cascading Style Sheets (CSS) or XSL Formatting Objects (XSL-FO) to present the data.

<<<<<< =================== >>>>>>

Q. 118: How can we verify the data content of XML files?

With the help of XML checkpoints, we can verify the data content of XML files. Common uses of XML checkpoints are:

1) We can validate that the data has not changed from one application release to the other.

2) We can check the content of an element to make sure that its tags, attributes, and values have not changed.

3) We can verify that the web service returns the XML in the expected structure and with the expected values.

<<<<<< =================== >>>>>>

Q. 119: What are the various types of XML checkpoints in QTP?

We can create three types of XML checkpoints in QTP:

1) XML Web Page / Frame Checkpoint: This checks an XML document within a Web page or frame.

2) XML File Checkpoint: This checks a specified XML file.

3) XML Test Object Checkpoint: This checks the XML data for an object or operation.

<<<<<< =================== >>>>>>

Q. 120: What is the use of XML Checkpoints on Web service operations?

XML Checkpoints on Web service operations compare the expected values of the checkpoint to the actual values returned from the last native Web service operation performed on the test object.

If a different Web service operation step is performed prior to the checkpoint, then the checkpoint will fail.

No comments: