Query and Update Quality Center Requirements from C#

HP’s Quality Center (QC) is primarily used for it’s defect tracking and test suite management capabilities. More recently they have released a Requirements Management module that is able to tracks requirements.

If you want to query and update the data programmatically, it’s actually quite simple using what they call their “Open Test Architecture” APIs.

  • Add a reference to: C:\Program Files\Common Files\Mercury Interactive\Quality Center\OTAClient.dll

To get this dll on your machine, you’ll need to have logged in to the QC web interface and installed the ActiveX objects.

Then you can query all Requirements by using TDAPIOLELib.ReqFactory.NewList(optional filter):

TDAPIOLELib.TDConnection connection = new TDAPIOLELib.TDConnection();

connection.InitConnectionEx(”http://SERVER:8080/qcbin“);

connection.Login(”USERNAME”, “PASSWORD”);

connection.Connect(”QCDOMAIN”, “PROJECT”);

TDAPIOLELib.ReqFactory reqFactory = connection.ReqFactory as TDAPIOLELib.ReqFactory;

TDAPIOLELib.List requirementsList = reqFactory.NewList(”");

foreach (TDAPIOLELib.Req req in requirementsList)

{

  // View / Modify the properties

  // req.ID, req.Name, etc.

  // Save them when done

  // req.Post();

}

Querying Defects is much the same, just substitute ReqFactory for BugFactory. Enjoy.

What’s your Circle of Interest?

Paul Stovell put out the question to bloggers to define how they spend their time. He defines the three areas like this:

Core
These are things I enjoy, care about, and follow as much as I can. When news breaks in these areas, I try to stay on top. I like to think I’m an expert in some of them, and have strong opinions on the rest.

Non-core
I find myself working with these things, or have a minor interest in them, but tend to follow announcements occasionally. I have opinions and will probably complain if I don’t like certain aspects of them, but I’m not about to start evangelising them.

I don’t care
The only time I spend in these things is to decide whether I care or not. I don’t really use them. I don’t pay much attention to them. I prefer not to work in any of these areas.

So here’s what mine looks like at the moment. I have no doubt that some things will get shifted around over the next 12 months while drinking from the firehose, but it’s good to write down where I stand now.

 Circle of Interest

What’s in your circle of interest?

I’ve accepted a job with Microsoft

This morning I accepted an offer for a job on the Visual Studio team in Redmond (Seattle). My wife and I are super excited about this opportunity. Unfortunately it means that I’ll no longer be an MVP. (A small price to pay I guess).

Scott Hanselman summed it up well when he joined Microsoft last year with this image:

“Most of us spend our time over in the red circle doing stuff someone will pay us to do. If you’re lucky, you spend your time in-between them, doing stuff you’re good at also. Sometimes something comes along that puts you right in that sweet spot and you have to go for it. Will this be my dream job? Could be, I don’t know, but if it’s not, it might get me a lot closer.”

image

The goal

Back in 2002 I holidayed to that part of the world (North America/Canada), and I said to myself:

“I want to come back here, but not just for a holiday”

Since then, the goal has been refined a little to: “I want to work for MS in Redmond doing TFS stuff” and everything I’ve been doing has been working towards that goal. It just shows the importance of goal setting.

The role

The title of the job is “Program Manager”, which is a fairly generic title that overlaps people skills & technical skills. You can learn more about it here at JobsBlog. My particular role will be on Joe Schwetz’s team which is responsible for maintaining all of Microsoft’s internal version control systems (including TFS). The role is a little gray at the moment, but essentially I’ll be using my consulting/TFS knowledge to help drive internal adoption of TFS with other MS teams (currently at 13,500 users). I believe another part of the role will be bubbling up internal lessons learnt to the outside world.

When?

We’re still finalising a start date, but we’re aiming for June 16th. That means the next 6 weeks are going to be pretty hectic while my wife and I pack up our house & lives to be moved.

The blog & community sites

Don’t worry, I’m not going to stop blogging. What I’m thinking of doing though, is changing the focus of ozgrant.com to be a travel-blog, and continue my TFS blogging over at blogs.msdn.com.

At this stage the oztfs.com mailing list and tfsbuild.com build recipes sites will continue as normal.

TFS Rosario - Enhanced Project Management using Excel

Fellow Team System MVP Mickey Gousset has recorded 2x 30 minute video screencasts showing off the agile project management tools that are available in the April CTP of VSTS Codename “Rosario”.

Here are some screenshots from the first mini-story that highlights some of the excellent tooling that has been built to plan iterations:

TFS Rosario - Capacity planning in Excel

TFS Rosario - Calculated Capacity graph in Excel