Service Virtualization

  • 1.  LISA-INVOKE response - property name for Callback key?

    Posted Jun 21, 2018 10:44 AM

    What is property name to reference the Callback Key ? - which is returned in the Lisa-Invoke Rest API response.


    My Scenario:

    I have a test case which at the end of the test, stores the custom test results(.xml format) in a database. this test case is packaged as a mar file and kept in DevTest_Server. Whovever wants to trigger the test cases should make the REST-API call as shown below using LISA-INVOKE to run a Mar file which contains the test case to run on the remote simulator.


    REST-API request call to run a MAR file:

     

    http://DevTestServer:1505/lisa-invoke/runMar?marOrMariPath=%2Ftmp%2FtestArguments.mar&async=true&-DMyTag=appModelId%3D123%3BappInstanceId%3D234

     

    Rest-API Response to the above request

    <?xml version="1.0" encoding="UTF-8"?>
    <invokeResult>
    <method name="RunMar">
    <params>
    <param name="marOrMariPath" value="/tmp/testArguments.mar" />
    <param name="async" value="true" />
    <param name="callbackKey" value="A5659983755C11E8B07B00505696EF5A" />
    <param name="MyTag" value="appModelId=123;appInstanceId=234;" />
    </params>
    </method>
    <status>OK</status>
    <result>
    <callbackKey>A5659983755C11E8B07B00505696EF5A</callbackKey>
    <message>The LISA mar/i '/tmp/testArguments.mar' was launched asynchronously at Thu Jun 21 09:09:00 CDT 2018.</message>
    </result>
    </invokeResult>

    I need the API response to be customized with my test results. I see there is already an idea proposed for this to include custom tag in response. As the idea is still in the proposal phase,

     

    Custom Tag In LISA Invoke Response

     

     

    If the call back key is accessible by the test case within the MAR package, then i can add steps to log my custom test results in a database where it can be uniquely referenced using the callback key. Then i can develop a new api where it can accept the callback key in the request and sends my custom result as response.



  • 2.  Re: LISA-INVOKE response - property name for Callback key?

    Broadcom Employee
    Posted Jun 21, 2018 11:28 AM

    What version of DevTest are you on?



  • 3.  Re: LISA-INVOKE response - property name for Callback key?

    Posted Jun 21, 2018 11:32 AM

    am using DevTest 10.1 



  • 4.  Re: LISA-INVOKE response - property name for Callback key?

    Broadcom Employee
    Posted Jun 21, 2018 01:02 PM

    I got this information from one of our principal pre-sales consultant:

     

    The callback key is just in the API they would use a filter to assign it to a property of their choosing if they were using APP Test. Or pull it out using xPath in any other tool.

     

    Let me know if this helps.



  • 5.  Re: LISA-INVOKE response - property name for Callback key?

    Posted Jun 21, 2018 02:40 PM

    Well yes. I used xpath filter to capture the callback key while i was unit testing the REST-API through CA-Application Test.

     

    But in the real-implementation, this API is being called from a different orchestration tool (CA-Automic). 



  • 6.  Re: LISA-INVOKE response - property name for Callback key?

    Broadcom Employee
    Posted Jun 21, 2018 03:00 PM

    Not familiar with CA-Automic, but I can reach out to some people to see if they have ever worked with that tool.



  • 7.  Re: LISA-INVOKE response - property name for Callback key?
    Best Answer

    Broadcom Employee
    Posted Jun 27, 2018 05:39 PM

    10.3 will provide more options on Test Invoke API but not 10.1. Please see the documentation at 

    https://docops.ca.com/devtest-solutions/10-3/en/using/using-the-apis/test-invoke-api

    -Prema