The Tag Data Store
The Tag Data Store, which is accessed from the menu anywhere within a test, is the repository and access point for all of the data tags that are available to a test.
The data store contains the following types of tags:
- Environment tags
- System tags
- Test tags
- Global test tags
- Overridden Environment tags
The following image illustrates a typical Tag Data Store. The tags are listed in alphabetical order.
You can create a logical hierarchy of tags by separating multiple name sections with the '/' character (for example, 'JMS/URL' and 'JMS/User' is displayed together under the 'JMS' section).
When the Tag Data Store window is open, you can drag tags directly into appropriate fields of the test step that is being edited.
The Tag Data Store toolbar
The toolbar at the top of the Tag Data Store provides all of the actions that are needed for working with tags. The icons available in the toolbar are described.
The same actions for creating and modifying tags from the toolbar can be accessed from the menu.
Filter displayed tags
You can show or hide the available tag types in the Tag Data Store by toggling the tag type icons in the toolbar.
When the icon for a specific tag type is highlighted in the toolbar, that type of tag is displayed. If the icon is not highlighted, that type of tag is hidden.
By default, all tag types are displayed in the Tag Data Store. However, once you set a filter, that filter is retained between tests and between projects.
Create tags
- Create one manually by clicking the icon.
.
In the Create Tag dialog, enter the name, optional default value, and description for the new tag. To set the default value of a new tag to Null, select the "Null" check box.Note: You can enter up to 255 characters in the Name field while you can enter up to 4096 characters in the Default Value field.Use the "Expose as input" and "Expose as output" options to specify whether the tag is to be available as input, output, or both at run time. These options determine which tags are available when you are configuring the Input and Output interface for tests and stubs. For more information, see Setting the Test properties by the input and output tags.Enable or disable the Confine scope to this test option. If disabled, a global test tag is created. For more information, see Test tags and Global test tags.
- Create multiple tags by pasting a list of tag names directly into the
tag data store window. First, create a list of tag names in a text-based file, the names
can contain '/' characters to create a hierarchy as mentioned (for example,
'MYTEST/Name'). Next, copy the list of tag names and paste it into the data store window
(press Ctrl + V or click the paste icon . Note: Blank lines are ignored when pasting tags.
Tag Data Store preferences
If wanted, you can configure the Tag Data Store to open automatically when you are editing a test step. This behavior can be set with the "Show Tag Data Store with editors" option in Test Integrations and APIs General Preferences.
Test tags
Test tags are used within tests to store data values. Tags are normally created within the Tag Data Store itself at the beginning of the test design, but it is also possible to create them when you are editing some test steps (for example, when you are storing the output of an action).
Global test tags
Global test tags can be used during the execution session. Global test tags means that tests run from within a suite can share tag values.
Environment tags
Environment tags are created in the environment and cannot be edited in the Tag Data Store window. For more information, see Environment properties, bindings, and tasks.
Overridden environment tags
It is possible to create a test tag with the same name as an environment tag. In this case, the environment tag value is no longer used; it is overridden. The modified icon is displayed and the value can be overwritten in the test.
System tags
System tags, which are listed, are read-only and are populated by the system at execution time.
Name | Content |
---|---|
ENVIRONMENT/NAME | The name of the environment that is in use. |
FIELD/NAME | The name of a field against which the assertion is being made. |
FIELD/VALUE | The received value of the matched field against which the assertion is being made. |
PROJECT/ROOT | The path to the root of the current project. |
PROJECT/ROOT_DIRECTORY | The OS-specific path to the current project directory. |
SUITE/NAME | The name of the suite directly containing the executing test. |
SUITE/PASSED | When you are running a suite, this tag contains a boolean that is true if the suite passes. |
SUITE/PATH | The path to the suite directly containing the executing test. |
SUITE/RESULT | When you are running a suite, this tag contains the current result. |
SUITE/SCENARIO/NAME | The name of the scenario currently being executed by the suite. |
SYSTEM/BUILD_ID | The current build ID of Test Integrations and APIs. |
SYSTEM/CURRENT_DATE | The current system date (yyyy/MM/dd). |
SYSTEM/CURRENT_DATE_TIME | The current system date and time (MMM d, yyyy h:mm:ss a). |
SYSTEM/CURRENT_TIME | The current system time (HH:mm:ss.SSS ). |
SYSTEM/CURRENT_UTC | The current UTC system time. |
SYSTEM/FAILURE | Contains information about the last exception that is thrown during test execution. |
SYSTEM/HOST_NAME | This hostname of the local machine. |
SYSTEM/INSTANCE_ID | The instance number of the test. |
SYSTEM/USER_NAME | The currently logged in user. |
TEST/ITERATION/NUMBER | The iteration number of the task with which the tag is associated. |
TEST/ITERATION/START_DATE | The start date of the task with which the tag is associated. |
TEST/ITERATION/START_TIME | The start time of the task with which the tag is associated. |
TEST/MESSAGE_SWITCH/CONSOLE_TXT | Contains the console output of the most recently run Message Switch action. For example, if used in the Activity tab of a stub it shows messages that were generated when evaluating whether or not the received message matched the defined events. |
TEST/NAME | The short form of the tests name. |
TEST/PASSED | When you are running a test, this tag contains a boolean that is true if the test passes. |
TEST/PATH | The full form of the tests name. |
TEST/RESULT | When you are running a test, this tag contains the current result. |
TEST/START_DATE | The start date of the test with which the tag is associated. |
TEST/START_TIME | The start time of the test with which the tag is associated. |