View data sets and grids

When you record a method returning a dataset, data table, or data reader action, VuGen generates a grid for displaying the data.

When working with a data reader, VuGen collects the data retrieved from each Read operation and converts it to the replay helper function, DoDataRead.

For example, after recording the following application code,

SqlDataReader reader = command.ExecuteReader();
     while( reader.Read() )
       {
           // read the values, e.g., get the string located in column 1
           string str = reader.GetString(1)
       }

VuGen generates the following lines in the script:

SqlDataReader_1 = SqlCommand_1.ExecuteReader();
LrReplayUtils.DoDataRead(SqlDataReader_1, out valueTable_1, true, 27);

where the two parameters indicate that during recording, the application read all 27 available records. Therefore, during replay the script reads all available records.

In addition, VuGen generates a data grid containing all the information retrieved by the Read operations.

During replay you can use the output data table, containing the actual retrieved values, for correlation and verification. For more information regarding the DoDataRead function, see the Function Reference (select the relevant version).

When applicable, VuGen displays grid steps in the Step Navigator, and displays the associated grids in the Snapshot pane.

The dataset is stored in an XML file. You can view this XML file in the script's data/datasets folder. The data files are represented by an <index_name>.xml file, such as 20.xml. Since one file may contain several data tables, see the file datasets.grd, which maps the script index to the file index to determine which XML contains the data.

Back to top