Forum Discussion

luisnveloso's avatar
13 years ago

Call a TestCase from a Setup Script

Hi, I’m new in Soap UI , and I have a doubt, it could be silly, but I searched some doubt like mine, but I didn’t find anything.

I need to use the “Setup Script” at testCase level to call another testCase of other suite.

I tried this:
def tc = context.testSuite.project.testSuites["SetUp and TearDown"].testCases["SetUp-Generate-Data"];
def runner = tc.run( new com.eviware.soapui.support.types.StringToObjectMap (), false );

But I got the error: “java.lang.NullPointerException: Cannot get property ‘project’ on null object”

Than I tried other options using “getTestCaseByName”, but with no success.

Can someone help me? posting.php?mode=post&f=5#

I can solve it using a groovy script step in each testCase, but I think using it at Setup Script is a better option.

Thanks
No RepliesBe the first to reply