cancel
Showing results for 
Search instead for 
Did you mean: 

testRunner / context / log not available (No such property) after running other testcase

Regular Visitor

testRunner / context / log not available (No such property) after running other testcase

I have a problem where testRunner / context / log are not available anymore in the script after running another testcase in this script (error e.g. groovy.lang.MissingPropertyException: No such property: context for class: Script1).

 

Since the situation is quite complicated, I have made a project illustrating the problem if you run the testcase 'start'. Can you help me out what is the problem here? I'm using SoapUI-5.4.0.

3 REPLIES 3
Occasional Contributor

Re: testRunner / context / log not available (No such property) after running other testcase

Hi joeri,

there is nothing really compicated with your script at first. I usually set a context property using this

context.setProperty("value","value")

after that you can access this property by using

context.value

Have you tried this approach?

 

Thank you

-Konstantinos

Community Hero

Re: testRunner / context / log not available (No such property) after running other testcase

Hmm.. Little tricky the way you designed the tests.

Test are being called in cyclic fashion and once you call the test case from "handler", it is losing the "context". Here do you need to call them in the same manner?

The thumb rule is that, each and every test case is independent.

May be you need to reconsider the test case design so that they run independently. Or club them in a single testcase otherwise.


Regards,
Rao.
Super Contributor

Re: testRunner / context / log not available (No such property) after running other testcase

Hi @Joeri,

 

Yes i am agreed with @nmrao, the way you have created your framework is quite tricky because when you run in this cyclic way it just losses the Context.

 

So the main problem which i found is with context.testvar="5" in your handle groovy script.

 

So reconsider about the design of your framework.

 


Click "Accept as Solution" if my answer has helped, and remember to give "kudos" Smiley Happy

Thanks and Regards,
Himanshu Tayal
New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors