Hi Abirs,
Please refer to the below example:
Code will dynamically get one test script and requirement, after that it will add the requirement as a coverage to the test script and will remove it.
I hope this will help you.
http://loadtestingnotes.wordpress.com/2013/11/17/how-to-add-and-remove-requirement-coverage-in-alm/
Used:
Test.CoverRequirement(rfact.Item(RequirementID), -4, True) Console.WriteLine(“Coverage Added…Check Whether this Coverage got added in the Front End…Hit Enter to Continue”) Console.ReadLine() Test.RemoveCoverage(RequirementID) Console.WriteLine(“Coverage Removed…”)
Regards,
Srihari