Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Parasoft SOA Test Referenced Variable not accessible through Variable Condition dropdown

Hello
I have a tst file(ex file1.tst ) which only has variables defined and I have another tst(file2.tst) which references file1.tst . I can access all variables defined in the file1.tst using extension tool. But when I try to access those variables through a Execution Options-->Variable Conditions , I see empty drop down. Is it because those referenced variables are only visible during runtime ? Is there another way create global variables which I can access from any where , including variable condition dropdown ? Thanks for the help.

Answers

  • benken_parasoft
    benken_parasoft Posts: 1,318 ✭✭✭
    edited February 11

    Is there another way create global variables which I can access from any where

    This is the purpose of the Environments feature. For detail, please see Configuring Testing in Different Environments.

    Your global variables can be defined an an Environments file which is a particular XML file with .env or .envs file extension. You can then reference your .env/.envs file from each of your .tst files to import their Environment variables. If you don't already have an existing .env/.envs file then you can define an environment directly in your .tst file then export it to a .env/.envs file as described in the docs.

    Test Suites can also have their own "test variables" defined on their Variables tab. If desired, test variables can reference environment variables in that you can set their initial value to "${put_env_var_name_here}". In general, you can reference environment variables with ${var_name} syntax no different than test variables, data bank columns, and data source columns.