Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space FUNCTDEV and version SVC2023.1

...

The most common method for populating a repository is to use the Generate Parameterized Messages wizard when creating a test suite, but you can also structure and populate a data repository with Excel, WSDL, or schema files using the Data Repository Tool.The Data Repository Tool specifies the data to import, how to structure it, and which repository data source should be include included with the imported data. 

Preparing to Import from Excel

...

In order for the Data Repository Tool to recognize data record type hierarchies, at least one worksheet should have a column with a header header labeled  <child<child_sheet_name> dsref*, which establishes the rows in the worksheet as parent nodes. The <child_sheet_name> value should refer to the name of a sheet that contains child rows of data. The child sheet (sheet referenced with <child_sheet_name>) should contain a column with a header labeled ParentIndex. The cells in this column are numerical values that correspond to rows in the parent sheet. See the Example

...

  • test automation
    • AT-1, Introduction to Automated Testing, Mondays
    • AT-2, Intermediated Automated Testing, Wednesdays
    • AT-3, Advanced Automated Testing, Fridays
  • service virtualization
    • SV-1, Introduction to Service Virtualization, Mondays 
    • SV-2, Intermediate Service Virtualization, Wednesdays
    • SV-3, Advanced Service Virtualization, Fridays
  • environment management
    • EM-1, Introduction to Environment Management, Mondays
    • EM-2, Intermediate Environment Management, Wednesdays
    • EM-3, Advanced Environment Management, Fridays
  • static analysis
    • SA-1, Introduction to Static Analysis, Mondays
    • SA-2, Intermediate Static Analysis, Wednesdays
    • SA-3, Advanced Static Analysis, Fridays
  • unit testing
    • UT-1, Introduction to Unit Testing, Mondays
    • UT-2, Intermediate Unit Testing, Wednesdays
    • UT-3, Advanced Unit Testing, Fridays

 See  Parameterizing Arrays of Varying Size  for additional information about dsref* and ParentIndex columns.

...

The following strings are reserved values that are interpreted as "null" ("nil" for XML traffic): 

  • [parasoft_null]  
  • [null] 

The following strings are reserved values that exclude the value from the generated message, regardless of the message type:

  • [parasoft_exclude]
  • [exclude]

Adding the Data Repository Tool

  1. Ensure that the Data Repository Server you want to import data into is running.Create a new .tst file with an empty test in a new project or existing project. See Adding Projects, .tst files, and Test Suites.
  2. Add a new Repository Data Source to the suite. See Creating a Repository Data Source
  3. Open the data source and specify the target data set for importing the data. You can browse existing repositories on the server in the Repository view view (see see Views in SOAtest). If the specified repository name or data set does not exist, it will be created at runtime.

  4. Right-click the Test node and choose Add New> New > Test.and choose 

  5. Choose Data Repository Tool. and click Click Next. and configure Configure the data and structure initialization options.  See Configuring Initialization Options.
  6. Click Finish and configure the Data Repository Tool.

...

Initialize data from
Initialize structure from
  • Choose None to manually structure the data.
  • Choose Excel to use the structure from an Excel file to structure the data. Refer to the Preparing to Import from Excel section for information about preparing the data.
  • Choose WSDL to use the structure from a WSDL definition file to structure the data. 
  • Choose Schema to use the structure from a schema file to structure the data.

When specifying WSDLs and schemas, specify the definition file and choose the data type definition from the Type menu.

Join columnIf initializing from an Excel file, specify the name of the column that indicates relationships across Excel sheets in the Join column field. By default, the Join column is the ParentIndex column, but you can also point to another column that contains values for referencing the parent row. See Defining the Structure additional information.

...

If you created the Data Repository Tool without initializing data or a structure, a default New node will appear in the panel.

...

Click on the node to access it's its configuration options (see see Configuring Nodes).

If you initialized the structure from Excel during tool creation, the structure will already be applied. You can choose a node from the panel and configure as necessary (see Configuring Nodes).

...

NameSpecifies the name for the node.
Data SourceSpecifies the Excel workbook used to initialize the data (see Configuring Initialization Options). If the None option option was enabled, this field will be empty, and data will need to be added manually using the data source editor (see Viewing and Modifying the Repository Structure and Contents).
Sheet NameSpecifies a sheet name when importing from Excel.
Join Column

Specifies the name of the column used for indicating relationships across Excel sheets. By default, the ParentIndex column is used (see Defining the Structure). 

If the value in a record’s Join Column matches the value in a Parent Join Column record, then that record becomes a child of the parent record.

This setting is not available for column-level nodes. 

This setting cannot be configured for worksheet-level nodes at the root of the tree.

Parent Join Column

Specifies the column in the parent node used for indicating relationships across Excel sheets. By default, the value is set to <Row Number>, which specifies that the column correlates to the parent row number. 

If the value in a record’s Join Column matches the value in a Parent Join Column record, then that record becomes a child of the parent record.

This setting is not available for column-level nodes. 

This setting cannot be configured for worksheet-level nodes at the root of the tree.

Data ColumnSpecifies name of the column containing the data.
Field Type

Specifies which type the data should be imported as. You can specify one of the following types:

  • Record List: Series of complex records that are hierarchical and have multiple fields/columns.
  • Primitive List (see Support for Primitive Lists): A list of primitive types.
  • Array: An array of primitive types.

See Viewing and Modifying the Repository Structure and Contents for additional information about types.

...