ALM Rest api post test status using python
Question ID: 106731
0
0

I want to update the test results of Robot framework to QC using Rest api. By fetching the output.xml file of robot framework, I want to update the test results to QC using rest api.

To do that, I’ve started develop the scripts using HP ALM 11 Rest api’s with python requests and ElementTree modules.

Right now I can able to authenticate, store cookies and retrieve the defects, test ids, test instances from QC.

But now I want to update the test execution status in the test lab of QC, I’ve tried as below: – Using post method of test instance by query the test-set id and testcase-id.

requests.put(self.url + u’/qcbin/rest/domains//projects//test-instances/query={id[1];test-id[3]}’, headers=self.header, data=xml, auth=(self.username,self.__password))

But I got below error

qccore.general-errorNot Foundjavax.ws.rs.WebApplicationException
at org.apache.wink.server.internal.handlers.FindResourceMethodHandler.handleRequest(FindResourceMethodHandler.java:84)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:26)
at org.apache.wink.server.handlers.RequestHandlersChain.handle(RequestHandlersChain.java:22)
at org.apache.wink.server.handlers.AbstractHandlersChain.doChain(AbstractHandlersChain.java:61)
at org.apache.wink.server.internal.handlers.FindRootResourceHandler.handleRequest(FindRootResourceHandler.java:93)

Can some please help me on this error to be solved? or suggest any approach to update the test execution status to QC?

Thanks in advance.

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on March 22, 2016 10:17 am
1179 views
Answers (3)
0
Private answer

Hi Vallik,

could you please share the sample code base of python.
I have the same requirement.
this little help will be greatly appreciated.

regards,
tlnarayana@gmail.com

Marked as spam
Posted by (Questions: 1, Answers: 1)
Answered on January 25, 2017 6:50 pm
0
Private answer

see: http://sqa.stackexchange.com/questions/9298/alm-qc-api-update-test-execution-in-a-test-set

figured it out

I had to pull the ''id'' value from the GET query and use that on the following PUT call:
PUT http://host:port/qcbin/rest/domains/domain/projects/project/test-instances/[id_from_GET_call]

Marked as spam
Posted by (Questions: 0, Answers: 2)
Answered on December 16, 2016 7:12 pm
0
Thank you for providing a solution.
( at December 16, 2016 9:34 pm)
0
Private answer

Hi
Could you please share the sample code of python as I have the same requirement.

Regards
sklearning123@gmail.com

Marked as spam
Posted by (Questions: 0, Answers: 1)
Answered on February 1, 2018 7:09 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top