2

Can someone tell me how to automate HP Quality Center site administration? I read somewhere that QC can be automated using QTP (with .NET add-in). Can we do it by using selenium webdriver? If there is any way to do this, can you give me any link or something to refer to?

Thanks in advance :)

Gopi
  • 101
  • 2
  • 5
  • Could you say if u wana INTEGRATE QC and Selenium Webdriver or you would like realy to test QC ? – Eleb May 28 '13 at 14:17
  • Hi Eleb, I don't want to integrate QC with selenium WebDriver. I want to automate 'Site Administration' part of Quality Center. Actions like adding and removing a users in the project. Thanks – Gopi May 31 '13 at 06:57
  • therefore you want to treat QC like a AUT (application under testing). i do not see why not. go on and identify, buttons, objects etc. should not be a problem. – Pixie May 31 '13 at 10:40
  • I am unable to find the elements since QC only works in Internet Explorer. Is there any tool to find the elements through IE? – Gopi Jun 07 '13 at 13:25

3 Answers3

3

Since it seems you want to automate day-to-day tasks rather than perform automated testing an automated testing tool is unneccessary in this case. You'll want to use the QC/ALM Site Admin API instead.

Login to QC/ALM and find the help library. There you should be able to see the Site Administration API guide that contains function references and samples for automating the common admin tasks. The API is packaged as a COM library, so you have a wide choice of languages that you can use to access it.

Xiaofu
  • 15,523
  • 2
  • 32
  • 45
1

I have been using QC API's to automate Quality Center activities like Requirements upload, Test Case upload and results upload, Defects etc...

So you could refer API document library available in QC help.. let me know if you need any other details.

Edit: (from the comments)

Here is the sample code to automate the QC through vbscripting. We could use other languages like java, C#.. to connect to QC and do all those activities which we do by manually logging to QC:

Set QCConnection = CreateObject("TDApiOle80.TDConnection") 
On Error Resume Next QCConnection.InitConnectionEx QCUrl 
If (Err.Number <> 0) 
Then MsgBox ("Enter the Valid Qc url, till Qcbin:" & Err.Description) 
Else On Error Resume Next QCConnection.Login UserName, Password 'UserName and Password are QID and QPWD respectively
crthompson
  • 15,653
  • 6
  • 58
  • 80
Srekk
  • 136
  • 5
  • 15
  • I'm not sure this really helps the OP. Perhaps adding some code, or more detail would help flesh this answer out to be more useful to the OP and others. – crthompson Dec 09 '13 at 07:15
  • Set QCConnection = CreateObject("TDApiOle80.TDConnection") On Error Resume Next QCConnection.InitConnectionEx QCUrl If (Err.Number <> 0) Then MsgBox ("Enter the Valid Qc url, till Qcbin:" & Err.Description) Else On Error Resume Next 'I am not able to use anyother error message if i am not able to use this code QCConnection.Login UserName, Password – Srekk Dec 09 '13 at 18:17
  • Here is the sample code to automate the QC through vbscripting. We could use other languages like java, C#.. to connect to QC and do all those activities which we do by maually logining to QC: Set QCConnection = CreateObject("TDApiOle80.TDConnection") On Error Resume Next QCConnection.InitConnectionEx QCUrl If (Err.Number <> 0) Then MsgBox ("Enter the Valid Qc url, till Qcbin:" & Err.Description) Else On Error Resume Next QCConnection.Login UserName, Password 'UserName and Password are QID and QPWD respectively – Srekk Dec 09 '13 at 18:25
1

One can automate the ALM QC by different ways. 2 most commonly used ways are below:

  1. Using HP-ALM OTA API (OTA API Reference: Click here)

    Pros:
    a.) OTA API is a huge C# API with enormous variety of functionalities which can be used.
    b.) Object Based API. Most programmers can work easily use it.

    Cons:
    a.) Platform dependent. Need to register the OTA COM Client .dll in your local system (Windows) to use it. b.) HP might migrate entirely to REST API in future and stop support/updates for COM API.

  2. Using HP-ALM REST API (REST API Reference: Click here)

    Pros:
    a.) Platform independent. Does not require any client-side software to be installed/registered. Post HTML requests to a server and process the XML-formatted results.
    b.) API of the future. HP might migrate entirely to REST API in future.

    Cons:
    a.) It primarily focuses only on simple CRUD operations of core entities in the client (CRUD = create, read, update, delete).
    b.) Not all ALM functionalities exposed through this API.

You can also have a look at my git repo: myGitRepo. Have got 2 projects implemented using OTA COM API. Both have got a UI with functionalities to achieve several day to day manual tasks performed in ALM. There are several enhancements I am currently working on.