Ask a Question

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

scar2004
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
SmartBear_Suppo
SmartBear Alumni (Retired)

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. ⬇️⬇️⬇️
Borges
New Contributor

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?
SmartBear_Suppo
SmartBear Alumni (Retired)

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. ⬇️⬇️⬇️
Borges
New Contributor

Hallo,
i run the script in an assertion(see screenshot)
Regards
Borges
SmartBear_Suppo
SmartBear Alumni (Retired)

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. ⬇️⬇️⬇️

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?

try this :

 

def testCase = messageExchange.modelItem.testCase

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

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

cancel
Showing results for 
Search instead for 
Did you mean: