Highlighted
Absent Member.. Absent Member..
Absent Member..
906 views

Start Test in REST API 12.53 is not working

Jump to solution

We upgraded from PC 12.2x to 12.53 this week and I can no longer start tests via the REST API.

The URL I use is /LoadTest/rest/domains/MyDomain/projects/MyProject/Runs.

This is an example request:

<Run xmlns="http://www.hp.com/PC/REST/API">
<PostRunAction>Collate And Analyze</PostRunAction>
<TestID>44</TestID>
<TestInstanceID>18</TestInstanceID>
<TimeslotDuration>
<Hours>1</Hours>
<Minutes>30</Minutes>
</TimeslotDuration>
<VudsMode>false</VudsMode>
</Run>


This is the response:

<Runs xmlns="http://www.hp.com/PC/REST/API">
<Run>
<TestID>44</TestID>
<TestInstanceID>18</TestInstanceID>
<PostRunAction>Do Not Collate</PostRunAction>
<TimeslotID>52252</TimeslotID>
<VudsMode>false</VudsMode>
<ID>58</ID>
<Duration>15</Duration>
<RunState>Before Creating Analysis Data</RunState>
<RunSLAStatus>Not Completed</RunSLAStatus>
</Run>
<Run>
<TestID>44</TestID>
<TestInstanceID>18</TestInstanceID>
<PostRunAction>Do Not Collate</PostRunAction>
<TimeslotID>52251</TimeslotID>
<VudsMode>false</VudsMode>
<ID>57</ID>
<Duration>5</Duration>
<RunState>Before Creating Analysis Data</RunState>
<RunSLAStatus>Not Completed</RunSLAStatus>
</Run>
<Run>
<TestID>2</TestID>
<TestInstanceID>1</TestInstanceID>
<TimeslotID>-1</TimeslotID>
<VudsMode>false</VudsMode>
<ID>1</ID>
<Duration>1</Duration>
<RunState>Before Creating Analysis Data</RunState>
<RunSLAStatus>Not Completed</RunSLAStatus>
</Run>
</Runs>

Tags (1)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Honored Contributor.
Honored Contributor.

Re: Start Test in REST API 12.53 is not working

Jump to solution

Hi Aditya,

In order to veify that the PC server recieves the request as HTTP POST and not GET, please do the following:

On the PC server open the IIS logs (by default at C:\inetpub\logs\LogFiles\W3SVC1) and search for the requst url you are using.
Then check what is the HTTP method being used.
Bellow is an example of IIS log entry for the URL http(s)://<PC server>/PCS/LabService.svc with HTTP method POST:
017-03-27 00:13:40 <Server IP> POST /PCS/LabService.svc - 80 - <Client IP> Apache+CXF+2.5.9 - 200 0 0 199

Regards,
Eyal

View solution in original post

5 Replies
Highlighted
Honored Contributor.
Honored Contributor.

Re: Start Test in REST API 12.53 is not working

Jump to solution

Hi,

According to the response you sent it looks like you are sending the request as HTTP GET instead of POST.

Regards,
Eyal

Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Start Test in REST API 12.53 is not working

Jump to solution

Thanks for the reply Eyal.

I have tried both HTTP POST and GET and I am getting the same response.

You are correct in saying that we get a similar response for HTTP GET. But, unfortunately, I am getting the same for POST. 

I have raised this with HP support, hope I get a solution.

Thanks,

Aditya

 

 

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: Start Test in REST API 12.53 is not working

Jump to solution

Hi Aditya,

In order to veify that the PC server recieves the request as HTTP POST and not GET, please do the following:

On the PC server open the IIS logs (by default at C:\inetpub\logs\LogFiles\W3SVC1) and search for the requst url you are using.
Then check what is the HTTP method being used.
Bellow is an example of IIS log entry for the URL http(s)://<PC server>/PCS/LabService.svc with HTTP method POST:
017-03-27 00:13:40 <Server IP> POST /PCS/LabService.svc - 80 - <Client IP> Apache+CXF+2.5.9 - 200 0 0 199

Regards,
Eyal

View solution in original post

Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Start Test in REST API 12.53 is not working

Jump to solution

Thanks Eyal for your support.

I was able to figure out what was wrong with the request. I have used HTTP instead of HTTPS in the url. After this change its working as expected.

Sorry to have wasted your time.

Best Regards,
Aditya

 

 

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Re: Start Test in REST API 12.53 is not working

Jump to solution

Hi Aditya,

I am glad to hear it is working now.

You didn’t waste my time, I am happy to see customers are using PC REST API.

Regards,
Eyal

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.