tinoboehme
12 years agoOccasional Contributor
[res] shared Object / Variable (not Property) within a test
Hello,
is there a possibility to share an Object or an Variable within a testRun?
e.g. I have two groovy testSteps and I'm creating in the first step an Object of an own class:
Now I need to access the same (!) Object within the second testStep:
In this case I get following Error message and the TestStep is failed:
[tt:35su6o8z]ERROR:An error occured [No such property: myObject for class: Script3], see error log for details[/tt:35su6o8z]
I don't want to create a new object:
If I try to save this Object at a Property I get only a string containing the reference:
[tt:35su6o8z]soapui.utils.myUtils@2fb5a9d9[/tt:35su6o8z]
Is it possible to use this string to fetch the initial created Object?
Regards Tino
is there a possibility to share an Object or an Variable within a testRun?
e.g. I have two groovy testSteps and I'm creating in the first step an Object of an own class:
def myObject = new soapui.utils.myUtils( context, log)
assert "1st TestStep" == myObject.context.testCase.getName()
Now I need to access the same (!) Object within the second testStep:
????
assert "1st TestStep" == myObject.context.testCase.getName()
In this case I get following Error message and the TestStep is failed:
[tt:35su6o8z]ERROR:An error occured [No such property: myObject for class: Script3], see error log for details[/tt:35su6o8z]
I don't want to create a new object:
def myObject = new soapui.utils.myUtils( context, log)
assert "2ndTestStep" == myObject.context.testCase.getName()
If I try to save this Object at a Property I get only a string containing the reference:
[tt:35su6o8z]soapui.utils.myUtils@2fb5a9d9[/tt:35su6o8z]
Is it possible to use this string to fetch the initial created Object?
Regards Tino