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.

ISSUE: header values translating variables in part.

Options
goofy78270
goofy78270 Posts: 133

I recently have run into the following issue where I set a variable in a pre-req (previous) call and then use the value in the header of subsequent calls. Lately, it appears as though 1 value is translated in a header, but the second value is not.

initial header with variables:
Cookie: authcookie=authorized; sessionid=${db_sessionid}; XSRF-TOKEN=${db_xsrf_token}; _t=${db_t}
X-SESSION: ${db_sessionid}
X-XSRF-TOKEN: ${db_xsrf_token}

resulting translated header:
Cookie: authcookie=authorized; sessionid=${db_sessionid}; XSRF-TOKEN=${db_xsrf_token}; _t=${db_t}
X-SESSION: 348f9009-321b-4dad-9c67-fc687656c6a5
X-XSRF-TOKEN: 114efe4171d82d9f

Has anyone else come across this issue? Any ideas on the possible cause?

Comments

  • benken_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    Options

    If you are seeing variables not getting resolved then it is likely the case that those variables are not getting set in the fist place. For example, if you are using a Data Bank tool to extract a value and copy it into a variable or data bank column then you should verify that your extraction is setup correctly.

  • goofy78270
    goofy78270 Posts: 133
    Options

    They are being set as you can see the single lines are being translated, just not the line for the cookie. They are the same variable in both places...I even copied and pasted to ensure I there were no spelling mistakes.

  • benken_parasoft
    benken_parasoft Posts: 1,230 ✭✭✭
    Options

    Can you describe your test setup a bit more? Are you configuring REST Client tools for each of your calls? I wasn't able to reproduce the behavior you describe.

  • goofy78270
    goofy78270 Posts: 133
    Options

    it appears as though the update for the cookie field is an all or nothing field, meaning if 1 variable is not available, none of the variables in the statement get updated. Since db_t is not used in some scenarios, the entire cookie was not updated rather than translation in part, as I was expecting: Cookie: authcookie=authorized; sessionid=348f9009-321b-4dad-9c67-fc687656c6a5; XSRF-TOKEN=114efe4171d82d9f; _t=${db_t}