Highlighted
Absent Member.
Absent Member.
1612 views

how i can integrate HP QC API with rails application?

Hi All,

 

I want to integrate hp qc with my ruby on rails application on linux platform, anybody worked on the same? is there any api or gem available to integrate qc with rails application.

 

Thanks in Advance.

 

Anurag Saxena.

0 Likes
8 Replies
Highlighted
Absent Member.
Absent Member.

Hi Anurag,

 

I would say that it depends on:

  • What you want to do with QC
  • What version you are on (QC 10, ALM 11)

 

If you want to access QC project data (defects, requirements, tests), and you are on ALM 11 or after, then the best would be to use the REST API. Easily accessible with RoR.

If you are on QC10, this is going to require you to use the OTA COM API, which needs to run on a Windows machine. Do-able too, just a little bit more overhead, and also a bit more complicated than ALM 11 with REST.

 

Hope this helps,

Olivier.

--
Forj: continuous integration & delivery for the masses
http://www.hp.com/go/forj
Do not hesitate to mark a question as closed if you think you have all you need (Kudos do help too 🙂 )
0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Olivier,

 

Thanks for your response.

 

I want to fetch test cases from QC, then i will need to submit results of these test cases to QC from my RoR application. I am using ALM 11.

 

Can you please provide me some of references (URLs) for REST API?

 

Thanks

Anurag Saxena.

0 Likes
Highlighted
Absent Member.
Absent Member.

Then yes, go with REST. It has what you need.

 

Reference:

http://<ALM.URL>/qcbin/Help/doc_library/api_refs/REST/webframe.html

 

One piece of advice: be cautious with session management and make sure you keep sessions opened as long as you can. When opening a session, you may want to leverage the site-session resource to identify your client (replace the default "REST Client" name, visible in site admin). http://<ALM.URL>/qcbin/Help/doc_library/api_refs/REST/Content/REST/site-session.html

 

Hope this helps.

 

Do not hesitate to mark this question as closed if you think you have all you need (Kudos do help too 🙂 )

--
Forj: continuous integration & delivery for the masses
http://www.hp.com/go/forj
Do not hesitate to mark a question as closed if you think you have all you need (Kudos do help too 🙂 )
0 Likes
Highlighted
Absent Member.
Absent Member.

I am not be able to access these two URL's -

 

http://<ALM.URL>/qcbin/Help/doc_library/api_refs/REST/webframe.html

 

http://<ALM.URL>/qcbin/Help/doc_library/api_refs/REST/Content/REST/site-session.html

 

are they accessible to you right now?

 

Thanks

Anurag Saxena.

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Anurag_12

In those links you need to substitute the name of your ALM server where it says <ALM.URL>
[If this post solves or helps solve your issue, mark the thread as solved and give KUDOS to the author for their assistance.]

(Opinions expressed in my postings are mine alone, and do not reflect the opinions of my employer.No warranties express or implied for any solution/suggestion posted.)
0 Likes
Highlighted
Absent Member.
Absent Member.

I think the easy way to do this would be to have a QC test that launches a ruby script or application and reads the test results as a variable.  You could have a generic ruby piece that recieves testname or some other variable and then parses back the results which qc then has the data for. Then you would instantiate several tests based on the same template test, but with different configuration or testname. 

 

Jen

I work for HP.
-- Give me Kudos by clicking the purple counter if this helped!
0 Likes
Highlighted
Absent Member.
Absent Member.

Hi Olivier,

 

Now i am able to fetch test and test-instances from ALM server, now i need to update the "status" of test-instance. I tried to update by following documentation of REST API suggested by you but couldnt get the solution.

 

Can you please provide some code examples to update a test-instance on ALM server.

 

Thanks in Advance.

 

Anurag Saxena.

0 Likes
Highlighted
Absent Member.
Absent Member.

Hello Anurag,

 

Glad you got it working!

It is hard to help you without looking at the code you have tried. Can you share it here? I do not have a specific example, but we should be able to tell with help from the documentation.

 

Hope this helps,

Olivier.

--
Forj: continuous integration & delivery for the masses
http://www.hp.com/go/forj
Do not hesitate to mark a question as closed if you think you have all you need (Kudos do help too 🙂 )
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.