Service Virtualization

  • 1.  I have Multiple Subprocess files in test case, would like have Property Set in Subprocess Path

    Posted Aug 22, 2016 06:32 AM

     

    Hi

     

    I have multiple subprocess files to be called from once test case. Hence I am trying to make subprocess file path as dynamic setting the file name in one LISA property, when I substitute this property name in SUB process file path, I am having troubles to read result properties after executing the subprocess.

     

    Result properties which I want from subprocess is same for all the Subprocess files in project.

     

    Please let me know if any one as got solution for this.Deleted User



  • 2.  Re: I have Multiple Subprocess files in test case, would like have Property Set in Subprocess Path

    Broadcom Employee
    Posted Aug 22, 2016 05:50 PM

    Where are you setting the property to be used in the path?  In the project.config or one of the properties files?



  • 3.  Re: I have Multiple Subprocess files in test case, would like have Property Set in Subprocess Path

    Posted May 16, 2017 07:26 AM

    @Avinash, Did you got any solution for this? Have stuck up with same issue.

    When the sub-process is being executed for the 1st time, 2 properties lisa.subprocess.*** and lisa.hidden.subprocess.** gets created with value of 1st test case. From then on, for all iterations same value is being used and other test cases are not executed.

     

    Any help would be highly appreciated.



  • 4.  Re: I have Multiple Subprocess files in test case, would like have Property Set in Subprocess Path

    Posted May 22, 2017 04:31 AM

    Hi Hari, 

     

    As of now I have created multiple subprocess steps for different Paths. Could handle the change of path during run time but couldn't define what properties I want to use when each subprocess is exited hence choose to use different subprocess steps



  • 5.  Re: I have Multiple Subprocess files in test case, would like have Property Set in Subprocess Path

    Posted May 25, 2017 07:41 AM

    Hi Avinash,

     

    The approach that you are using is fine, if we have limited test cases. In our case, we have 250+ cases and those many sub-process steps cannot be created

     

    Have found solution for this problem. Whenever a sub-process is getting executed, following 2 properties are getting created.

    Property1: "lisa.subprocess.<<sub process/test case path>>.tst.xml.doc";

    Property2: "lisa.hidden.subprocess.Execute Test Case.testcase.cache",

     

    Both are not string valued properties rather it contains objects. Property 1 contains test/sub-process document object and property 2 contains test case/sub-process property. So we need to create a custom script to load these properties dynamically, before the sub-process step execution. Have achieved this with below piece of code.

     

    String prop1 = "lisa.subprocess.<<sub process/test case path>>.tst.xml.doc";

    testExec.setStateValue(prop1, com.itko.lisa.test.TestCase.openTestCaseDoc(<<test case path>>));

    testExec.setStateValue("lisa.hidden.subprocess.Execute Test Case.testcase.cache", com.itko.lisa.test.TestCase.loadTestCase(com.itko.lisa.test.TestCase.openTestCaseDoc(<<test case path>>), "project.config"));

     

    Now I do have only one sub process step (which will call multiple test cases for each iteration) in my driver script and above script is placed before sub-process step.

    Note: Above script should not be executed for first iteration. For the first iteration, directly run the sub-process step and from 2nd iteration update the properties values through above script.

     

    Please let me know (if you have time and patience to test this ), if this approach works fine for you.



  • 6.  Re: I have Multiple Subprocess files in test case, would like have Property Set in Subprocess Path

    Posted Oct 16, 2017 08:16 PM

    Hi Hari,

     

    You mean to say that, just by setting those two properties, the sub-process will get executed? If so, how can I pass the input parameter to the sub-process(Parameters to Sub Process) and get the output parameters (Result Properties)? Please share your ideas.

     

    Thanks in advance,

    Srinivas.



  • 7.  Re: I have Multiple Subprocess files in test case, would like have Property Set in Subprocess Path

    Posted Oct 17, 2017 04:34 PM

    Have you tried this dynamic approach during the creation of a MAR, inclusion in a test suite, or a deployment to the Coordinator (e.g., Staged a Test)?

    I would think that MAR file and Test Suite creation is going to be problematic since you are controlling which assets are executed at runtime.