How to pass tag values using the Run Test action

Technote (FAQ)


Question

How do you pass tag values between parent test and child tests in Rational Integration Tester of IBM Rational Test Workbench?

Cause

You want to structure your tests, so that you call sub-tests when using the Run Test action. You want to know how you can pass values between the tests by using tags.

Answer

See the Rational Integration Tester Reference Guide for full details on the use of test tags.

The following is a worked example to demonstrate the use of tags to pass values between tests. It passes a value from parent to child test, and from child to parent test. A small sample project containing this example is also attached for you to try.


  1. Create the parent test.

  2. Create a test tag in the parent test in the Tag Data Store to pass a value in to the child test.





    Enter a Default Value that you pass into the child test.


    Click Expose as output to enable the value that you pass to other tests.


    The setting for Confine scope to this test controls whether other tests use the tag value. This setting is relevant when this test is part of a test suite. It has no effect here.

  3. Create a test tag to store the value returned by the child test.





    Click Expose as input. to allow the tag to get a value from a child test value.

    Enter a Default Value.

  4. Create the child test.

  5. Create a tag In the child test to pass a value back to the parent test.





  6. Create a tag in the child test to store the value from the parent test.



  7. Add a Run Test action in the parent test and highlight the child test.

  8. Click the Value tab and highlight the child test tag.




    Click the button highlighted to move the tag from Unmapped to Mapped. Now you can map a value to that tag.




    Highlight the tag and enter a value in the Value field or right-click to select the parent tag that you want to pass in.


    Click OK to save.

  9. Click the Store tab to get a value from the child test.


    Highlight the tag and click the button to move the tag from Unmapped to Mapped.


    Highlight the tag in Mapped and right-click in the Value field to select the child test tag.





    This configuration will map the value held in child test tag child_value to the parent tag my_tag.

  10. Add some Log steps in both parent and child test to display the values of the tags to confirm that you are mapping the values correctly.



NOTES

  • If you click Run process in parallel in the Config tab of the Run Test action you will not be able to pass values from the child test back to the parent test. This is because the child test is running asynchronously from the parent.
  • Click on the Properties tab of a test in the test editor to see a summary of tags being used for input and output.
  • You can share tag values between tests in the same test suite.
    Create the same tag in each test and disable Confine scope to this test.
    The tag value will be passed to each subsequent test.

Rate this page:

(0 users)Average rating

Add comments

Document information


More support for:

Rational Test Workbench
Rational Integration Tester

Software version:

8.0

Operating system(s):

AIX, Linux, Solaris, Windows

Reference #:

1620170

Modified date:

2013-01-08

Translate my page

Machine Translation

Content navigation