Require services for logging step level output for test component
search cancel

Require services for logging step level output for test component

book

Article ID: 14681

calendar_today

Updated On:

Products

CA Application Test CA Continuous Application Insight (PathFinder)

Issue/Introduction

Unable to get step level details (such as step name, expected result, actual result) when running a testcase through ANT  or HP ALM.  



We are working to extract DevTest results on Junit or some similar format to load using Jenkins for HP ALM. We tried to execute with the DevTest using:

*Lisa Invoke.

*Ant project integration.

 

 

In both scenarios we were unable to get step level details in order to load into a testing tool. It just gives pass/fail result for test cases, but not at step level detail (such as step name, expected result, actual result).

Environment

All supported DEVTEST builds

Resolution

Using Lisa-Invoke &  Swagger API calls you can get the Json Step level details. 

 

Steps to Follow:

************

Step 1:.     Using a sample testcase,  create a  . mar file.  for example  Devtest_config_info.mar

 

Step 2:      Deploy the .mar    using  REST Client.  ( like Postman  , Chrome Rest Client  or command line CURL) . 

This example uses Postman.   Please see the attached screenshot for usage.

 

 POSThttp://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/actions/deployMar

 

 Authorization:  BasicAuth, here you would enter your console username/password. 

 

Body : Form Data -  select Key : file  and  Value : Devtest_config_info.mar

 

The Result you get back  is  an XML response with  Actions to perform. The URL's for each action is given in the response below. 

 

 **Keep note of the test ID:  81AF57BE4D9411E7BF44064120524153. The test ID varies for each test run. We need this ID to start a test  and get the Json reports.

 

 RESULT from Deploy MAR:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Test xmlns="http://www.ca.com/lisa/invoke/v2.0" name="81AF57BE4D9411E7BF44064120524153" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ca.com/lisa/invoke/v2.0 Test.xsd" href="http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/Tests/81AF57BE4D9411E7BF44064120524153" type="application/vnd.ca.lisaInvoke.test+xml"><Name>DevTest_config_info [Run1User1Cycle]</Name><Status>1</Status><RunBy>admin</RunBy><Instances>0</Instances><Link href="http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator" rel="up"/><Link href="http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/Tests/81AF57BE4D9411E7BF44064120524153/actions" rel="actions"/><Link href="http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/Tests/81AF57BE4D9411E7BF44064120524153/actions/start" rel="start"/><Link href="http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/Tests/81AF57BE4D9411E7BF44064120524153/actions/stop" rel="stop"/><Link href="http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/Tests/81AF57BE4D9411E7BF44064120524153/report" rel="report"/><Link href="http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/Tests/81AF57BE4D9411E7BF44064120524153/metrics/status" rel="metrics"/></Test>

 

Step3:     Start the Test using the below command from the response we got.    

POST  http://localhost:1505/api/Dcm/CoordinatorServers/Coordinator/Tests/81AF57BE4D9411E7BF44064120524153/actions/start

 

 

Step4:  Get Json Result:

GET  http://localhost:1505/lisa-test-invoke/api/v1/tests/testreports/81AF57BE4D9411E7BF44064120524153/