How do I add array of TestRecords to TestRun in Polarion?

Posts: 5
Joined: Wed Apr 25, 2018 9:27 am

How do I add array of TestRecords to TestRun in Polarion?

Postby hpatel51 » Wed May 30, 2018 11:07 am

I have a list of TestCases to be added into TestRun. All testcases are stored in an array of "linkedItems".

My goal is to add all the TestRecords related to "linkedItems" into testRun.

I used the addTestRecordToTestRun() method to do that, but the issue with this method is, I need to fetch individual records each time.

Adding all the records at a time will be more efficient.-> [How can I do this?]

I am using the code below to do this currently.

TrackerService.WorkItem scenario = con.Tracker.getWorkItemById(project_id, _testScenarioID);
TrackerService.LinkedWorkItem[] linkedItems = scenario.linkedWorkItemsDerived;
TestManagementService.TestRecord testRecord_temp = new TestManagementService.TestRecord();
Console.WriteLine("Adding TestCases to TestRun: " + _testRunID);

foreach (TrackerService.LinkedWorkItem item in linkedItems) {
Console.WriteLine("Adding " + item.workItemURI.Substring(80));
testRecord_temp.testCaseURI = item.workItemURI;
con.TestManagement.addTestRecordToTestRun(testRun.uri, testRecord_temp);

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: jimmyvm4, marcuspm60 and 19 guests