Creating CSV Template Resources

A CSV Template, which is a resource type associated with CSVAnalyzer session types, basically defines the schema of a CSV file such that at script execution time the CSVAnalyzer session commands can read a CSV file and extract from it the statistics of interest.

A CSV Template may contain multiple tabular sections, each containing a row for the column header and defining the columns which are to be include during the processing of the CSV file. The sample CSV file shown in Figure:Sample CSV-Format File for example contains three tabular sections, each comprising a different number of rows:

Figure:Sample CSV-Format File

For CSV Templates that contain multiple tabular sections, a statistics group containing multiple statistics each can be defined for each section.

To create a CSV Template resource:

  1. In the TestComposer application, open the Custom Template editor by clicking the New CSV Template button in the Test ribbon.
  2. In the CSV Template Editor, select a CSV file. After selecting the CSV source file, the Custom Template editor is populated with the data contained in the CSV file, as shown in Figure:CSV Templates Editor :
  3. Figure:CSV Templates Editor

  4. Select a tabular section content and click the Mark as table button. For each marked tabular section, an empty statistic group is created in the bottom
    Targets pane.
  5. Select the section's header row and click the Mark as table header button.
  6. Within the current section select a specific column (at any position in that column) and click the Mark as target button.
  7. The statistic corresponding to that column becomes highlighted magenta in the file content pane and is added to the Targets pane, while its properties are displayed in the Properties pane. Edit the target properties in place as follows:

    • Name: The name displayed for the statistic
    • Description: The optional statistic description.
    • Type: The statistic type, which can be only Statistic.
    • Data Type: The statistic data type, which can be String or Number. Please note that the accurate specification of the statistic type is essential to the correct retrieval of the statistic value(s).
  8. To add more than one statistic to the Targets pane, repeat step 5 for each statistic to be exposed by the section.
  9. An added statistic can be removed by selecting its Table pane entry and pressing the Del keyboard key.

  10. In the case of CSV Templates that contain multiple tabular sections, for each section you can define a statistics group by performing repeatedly steps 3 to 6.
  11. By default, the Custom Template is named after the CSV file it is based on.
  12. If desired, type in a new template name (Name field) and a description (Description field), and save the template by clicking OK.

    The newly created custom template is saved into the Resource Manager and can be re-used across different steps and tests by CSVAnalyzer session commands.

Example:

The sample CSV Template shown in the figure below defines two statistic groups, the first exposing two statistics, S2 and S4, while the second group exposes a single statistic, Elapsed Time. Note that the statistic values are shown highlighted magenta.