Service Virtualization

Expand all | Collapse all

Unable to change/edit the project.config properties in realtime

Jump to Best Answer
  • 1.  Unable to change/edit the project.config properties in realtime

    Posted 03-27-2019 09:36 AM

    Hi,

    I have multiple tests, calling each other, so I am using the project.config properties to use the data dynamically.

     

    Initially I have the ENV_NAME = "TEST" in project.config

     

    Then i updated the property as below in test-1

    testExec.setStateValue("ENV_NAME", "QA");

     

    When I tried to fetch the value in test-2 as {{ENV_NAME}}, I am get the value as "TEST" instead "QA".

     

    How can I achieve this? 

     

    Thanks,

    Senthilnathan. S



  • 2.  Re: Unable to change/edit the project.config properties in realtime

    Posted 03-27-2019 09:46 AM

    You mention "...I have multiple tests, calling each other..."

    So I assume Test-1 "calls" Test-2?

    What is the mechanism used for Test-1 to call Test-2? Is Test-2 a subprocess?

     

    Cheers,

    Danny



  • 3.  Re: Unable to change/edit the project.config properties in realtime

    Posted 03-27-2019 09:50 AM

    Yes my Test-1 calls Test-2 as sub-process. However I do not want to mention Test-2 as sub process, since I may use the Test-2 as individual test as well. 



  • 4.  Re: Unable to change/edit the project.config properties in realtime

    Posted 03-27-2019 10:06 AM

    Re ... However I do not want to mention Test-2 as sub process ... is the "This is a subprocess" box ticked for Test-2?

     

    It is unclear to me whether or not Test-1 uses the step "Execute SubProcess Step" to call Test-2? (In that case did you untick "This is a subprocess" in Test-2 after you saved Test-1?)

     

    It might help if you add the actual testcases or post some screenshots.

     

    By the way, a testcase marked as "This is a subprocess" can still be executed individually. You just have to make sure that any defined input parameter keys are defined as properties in the config file that you use for individually executing your subprocess test case. This method of providing the keys as config file properties is also the way to unit test your subprocess during development.

     

    Cheers,

    Danny

     

     



  • 5.  Re: Unable to change/edit the project.config properties in realtime

    Posted 03-27-2019 10:27 AM

    I think the answer to "How can I achieve this?" is to add ENV_NAME as an input parameter key in Test-2 and pass the property ENV_NAME as "Parameter to Subprocess" in Test-1.

    As mentioned above, you can still execute Test-2 as an individual test as long as the config file that you provide for Test-2 has ENV_NAME defined.

     

    Cheers,

    Danny



  • 6.  Re: Unable to change/edit the project.config properties in realtime

    Posted 03-27-2019 10:57 AM

    Thanks Danny. It worked for Test-1 to Test-2 but not getting the updated value in Test-3

    But in the below scenario;

    Can you confirm if I am setting the Input Parameter correctly?



  • 7.  Re: Unable to change/edit the project.config properties in realtime

    Posted 03-27-2019 11:46 AM

    In your picture you are setting the Input Parameter correctly.

     

    But I couldn't understand why you would have that result for test3. So I did it myself and as you can see below my Test3 shows "QA", so you must have something wrong in your implementation?

     

     

    Cheers,

    Danny



  • 8.  Re: Unable to change/edit the project.config properties in realtime

    Posted 03-28-2019 02:23 AM

    Super Hero Danny !



  • 9.  Re: Unable to change/edit the project.config properties in realtime
    Best Answer

    Posted 03-28-2019 05:33 AM

    It seems like some cache issues, I restarted the devtest workstation and it worked as expected. 

    Thanks for your help.