Forum Discussion
Would you please add groovy script and soapui version details?
<groupId>com.smartbear.soapui</groupId>
<artifactId>soapui-pro-maven-plugin</artifactId>
<version>5.0.0</version>
// my groovy script
import groovy.json.JsonSlurper
def responseContent = messageExchange.response.responseContent
def response = new JsonSlurper().parseText(responseContent)
def sorted_locationId_list = response.locationId.sort()
def vUControllerIds = context.expand( '${#TestCase#VUControllerIds#$[0]}' )
do we need to add any dependency for groovy in the maven pom?
- nmrao9 years agoChampion Level 3It is showing that 34 line of your script has caused this, would you mind showing that?
What is it doing context.expand( '${#TestCase#VUControllerIds#$[0]}' ) -- looks new syntax?- chanukya19 years agoNew Contributor
I have a previous script which saves the array of values into VUControllerIds variable. In the present script I am loading the values using -- >context.expand( '${#TestCase#VUControllerIds#$[0]}' )
- chanukya19 years agoNew Contributor
I fixed the problem . actually not fixed but handled it in a different way.
def vUControllerIds = []
vUControllerIds = context.expand( '${#TestCase#VUControllerIds}' )
def vUControllerId = new GroovyShell().evaluate(vUControllerIds)
Related Content
Recent Discussions
- 4 days ago
- 9 days ago
xml to soap
Solved9 days ago