The lisa-invoke was built to provide a zero dependency REST like invocation mechanism for LISA tests and suites.
The initial deployments were used to integrate with 3rd party products like CentraSite, MKS and SOA Software's PolicyManager.
Currently LISA Invoke has been modified to be deployed as part of LISA and hosted in the in-process instance of Jetty.
This gives us the ability to allow a user to invoke a test through a URL on any instance.
Tests can be invoked either synchronously or asynchronously. The synchronous invocation will return back an XML payload that includes cycle history information as well as a link to an HTML formatted report. The asynchronous invocation will return back a XML payload that contains a callback key. The callback key can then be used to check the status of the test. In addition to checking the status, you can also stop or kill a long running test.
All supported DevTest releases
Lisa-Invoke has some configuration requirements. The properties specific to lisa-invoke that are used by default are located in the lisa.properties file located in LISA_HOME
. The following properties are used in the configuration of Lisa-Invoke:
lisa.tmpdir
}}{{lisa.portal.invoke.report.url
}}LISA_HOME
}}
In addition to these properties, there are properties that are used that are also used by other Jetty processes:
Run tests with: /lisa-invoke/runTest?testCasePath=testCasePath&stagingDocPath=stagingDocPath&[configPath=configPath]&[async=true]
The parameters used are:
To use the callbackKey returned back to the caller, invoke the callback service.
/lisa-invoke/callback?testCasePath=[testCasePath]&callbackKey=[callbackKey]&command=[status|kill|stop]
The parameters used are:
The XML response is fairly simple but can vary based on the parameters passed in or the state of the test at any given point. This section describes what you can expect to see.
The method node has a 'name' attribute that will have a name of the method being invoked. The 'method' node also have a child node named 'params'. The params node has multiple 'param' nodes each containing a name and value. These are the parameters that were passed into the method.
The status node is the status of the call. The call was either 'OK' or there was an 'ERROR'.
The result Node contains information on the result of the call. This is the section with the most variance in its contents. The possible children elements are as follows:
This section contains sample results for calls that are made to lisa-invoke.
<?xml version="1.0" encoding="UTF-8"?>
<invokeResult>
<method name="RunTest">
<params>
<param name="stagingDocPath" value="D:\LisaTests\LisaInvoke\StagingDocs\RunOnce.stg" />
<param name="legacyReport" value="false" />
<param name="coordName" value="lisa.CServer" />
<param name="configPath" value="D:\LisaTests\LisaInvoke\Configs\project.config" />
<param name="testCasePath" value="D:\LisaTests\LisaInvoke\Tests\ExecuteFromLISAInvoke.tst" />
<param name="callbackKey" value="30653934383432362D363838352D3464" />
</params>
</method>
<status>OK</status>
<result>
<status>ENDED</status> <reportUrl><![CDATA[http://<IP address of Registry>:1505/reporting/printPreview_functional.html#Idstr=33306330363137392D363330632D3430&curtstr=T]]></reportUrl>
<runId>33306330363137392D363330632D3430</runId>
<passCount>1</passCount>
<failCount>0</failCount>
<warningCount>0</warningCount>
<errorCount>0</errorCount>
<message>ExecuteFromLISAInvoke,Run Once</message>
</result>
</invokeResult>
<?xml version="1.0" encoding="UTF-8"?>
<invokeResult>
<method name="RunTest">
<params>
<param name="stagingDocPath" value="LisaInvoke/StagingDocs/RunOnce.stg" />
<param name="legacyReport" value="false" />
<param name="coordName" value="" />
<param name="configPath" value="LisaInvoke/Configs/project.config" />
<param name="testCasePath" value="LisaInvoke/Tests/ExecuteFromLISAInvoke.tst" />
<param name="callbackKey" value="31616536303561332D633765302D3439" />
<param name="async" value="true" />
</params>
</method>
<status>OK</status>
<result>
<callbackKey>31616536303561332D633765302D3439</callbackKey>
<message>The LISA test 'LisaInvoke/Tests/ExecuteFromLISAInvoke.tst' was launched asynchronously at Wed Sep 15 10:44:17 CDT 2010.</message>
</result>
</invokeResult>
<?xml version="1.0" encoding="UTF-8"?>
<invokeResult>
<method name="RunTest">
<params>
<param name="command" value="stop" />
<param name="testCasePath" value="LISAInvoke\Tests\ExecuteFromLISAInvoke.tst" />
<param name="callbackKey" value="30356666393366362D383937372D3431" />
</params>
</method>
<status>OK</status>
<result>
<status>RUNNING</status>
<message>Test has been scheduled to stop or killed.</message>
</result>
</invokeResult>
<?xml version="1.0" encoding="UTF-8"?>
<invokeResult>
<method name="RunTest">
<params>
<param name="command" value="status" />
<param name="testCasePath" value="LISAInvoke/Tests/ExecuteFromLISAInvoke.tst" />
<param name="callbackKey" value="31616536303561332D633765302D3439" />
</params>
</method>
<status>OK</status>
<result>
<status>RUNNING</status>
<message>The Test is still running. Please check back.</message>
</result>
</invokeResult>
Refer to sections "Test Invoke API", "REST Invoke API" and "LISA Invoke API" in the documentation of the DevTest release you are running.