The syntax for running test cases with LISA Invoke is:
/lisa-invoke/runTest?testCasePath=testCasePath&stagingDocPath=stagingDocPath&[configPath=configPath]&[async=true]&[coordName=csName]
The parameters are:
The path to the test case to invoke.
The path to the staging document. If not provided, a default staging document is created.
The path to the configuration. If not provided, the project.config file for the project is used.
If true, then the response includes a callback key. If not provided, the parameter is set to false.
The path to the coordinator. If not provided, the default coordinator name is used.
Example: Synchronous Invocation
The following URL performs a synchronous invocation of the AccountControlMDB test case in the examples project.
http://localhost:1505/lisa-invoke/runTest?testCasePath=examples/Tests/AccountControlMDB.tst&stagingDocPath=examples/StagingDocs/1user1cycle0think.stg
The following XML response indicates that the test case passed.
<?xml version="1.0" encoding="UTF-8"?> <invokeResult> <method name="RunTest"> <params> <param name="stagingDocPath" value="examples/StagingDocs/1user1cycle0think.stg" /> <param name="coordName" value="Coordinator" /> <param name="configPath" value="" /> <param name="testCasePath" value="examples/Tests/AccountControlMDB.tst" /> <param name="callbackKey" value="64343533653737312D343765312D3439" /> </params> </method> <status>OK</status> <result> <status>ENDED</status> <reportUrl><![CDATA[htp://localhost:1505/index.html?lisaPortal=reporting/printPreview_functional.html#Idstr=61653261643936342D613636392D3435&curtstr=T]]></reportUrl> <runId>61653261643936342D613636392D3435</runId> <pass count="1" /> <fail count="0" /> <warning count="0" /> <error count="0" /> <message>AccountControlMDB,Run1User1Cycle0Think</message> </result> </invokeResult>
Example: Asynchronous Invocation
The following URL performs an asynchronous invocation of the AccountControlMDB test case in the examples project.
http://localhost:1505/lisa-invoke/runTest?testCasePath=examples/Tests/AccountControlMDB.tst&stagingDocPath=examples/StagingDocs/1user1cycle0think.stg&async=true
The following XML response shows the callback key in the result element.
<?xml version="1.0" encoding="UTF-8"?> <invokeResult> <method name="RunTest"> <params> <param name="stagingDocPath" value="examples/StagingDocs/1user1cycle0think.stg" /> <param name="coordName" value="" /> <param name="configPath" value="" /> <param name="testCasePath" value="examples/Tests/AccountControlMDB.tst" /> <param name="callbackKey" value="61663038653562382D663566372D3432" /> <param name="async" value="true" /> </params> </method> <status>OK</status> <result> <callbackKey>61663038653562382D663566372D3432</callbackKey> <message>The LISA test 'examples/Tests/AccountControlMDB.tst' was launched asynchronously at Mon Mar 26 16:05:39 PDT 2012.</message> </result> </invokeResult>
Copyright © 2014 CA Technologies.
All rights reserved.
|
|