An output value step is a step in which one or more values are captured at a specific point in your test and stored for the duration of the run session. the values can later be used as input at a different point in the test run.
The data table which is present in QTP before running the script is called Design Time Data Table. This contains various data to be used in the script while script is under execution.
Run Time Data Table
This is the data table you see while QTP script is under execution. At the starting of the script execution QTP copies the data from Design Time Data Table to Runtime Data Table and add, delete or change the data in the Run Time Data Table during script execution. At the end of script execution QTP exports the Runtime Data Table to the Test Results Sheet.
Why Run Time Data Table
If QTP directly modifies data in the DTD table then we cannot use same data table for the next execution of the script since the data has been modified from initial execution. hence to ensure that the same script can be executed without modifying the data in the data table. QTP does changes to the data only in Run Time Data Table without affecting the Run Time Data Table.
Steps to create a text output value while recording :
you can use the database output values to output the value of the contents of database cell.
You can output a value to:
- A test or action parameter
- The run time data table
- An environment variable
The data table which is present in QTP before running the script is called Design Time Data Table. This contains various data to be used in the script while script is under execution.
Run Time Data Table
This is the data table you see while QTP script is under execution. At the starting of the script execution QTP copies the data from Design Time Data Table to Runtime Data Table and add, delete or change the data in the Run Time Data Table during script execution. At the end of script execution QTP exports the Runtime Data Table to the Test Results Sheet.
Why Run Time Data Table
Using QTP you can create the folowing categories of output values:
- Standard Output values
- Text and Text Area Output Values
- Database Output Values
- XML Output Values
We can use standard output values to output the property values of most objects. For example after reserving a ticket, it must be confirmed. In this case confirming the ticket number is required which is generated during run time. you could create an outpuut value in your test to store the ticket number after it is generated during run time. Steps to create standard output value:
- Select Insert>Output Value>Standard Output Value.
- Click the object for which output value must be generated.
- In the Object Selection dialog box, select the object for which you want to specify an output value, and click OK. The output value properties dialog box opens for the selected object.
- Speccify the property value and their settings.
- When you finish defining the output value details , click OK. QTP inserts an output value step in your test.
Steps to create a text output value while recording :
- Select Test>Record.
- Choose Insert>Output Value>Text output Value.
- Click the text string for which you want to specify a text output value.
- Select the object for which you want to specify a text output value and click OK.
- The Text Output Value Properties dialog box opens.
- Specify the setting for the output value.
- when you have finished defining the text output value details, click OK. QTP inserts an output value step in the test.
you can use the database output values to output the value of the contents of database cell.
Steps to create database output values
- Select Insert>Output value>Database Output value.
- Use the wizard to define the query to retrieve the data that you want to output.
- Specify the values to output and their settings.
- When you have finished defining the output value details, Click OK. QTP inserts an output value step in your script.
You can create XML output values from any XML document contained in an XML Web page or frame, or directly from an XML file. you can output element and/or attribute values in an XML output value step.
Steps to create XML output values from XML file:
Steps to create XML output values from XML file:
- Select Insert>Output Value>XML Output Value.
- In the XML file box , enter the path of the XML file.
- Click OK. The XML Output Value Properties Dialog box opens.
- Specify the values to output.
- Click OK, QTP inserts n Output value step in your test.
This comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThis comment has been removed by the author.
ReplyDeletegood one
ReplyDeleteregards,
Neha
https://speakingdots.com
good one
ReplyDeleteregards,
Neha
https://speakingdots.com