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.

Relative path declared in the environment variable is not being recognized in the test script

bprabh
bprabh Posts: 5
edited February 2018 in SOAtest

In order to map data with it's respective environments. I followed the below steps,

  1. Created an excel for one environment.
  2. Created a variable in Environment variable and gave the relative path of the excel (${project_loc:project}/TestData/project_TestData_QA.xlsx)
  3. Called this above variable in Data source as ${soa_env:var_name}

It's being recognized in Data source and "show column" works perfectly fine, However when the test script is executed, i'm getting the following error (The filename, directory name, or volume label syntax is incorrect)

But when the same steps are followed by giving absolute path, it works absolutely fine reading all the data from excel.

Comments

  • jakubiak
    jakubiak Posts: 795 admin

    Unfortunately you cannot reference another variable from within an environment variable at runtime, as you observed. I would suggest that instead of putting a variable inside your environment, put only the relative path "/TestData/project_TestData_QA.xlsx". Then, in your data source use two variables: "${project_loc:project}${soa_env:var_name}".

  • bprabh
    bprabh Posts: 5

    thanks. It worked :)