User-Defined Variables

Definition

User-defined variables are variables managed by the test scenario builder.  Variables allow the application to create message content and field values at run time, so that you can perform tests without having to create multiple messages yourself.  Values assigned to user-defined variables are managed by generators.

 

Create a new variable

  1. Click the “Edit Variables” link at the right side of the window.
  2. Click Add…  A new row is added to the grid.
  3. Give it a name.
  4. Select the variable type.
    Variable Type Name Description
    String A set of characters
    Char A single character
    Boolean True or False
    Int Number between -2,147,483,648 and 2,147,483,647
    Long Number between –9,223,372,036,854,775,808 and 9,223,372,036,854,775,807
    Double  A 15 digit number between ±5.0 × 10−324 and ±1.7 × 10308
    Date Time Calendar date between January 1, 0001 and December 31, 9999
    Mapping Table A 2-column table where each row contains an initial value and its equivalent mapping value
    Environment Variable A set of values for which the used value is determined by the active environment.
  5. Configure the generator.  Generators refer to the data sources used to set values to your variable.
    Generator Recommended Use
    Boolean Insert a Boolean value (true or false).
    Date Time Insert a randomly generated date-time value. You can set the range, time unit, format, and other parameters.
    Directory Listing Iterate through files in a specified directory.
    Excel File Pull random data from an Excel 2007+ spreadsheet — for instance, a list of names, addresses, and cities.
    Numeric Insert a randomly generated number. You can set the length, decimals and other parameters.
    SQL Query Pull data from a database based on an SQL query. You’ll be able to configure a database connection.
    String Insert a randomly generated string or static value. You can set the length and other parameters.
    Substring  Insert a part of another variable.
    Table Pull data from HL7-related tables stored in one of your profiles, useful for coded fields.
    Text File Pull random data from a text file — for instance, a list of names. Several file formats can be used: txt, csv, etc
    Environment Variable Map a given value to specific, user-defined environments, such as Development, Production or Local.

    Note: Advanced Mode allows you to combine several generators to generate complex value formats. For instance, a patient ID with the format XXX-9999-M can be generated by combining Excel, numeric and string generators.