Forum Discussion
MartinSpamer
12 years agoFrequent Contributor
The properties and Constructor cannot be removed and must be passed into the Constructor.
Also the LibraryScript and the "Groovy_Script" that references it should be in separate test suites.
class Geo
{
def log
def context
def testRunner
def Geo(logIn, contextIn, testRunnerIn)
{
this.log = logIn
this.context = contextIn
this.testRunner = testRunnerIn
}
def execute()
{
log.info "inside"
def groovyUtils = new com.eviware.soapui.support.GroovyUtils(context)
def response = this.context.expand( '${GetGeoIP#Request}' )
def response_holder = groovyUtils.getXmlHolder(response)
def response_values = response_holder.getNodeValues("//web:IPAddress")
log.info response_values.toString()
return context.values
}
}
context.setProperty( "geo", new Geo( log, context, testRunner) )
Also the LibraryScript and the "Groovy_Script" that references it should be in separate test suites.
Related Content
- 9 years ago
- 4 years ago
- 3 years ago
- 7 years ago
Recent Discussions
- 18 days ago