How to update test run result on polarion using api in c#

Description
Ashok.Kakade11
Posts: 2
Joined: Mon Jul 17, 2017 12:09 pm

How to update test run result on polarion using api in c#

Postby Ashok.Kakade11 » Tue Aug 01, 2017 7:16 am

Hi,

I am triying to update test run using web services, but not able to update testrun result
Following methods I 've used to update testrun but it won't work for me.
1) UpdateTestRunRecords - giving me exceptions ( please help with example)
2) UpdateTestRunRecordsAtIndex - Updates the test records but not result like (Pass / fail)

any other method or any help will be appriciated :)

hpatel51
Posts: 2
Joined: Wed Apr 25, 2018 9:27 am

Re: How to update test run result on polarion using api in c#

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

//Here is how i would do this..
//Let me know if any part of code is not clear to you.

TestManagementService.TestRun testRun = con.TestManagement.getTestRunById(project_id, _testRunID);
TestManagementService.TestRecord[] testRecords = testRun.records;
TrackerService.WorkItem w;
foreach (TestManagementService.TestRecord rec in testRun.records) {
string uri = rec.testCaseURI;
w = con.Tracker.getWorkItemByUri(uri);
TestManagementService.EnumOptionId enumid = new TestManagementService.EnumOptionId();
enumid.id = "Pass";
rec.result = enumid;
}

con.TestManagement.executeTest(testRun.uri, testRecords);

vinayasheelag
Posts: 10
Joined: Thu Jan 04, 2018 7:16 am

Re: How to update test run result on polarion using api in c#

Postby vinayasheelag » Mon Jul 02, 2018 8:06 am

Hi hpatel,

You have to update enumid.id = "passed";
not enumid.id = "Pass";.
All the letters should be lowercase letters.

Thanks
vinayasheela


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 3 guests