SoapUI Groovy scripting for testers

SoapUI Groovy scripting for testers

Back to Groovy for testers

This is a seed that will grow.

Basics
Properties

Basics

The first lesson is, when scripting Groovy inside SoapUI, println doesn't work. You have to use log.info

This is how you can address test cases:
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def testCase = testRunner.testCase
log.info testCase
And test steps:
def testStep = testCase.getTestStepAt(0)
def testStep = testCase.getTestStepByName("testStep1")
def testStep = testCase.testSteps["testStep1"]
log.info testStep
By using context
def stepNameVariable = context.expand('${#TestCase#SourceTestStep}')
log.info stepNameVariable
log.info context.testCase.name

Properties