Highlighted
Super Contributor.
Super Contributor.
2144 views

Create Linkk between requirements after import in ALM

Hello Good Day all, 

Can any one advice me , if there is any possibility in linking requirements automatically using script .

In one of the project we are importing requirements  , After importing is there any way to link requirements 

automatically or manually have to link  .  Please suggest 

Thanks & Regards

Arjun 

 

0 Likes
4 Replies
Highlighted
Honored Contributor.
Honored Contributor.

Hi,

 

Linkage can be done either manually or through OTA script

0 Likes
Highlighted
Frequent Contributor.. Frequent Contributor..
Frequent Contributor..

Do you think you can be a little bit more specific?  I'm in the same situation and would love to have requirements linked automatically.  I've looked all through the documentation and I still cannot figure it out.  My scripts are imported from excel.  Requirements are imported from excel.  Requirements and Test cases both have a unique field that matches so we know what requirement goes with what test case.

Do you have any step by step instructions or a script I can use to try?  I've tried sample scripts online and nothing seems to work. 

Thanks

0 Likes
Highlighted
Honored Contributor.
Honored Contributor.

Hi Brian,

Linking test cases with Requirements can be done using an excel macro.

Provide the test case id's in the first column of excel sheet.Requirement id's to be mapped in the second column. In the visual basic editor, place the below code. Provide your project details whereever necessary. This code will cover only the requirement id's provided in second column and not the child requirements. If child requirements are also to be mapped , replace False with True in the line of code "testobj.CoverRequirementEx Sheet1.Cells(i, 1), "", False"

 
         Set tdc = CreateObject("tdapiole80.tdconnection")
         tdc.InitConnectionEx "<Application URL> "
         tdc.Login "<username>," < Password > ""
         tdc.Connect "<domain_name>", "<project_name>"

         Set testfactobj = tdc.TestFactory   

      
         For i = 1 To shee1.Cells(Rows.Count, 1).End(xlUp)         
            Set testobj = testfactobj.Item(Sheet1.Cells(i, 1))
            testobj.CoverRequirementEx Sheet1.Cells(i, 2), "", False
         Next
        
          tdc.Disconnect
          tdc.Logout
          tdc.ReleaseConnection
          Set testobj = Nothing
          Set tdc = Nothing

Try this in any test project before proceeding to Production .

0 Likes
Highlighted
Super Contributor.
Super Contributor.

hello!

I tried the piece of VBA you provided in this post and am receiving an error msg:
"Active X component cant create object - error 429"

any idea?

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.