cancel
Showing results for 
Search instead for 
Did you mean: 

SoapUI3.5 - No such property: testRunner for clases: Script1

Highlighted
Not applicable

SoapUI3.5 - No such property: testRunner for clases: Script1

When I run a soapUI case with script
def targetStep = testRunner.testCase.getTestStepByName( "Properties" ) (Porperties is the properties file in my TestSuite)
I failed with alert "No such property: testRunner for clases: Script1".
Note: Before upgrade my SoapUI to 3.5 from 3.0.1, I have uninstalled the SoapUI 3.0.1 and clear it from my regedit.

Anyone can help me? Thanks a lot!
7 REPLIES 7
Highlighted

Re: SoapUI3.5 - No such property: testRunner for clases: Scr

Hello,

Please, upgrade to 3.6.* from nightly builds: http://eviware.com/nightly-builds/soapui/

Hope this helps,
robert


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
New Contributor

Re: SoapUI3.5 - No such property: testRunner for clases: Scr

Unfortunately the upgrade helps not.
I have the same problem with SoapUI Pro 3.6.1
If I use the line:
def username = testRunner.testCase.testSuite.getPropertyValue( "Username" )

from http://www.soapui.org/Functional-Testing/working-with-properties.html
I get an error: No such property testRunner.
Any ideas?
Highlighted

Re: SoapUI3.5 - No such property: testRunner for clases: Scr

Hi!

Exactly where in soapUI are you running this script? Can you attach a screenshot?

regards!

/ole
eviware.com


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
New Contributor

Re: SoapUI3.5 - No such property: testRunner for clases: Scr

Hallo,
i run the script in an assertion(see screenshot)
Regards
Borges
Highlighted

Re: SoapUI3.5 - No such property: testRunner for clases: Scr

Hi!

that explains it, the assertion script does not have access to the testRunner variable, you can instead use

def testCase = messageExchange.modelItem.testCase

to get hold of the containting testcase.

regards!

/Ole
eviware.com


Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Highlighted
Contributor

Re: SoapUI3.5 - No such property: testRunner for clases: Scr

that explains it, the assertion script does not have access to the testRunner variable, you can instead use

 

So how to get access to the testRunner variable?

Highlighted
Regular Visitor

Re: SoapUI3.5 - No such property: testRunner for clases: Scr

try this :

 

def testCase = messageExchange.modelItem.testCase

def ResponseMessage = testCase.testSteps["Step1"].testRequest.response.contentAsString

log.debug 'response is :::: ' + ResponseMessage

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors