IBM Support

How to pass a variable from a test case or test script to the command line adapter

Question & Answer


Question

In IBM Rational Quality Manager (RQM) how do you pass a variable from a test case or test script to the command line adapter?

Cause

You want to specify variables in a test case or test script. When you execute a test
script using your command line adapter, you want those variables from
the test case or test script to be passed to your adapter executable.

Answer

The way Execution Variables work is:

  • If you specified an execution variable in a test script, that
    will be passed as an environment variable to the executable using the
    command line adapter.
  • If you specified values for that same execution variable in a
    test case, those values will override the default values for that
    execution variable in the test script.

So if you specify MyVariable=SomeValue in a test case or test script, then
you can access that as the environment variable qm_MyVariable in the
command line.

If you need to pick up these variables as command line parameters, you will have to
create a wrapper script to pick up environment variables and pass on as arguments for your executable.

[{"Product":{"code":"SSUVV6","label":"IBM Engineering Test Management"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"Adapters","Platform":[{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"4.0;4.0.0.1;4.0.0.2;4.0.1;4.0.2;4.0.3;4.0.4;4.0.5","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Product Synonym

Rational Quality Manager

Document Information

Modified date:
16 June 2018

UID

swg21654773