How to make Data Sheet Path for as environment specific

ParasofttoudayaParasofttoudaya Posts: 207 ✭✭
edited August 2017 in SOAtest

Data Sheet Path for as environment specific. I have added the the data sheet path as environment variable and trying to access that as data sheet path. It didn't worked for me, is there any way to achieve it??
Scenario: Each excel doc represents each environment.


  • OmarROmarR Posts: 207 admin

    Good morning,

    Use the ${} syntax to parameterize environment variables.
    For example,

  • ParasofttoudayaParasofttoudaya Posts: 207 ✭✭

    I dont think this is going to help out. I will provide detail explanation.

    I have 3 different environments, for each environment i have different excel files.
    Now when i need to switch environment, i have to change the path of the data source.

    I will specify the path of the excel in env variable, is there any way load the excel file to the data source using that variable path??

  • benken_parasoftbenken_parasoft Posts: 588 ✭✭✭
    edited September 2017

    Environment variables work in data source editors but you reference then by prefixing the environment variable name with "soa_env:" like ${soa_env:XLS_PATH}. Please also consider using a data group data source which also makes it easy to switch between different data sources (check the User's Guide for details).

  • ParasofttoudayaParasofttoudaya Posts: 207 ✭✭

    Thanks for the response I am able to achieve it.
    In environment I was trying to use relative path by adding below,
    ${project_loc:EnrollmentAPI}/TestData/TestData_TUP.xlsx and then referring the same in datasource using "${soa_env:TestDataPath}. It was not working.

    Finally i changed the value ../ProjectName/TestData.xls :)

    ..--> to refer the workspace.

  • ParasofttoudayaParasofttoudaya Posts: 207 ✭✭

    I replaced all the required information, But i could not get it so..
    I was trying to get that data bank in next test step. Where i get null value.

  • benken_parasoftbenken_parasoft Posts: 588 ✭✭✭

    I'd recommend keeping discussion about your data bank question in your other post. See my last comment:

  • ParasofttoudayaParasofttoudaya Posts: 207 ✭✭

    That was a typo, is it possible to remove the comments i made?

Sign In or Register to comment.