Resource files

Relevant for: API testing only

You can use resource files to retrieve values for elements and attributes. The fromResource function lets you name the resource containing the values.

In the following example, the signature file retrieves the shortName and description from a resource file.

<Resource
  type="Activity"
  id="ReportMessageActivitySample"
  version="1.0.0"
  group="Miscellaneous"
  shortName="fromResource(conc_str_short_name)"
  description="fromResource(conc_str_description)

The resources are defined in a standard Microsoft ResX Schema version 2.0 Resource fie.

<data name="conc_str_description" xml:space="preserve">
    <value>Reports an activity's run status to the log</value>
  </data>
  <data name="conc_str_short_name" xml:space="preserve">
    <value>Report Message</value>
  </data>

The resource reference must be a compiled file with a .resources extension, compiled from the ResX source file and stored in the same folder as the signature file.

You can generate the compiled file as a post-build operation using the resgen utility. For example:

resgen STBasicActivity.resx STBasicActivity.resources.