Forum Discussion
nmrao
9 years agoCommunity Hero
Thank you PramodYadav for your efforts and posting the solution.
There is a suggestion:
Change #1
From
import javax.naming.Context
def list = [1,2,3,"adfadfas"]
context.setProperty("list",list)
log.info "from script 1 " + list
To
context.list = [1,2,3,"adfadfas"]
log.info "from script 1 : ${context.list}"
Change #2
From
import com.eviware.soapui.support.types.StringToObjectMap def contextMap = new StringToObjectMap( context ) def list1 = contextMap.list log.info "from script 2" + list1
To
log.info "From script 2 : ${context.list}"
But there is a limitation with above approach i.e., that works only if test case is run and does not work if individual steps are run.
Hope you aware of it.
- nmrao9 years agoCommunity HeroThank you for the comment.
- PramodYadav9 years agoContributor
Thank you nmrao for both your suggestions.
I was in fact looking for a way that the stand alone scripts work independently (easy for debugging). So your second suggestion is a big help :).
Thank you groovyguy for helping me understand the cons on reviving a old thread. Both your feedbacks are much appreciated :).
- groovyguy9 years agoCommunity Hero
Not a problem at all. It's good to post solutions and to open up conversations on stuff like this. I am really enjoying seeing the influx of activity!