Page tree

Skip to end of metadata
Go to start of metadata

This topic covers literal view options, which allow you to directly specify the message or request body. The Literal view contains the following options:

Text

Use this option if you want to type or copy a message into the UI. Select the appropriate MIME type, then enter the message in the text field below the Text radio button.

  • You can parameterize attributes and simple elements that contain text content by accessing data source values (from data sources or data banks) by using  the {$} syntax. If parameterizing with a column from a repository data source, be sure to reference a primitive column or a primitive list column, not a record list column.
    For example, use ${books:publisher} to reference the publisher column from the books sheet of an Excel data source. Use ${title} to reference the title column from a data source or the data bank tool.
    If you use ${} format variables such as ${value}, those variables will be resolved before processing. To prevent variables from being processed, escape ${} variables using a backslash.  For example, the value "\${HOST}" will be interpreted as "${HOST}"; the variable will not be resolved. 



    Data source settings from Form views will be carried over into Literal view (and from Literal view to Form views).

                        

  • You can parameterize complex XML elements from a Parasoft Data Repository data source column, which may reference zero, one, or multiple hierarchical record values. For details, see Parameterizing with Hierarchical Data from a Data Repository Data Source.
  • You can beautify XML or JSON by right-clicking within the Text field and selecting Beautify from the shortcut menu.
  • For SOAP, you can choose elements from a schema for both the body and the header by right-clicking within the Text field and selecting Import Schema Element. After selecting this option, a dialog appears from which you can load declared elements from a schema location. After loading elements, you can select multiple elements for the SOAP header. Once you click OK, a SOAP Envelope will be created based on the chosen element definitions.

Parameterizing with Hierarchical Data from a Data Repository Data Source

You can parameterize complex XML and JSON elements from a Parasoft Data Repository data source column, which may reference zero, one, or multiple hierarchical record values.

  1. Add a Parasoft Repository Data source. See Creating a Repository Data Source.

  2. Use "ParasoftColumn" to specify which Data Repository column should be used to parameterize that level in the hierarchy of the message. See Hierarchical Parameterization with Literal View.

File

If you already have a file that specifies the message, use this option to indicate the location of that file.

  • Check the Persist as Relative Path option if you want the path to this file to be saved as a path that is relative to the current configuration file. Enabling this option makes it easier to share tools across multiple machines. If this option is not enabled, the path to this file will be saved as an absolute path.
  • Check the Resolve Environment Variables option if your file is text and has environment variables that you want resolved. Otherwise, leave this option disabled to improve performance. This option must be disabled if file is binary.

Data Source

If you already have a file containing the various messages you want to use:

  1. Setup a File data source for that file (as described in Adding a Data Source at the Test Suite, Project, or Global Level andAdding a Data Source at the Responder Suite, Project, or Global Level).

  2. Use the Data source name column box to indicate which column of data you want to use.
  • No labels