Adding input and output tags to tests

You can send input parameters to, and receive output parameters from the agent computers that are running the tests. You can also chain together multiple HCL OneTest™ API tests in Rational® Quality Manager so that the output of one test can be input into another test. To accomplish this task, create a simple test in Test Factory, and then expose HCL OneTest API test tags as input and output.


  1. Click Create new test in HCL OneTest API > Test.
  2. Right-click Test Steps and select New > General > Function to insert a Function action.
  3. Double click the new function. The Function window opens.
  4. In the text pane, right-click and select Insert Tag > New. The Create Tag window opens.
  5. In Name, type outputtag and select the Expose as output check box.
  6. Click OK.
  7. In the Function window, in the text pane on the same line as tags[“outputtag”], press the space bar, type an equals (=) sign, and press the space bar again.
  8. Right-click in the text pane and select Insert Tag > New.
  9. In Name, type inputtag and select the Expose as input check box
  10. Click OK.
  11. In the Function window, after tags[“inputtag”], type a plus sign (+).
  12. Right-click next to the tag and select Insert Tag > Built-In > TEST> START_TIME. The text should now read tags["outputtag"] = tags["inputtag"]+tags["TEST/START_TIME"]. Click OK.
  13. Add a log action as a new step to the test. Click the Log Action icon (log action icon ) and then double-click the log. The Log window opens.
  14. In Output Message, type outputtag is.
  15. Right-click next to the text, and then select Insert Tag > Test Scope > outputtag. The text for the output message reads outputtag is %%outputtag%%. Click OK.
  16. When you run this test, the inputtag content is concatenated with the test time, and the result is saved to the outputtag variable. The test should look like this:
    Simple test with input and output tags
    Notice that the message that you defined displays in the test console output:
    Test console output with log message