How getTestRunById() ?

Posts: 3
Joined: Thu Jul 26, 2018 6:56 am

How getTestRunById() ?

Postby perlu » Wed Aug 22, 2018 11:51 am

Hello all,

How you get a TestRun for lunch him with a script?

Because i use

Code: Select all

getTestRunById(this.getId_project(), this.getId_test_run()
and it's doesn't work.
All the time it's NULL.

best regard.

Posts: 55
Joined: Thu Apr 24, 2014 12:10 pm

Re: How getTestRunById() ?

Postby fbachmann » Tue Sep 25, 2018 1:31 pm

Hi Perlu

this is a method for the Test Management Web Service - is that where you're calling it from?

If not, there's a method getTestRun in the TestManagementService interface (ITestManagementService):

Code: Select all

ITestRun getTestRun(java.lang.String projectId, java.lang.String id)

Returns a Test Run from the specified project with the specified id.

projectId -
id -
never returns null, but the returned Test Run might be unresolvable.

According to

you can access the TestManagementService as follows:

Code: Select all

#set( $dataService = $trackerService.getDataService() )
#set( $protoTestRun = $dataService.getPrototype("TestRun") )
#set( $aTestRun = $dataService.searchInstances( $protoTestRun, "", "id", 1) )
#set( $aTestRun = $aTestRun.get(0) )
#set( $testManagementService = $aTestRun.getTestManagementService())

Hope this helps, let us know

Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: duanein18 and 20 guests