HP QTP Question Bank: Q. 121 to 130
Q. 121: What is the use of XML Tree?
XML tree displays the hierarchical relationship between each element and value in the XML tree, enabling us to select the specific elements, attributes and values we want to check. Each element is displayed with a (X) icon. Each value is displayed with a (V) icon.
<<<<<< =================== >>>>>>
Q. 122: How many types of element checks are available in XML Checkpoints in QTP?
1) Check number of attributes: It checks the number of attributes that are attached to the element.
2) Check number of child element occurrences in block: Displays the number of child elements associated with the selected parent element. If we select this
option, QTP verifies that the number of child elements in your XML tree corresponds to the number that appears in the Check number of child element occurrences in block field.
<<<<<< =================== >>>>>>
Q. 123: What is Schema Validation?
We can activate Schema Validation button to confirm that the XML in our application or file adheres to the structure defined in a specific XML schema or schemas. We can validate the structure of the XML we are checking using one or more external schema files or using schema embedded within our XML document.
<<<<<< =================== >>>>>>
Q. 124: What are the methods to populate the XML Tree?
We can use any one of the following three methods to populate the XML tree:
1) Updating the XML Tree Manually
2) Importing an XML Tree from a File
3) Updating the XML Tree Using Update Run Mode
<<<<<< =================== >>>>>>
Q. 125: What are the special guidelines for Schema Validation?
We consider following guidelines when specifying a schema file to validate our XML.
1) If we are validating an XML file using a schema defined in the XML file, the schema can be defined with an absolute or relative path. When we specify a relative path, QTP searches for the schema in the folders listed in the Folders tab of the Options dialog box.
2) If we are validating an XML document located on the Web with a schema file located on our file system, we cannot use UNC format (for example, ComputerNamePathToSchema) to specify the schema file location. Instead, map the schema file location to a network drive.
3) If there is a schema with a namespace defined in our XML document, the namespace of the external schema must be identical to the one defined in our document.
4) When we perform a schema validation, QTP validates all of the elements in the XML document, even if certain XML elements are not associated with a schema file. Any XML elements that are not associated with a schema file will cause the schema validation to fail.
<<<<<< =================== >>>>>>
Q. 126: What is the use of Parameterizing in QTP?
We can use the parameter feature in QTP to enhance our test by parameterizing the values that it uses. A parameter is a variable that is assigned a value from an external data source or generator.
We can parameterize values in steps and checkpoints in your test. We can also parameterize the values of action parameters.
<<<<<< =================== >>>>>>
Q. 127: What is the use of Data Driver when adding parameters in QTP?
If we want to parameterize the same value in several steps in our test, it is better to use the Data Driver rather than adding parameters manually.
<<<<<< =================== >>>>>>
Q. 128: How can we parameterize a step in QTP?
We can parameterize a step by using a test or action input parameter. This enables the step to use values that have been passed from the application that ran our test. For example, we can use an input test parameter as the value for a method argument.
<<<<<< =================== >>>>>>
Q. 129: What is the use of Data Table Parameters in QTP?
We can supply the list of possible values for a parameter by creating a Data Table parameter. Data Table parameters enable us to create a data-driven test, or action that runs several times using the data you supply. In each repetition, or iteration, QTP uses a different value from the Data Table.
We could conduct the test by accessing the Web site and recording the submission of numerous queries. This is a slow, laborious, and inefficient solution. By using Data Table parameters, we can run the test for multiple queries in succession.
<<<<<< =================== >>>>>>
Q. 130: What are the options available for configuring Data Table Parameters?
1) Name: Specifies the name of the parameter in the Data Table. We can create a new parameter by using the default parameter name or entering a new, descriptive name. Alternatively, we can select an existing Data Table parameter from the list.
2) Location in Data Table: Specifies whether to store the parameter in the global or current action sheet in the Data Table.
Continue to Next Part : Q 131 to 140
An expert on R&D, Online Training and Publishing. He is M.Tech. (Honours) and is a part of the STG team since inception.
I need any of your help urgently!
In our application, we will upload one XML file , once it uploaded system , then system idtify each field data and fetch the value into our application.
Here i want to check the validation ( whether the XML data are correctly fetch into our application or not) from our QTP tool.
can you please help me how can i proceed it.
aroorganesh@gmail.com
You can use Microsoft XML DOM object to fetch the data from each tag in XML and compare it with field in your application.