How to download Raw results using HP Performance center REST API

543 views
Skip to first unread message

Priyanka

unread,
Jun 2, 2015, 12:52:43 PM6/2/15
to LR-Loa...@googlegroups.com
Hello All,

I want to down the rws results file of HP performance center using REST API.

Can you please help

Regards
Priyanka

James Pulley

unread,
Jun 9, 2015, 10:16:45 AM6/9/15
to LR-Loa...@googlegroups.com, priya9...@gmail.com
Just go through the [Event meter] table in the analysis database.  It will be far easier

Priya

unread,
Jun 10, 2015, 8:51:39 AM6/10/15
to LR-Loa...@googlegroups.com, priya9...@gmail.com

Hi James,

Thanks for the suggestion. I will check for th option provided by you.

But my main intention was to extract the HTML files and raw data from ALM Performance center without logging into ALM. Can you please suggest another way to extract this information without manual intervention. I need to do it for certain automation planned for the reporting.

Regards
Priyanka

James Pulley

unread,
Jun 10, 2015, 9:03:03 AM6/10/15
to LR-Loa...@googlegroups.com, priya9...@gmail.com

André Luyer

unread,
Jun 12, 2015, 9:17:57 AM6/12/15
to LR-Loa...@googlegroups.com

It depends on the version of Performance Center you are using.

If you are using PC 11 then you must use the ALM REST API.

If you are using PC 12 then you cannot use the ALM REST API to download the results, use the PC REST API instead.

 

To download results from PC11 do the following:

1. login using basic authentication: http://$ALM_SERVER:8080/qcbin/authentication-point/authenticate

2. download the result file: http://$ALM_SERVER:8080/qcbin/rest/domains/$DOMAIN/projects/$PROJECT/results/$RESULT_ID/logical-storage/

3. logout: http://$ALM_SERVER:8080/qcbin/authentication-point/logout

 

To determine the result_id you can use queries like …/results?order-by={id[DESC]}&query={name[RawResults.zip]}&page-size=1&fields=id

This example returns the result_id of the latest run in ALM.

 

To download results from PC12 do the following:

1. login using basic authentication: http://$PC_SERVER/loadtest/rest/authentication-point/authenticate

2. download the result file: http://$PC_SERVER/loadtest/rest/domains/$DOMAIN/projects/$PROJECT/runs/$RUNID/results/$RESULT_ID/data

3. logout: http://$PC_SERVER/loadtest/rest/authentication-point/logout

 

Note: for basic authentication use e.g. curl --user userid:password …

Or in Vugen script use web_set_user and web_set_sockets_option("INITIAL_BASIC_AUTH", "1");.

 

The REST API documentation can be found in the help section of PC.


André

Priya

unread,
Jun 15, 2015, 10:20:00 AM6/15/15
to LR-Loa...@googlegroups.com
Hi Andre,
 
Thanks for sharing this information and it worked to fetch the details of runs in the repository.
 
Also , I can fetch the test result status using these REST calls . But still I am not able to download the raw results or HTML files included in the results.
Can you please suggest how to modify these requests to save the results in local drive using REST API.
 
Regards
Priyanka

James Pulley

unread,
Jun 15, 2015, 10:30:47 AM6/15/15
to LR-Loa...@googlegroups.com, priya9...@gmail.com
Have you considered the built in automation in Analysis, which will take your data, apply the templates you select and then output the data in a number of formats, including word and html microsite?

I think you are going to be frustrated in the path you seek


On Wednesday, June 10, 2015 at 8:51:39 AM UTC-4, Priya wrote:

André Luyer

unread,
Jun 16, 2015, 7:38:55 AM6/16/15
to LR-Loa...@googlegroups.com
Hi Priyanka,

I am sorry, my crystal ball is not working. So I have to guess what you were doing because "But still I am not able to download" is not very descriptive.
My previous post already shows the URL required to download a result (step 2).

As described in the documentation the results are always send as a zip archive (and metadata as XML or JSON). So I guess you forgot to store it as a file instead of sending it to the terminal...
For example when using the curl command add the option -o or -O.

Note: in PC12 you can add a Analysis template to the test. Then the Results.zip will contain the analysis data in the layout you want.

André
Reply all
Reply to author
Forward
0 new messages