Service Virtualization

  • 1.  How to call a sub-process in async

    Posted Sep 13, 2016 05:44 PM

    Hi all,

    how can we invoke a sub-process and let it run in background?

    In detail, i need my test case just trigger a sub-process and then go ahead without to wait the sub-process completion (a sort of async invocation).

    Grazie,

    D.



  • 2.  Re: How to call a sub-process in async

    Broadcom Employee
    Posted Sep 13, 2016 06:58 PM

    Just curious as to to why you have a have a sub-process and just not have it as a test case?



  • 3.  Re: How to call a sub-process in async

    Posted Sep 14, 2016 05:49 AM

    Because the test case used as sub-process is shared among different test-cases. It is just to avoid to replicate several times the same steps.

     

    D.



  • 4.  Re: How to call a sub-process in async

    Posted Sep 14, 2016 07:52 AM

    Since you want to execute the sub-process as a background activity, would it be possible to do this by using the Invoke 2.0 REST API call?  

     

    See if these links help generate ideas: 

    REST Invoke API - DevTest Solutions - 9.5 - CA Technologies Documentation  

    https://support.ca.com/cadocs/0/CA%20DevTest%20Solutions%208%200-ENU/Bookshelf_Files/Invoke/index.html  

    or on your DevTest installation, navigate to:  http://<yourDevTestServer>:1505/api/swagger/#!/CoordinatorServers/startTestActions_post_9 

     

    Are you passing any values from the process to the sub-process?  If so, I do not believe there is a way to pass those values on the REST API call.  In that case, you will need to place the values somewhere (perhaps on the Persistent Model Map or in a DB table) so your "subprocess" test case can access and use them.  Your subprocess would be responsible for cleaning up after itself with regard to these passed values.



  • 5.  Re: How to call a sub-process in async

    Posted Sep 14, 2016 09:11 AM

    Does this test process ever terminate? Why not just run the sub-process at machine startup, then it is always running.

    Just a thought



  • 6.  Re: How to call a sub-process in async
    Best Answer

    Posted Sep 18, 2016 04:53 PM

    I didn't find any solution using Lisa-Invoke; the http method returns after the test completation and this is not what i need. I just need to trigger the test execution.

    I solved using "Execute External Command" step with "wait for completion" un-checked to run my test via TestExecutor.exe.

     

    Domenico