Submit and vote on feature ideas.

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.

translate nested variables in reference test not working

goofy78270
goofy78270 Posts: 133

Currently I set a chain of variables in a single testsuite variable and that works great, however, when I use the above test suite as a reference test suite, the variables within the single variable are not translated. Is there a way to force this, or is this not allowed with reference test suites?

Comments

  • jakubiak
    jakubiak Posts: 795 admin

    Your use case is not completely clear. Could you share a screenshot of how you have your variable configured and your test suite constructed?

  • goofy78270
    goofy78270 Posts: 133

    here is a simple example. This appears to only be an issue for variable used in header which we are setting multiple values for a Cookie reference. I added a simple test suite and reference tst to review the issue.

    In the reference tst, variables combined into a single variable work without issue as shown by the combined_var in the url, and the header which translate, along with the translated result in the bottom pane.

    When using the same combined variable from a reference test, the header (our cookie) results are not translated as shown here.

  • goofy78270
    goofy78270 Posts: 133

    These cookie values come from our login test which we are looking to include in a number of other tsts, if we can get the header values to translate the combine variable.

  • benken_parasoft
    benken_parasoft Posts: 1,228 ✭✭✭
    edited February 2021

    As an observation, I know double variable resolution can happen in certain cases. I believe the primary case is when you have a value in a data source that references some other variable or variables. So, in that case, you may reference a data source column with one variable and then that data source column references other variables. I don't think this double-resolution behavior is necessarily something that is guaranteed to happen consistently in other contexts.

    In general, I would avoid doing what you describe. If you have three variables then just reference them directly. Do not create a variable that references variables that references variables, etc.

  • goofy78270
    goofy78270 Posts: 133

    Understood, but this was a simplified version of the actual request. They are referenced in a single variable due to some scripting, such as if company A, cookie 1 is a part of the combined_var, but company B uses cookie 3 from the login response, to make all other calls. I don't believe using the individual variables would not allow us to do this level of logic outside of the reference suite without having to include the login steps in each tst rather than as a reference.

  • goofy78270
    goofy78270 Posts: 133

    In exploring this nested variable option in other areas, it appears to be inconsistent as even nesting test suite variables results in untranslated items.

  • jakubiak
    jakubiak Posts: 795 admin

    SOAtest does not support referencing a variable defined in the Variables tab from another variable defined there.