Page 1 of 1

How getTestRunById() ?

Posted: Wed Aug 22, 2018 11:51 am
by perlu
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.

Re: How getTestRunById() ?

Posted: Tue Sep 25, 2018 1:31 pm
by fbachmann
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