justthom8 justthom8 - 8 months ago 76
Python Question

Uploading Requirements to HP ALM

Does anybody know the attributes in pythom win32com that I need to set in order to upload requirements? I've successfully connected to HP ALM (HPQC) 12.5, but when I try to upload requirements, it tells me that the attribute can't be blank.

The documentation is extremely sparse on COM, and python though, so I'm having a really hard time figuring out what attributes I'm even able to set.

Edit 1 The error I'm getting

'Exception occurred.' (0, None, 'Required field Acceptance Criteria can not be empty or SPACE filled.'

Solution: The issue with HP ALM was that there are custom fields that were required to be populated. I was able to uncheck the box requiring the field to be populated, which allowed me to upload requirements. But, I still wasn't ever able to identify what the field actually was supposed to be


I think the documentation on the COM API of ALM is quite good. E.g. for the Req object.

To get all mandatory fields I think the easiest way is to create a requirement in the ALM-Client (Web-UI). It depends on the customization of your ALM installation.

For me, this code works to create a new requirement (it's in Ruby, but it doesn't really matter):

req_factory = @tdc.ReqFactory
req = req_factory.AddItem(parent_id)
req.Name = "Some requirement"
req["RQ_TYPE_ID"] = "Functional"

There also is a SO question on how to get HP Quality Center field names .