views:

2400

answers:

5

This question may be too product specifc but I'd like to know if anyone is exporting bug track data from HP Quality Center.

HP Quality Center (QC) has an old school COM API but I'd rather use a web service or maybe even screen scraper to export the data into an excel spreadsheet.

In any case, what's the best way to export bug tracking data from hosted HP Quality Center?

+3  A: 

Although this blog post is for reading / writing Quality Center requirements, the code is very similar for Bugs / Defects.

http://ozgrant.com/2008/05/16/query-and-update-quality-center-requirements-from-c/

TDAPIOLELib.TDConnection connection = new TDAPIOLELib.TDConnection(); 
connection.InitConnectionEx("http://SERVER:8080/qcbin"); 
connection.Login("USERNAME", "PASSWORD"); 
connection.Connect("QCDOMAIN", "QCPROJECT"); 
TDAPIOLELib.BugFactory bugFactory = connection.BugFactory as TDAPIOLELib.BugFactory; 
TDAPIOLELib.List bugList = bugFactory.NewList(""); 
foreach (TDAPIOLELib.Bug bug in bugList) 
{ 
  // View / Modify the properties 
  // bug.ID, bug.Name, etc. 
  // Save them when done 
  // bug.Post(); 
}
Grant Holliday
A: 

Thanks Grant. This is great info but is using the COM API.

I was hoping to see a web service API but this will do for now.

Gary Russo
+1  A: 

Personally, I like the COM API and I use it to generate both Word and Excel reports. I have done some experiments with VS2005 and the results are encouraging.

If you don't want to go this route, I have a couple of suggestions.

  1. If you use the charting options (Analysis > Graphs). Each graph has a tab called data grid that lets you export data to Excel and a bunch of other data formats.
  2. If you are an admin, or friendely with your admin, you can dump the whole database into access and then import into Excel. Of course, you'll loose all your table relationships, but it's better than nothing. It's also a really good way to learn the db schema.
JonnyGold
A: 

If manual export (i.e., not using a program) is possible for you, the following will be the easiest way to export defect data.

In QC 9.2 (maybe present in earlier versions, too), there is Export/All in the Defects menu, which exports defects in your defects grid into an Excel sheet.

The fields exported are those shown in the defects grid, which can be customized using the "Select Columns" button (looks like a green grid).

Tobias Kunze
+1  A: 

Unfortunately QC doesn't expose any web-services at the moment. I think the easiest way would be to query the DB directly. The data you are looking for is in the project's schema in BUG table.

QC also have an excel add-in you might want to try that, but it's mainly for adding defects from excel to QC.

LiorH