How getTestRunById() ?

Description
perlu
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.
Perlu

fbachmann
Posts: 43
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.

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


According to http://forums.polarion.com/viewtopic.php?f=5&t=19803&p=24820&hilit=itestmanagementservice#p24807

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
François


Return to “Polarion Application Lifecycle Management (ALM)”

Who is online

Users browsing this forum: No registered users and 7 guests