Forum Discussion
Hi,
Your question isn't really a SoapUI one, and may be more suitable for a site like stackexchange.com that has a Groovy specific section.
(I don't mind answering some Groovy questions here, but can only do so when they are well formulated.)
def asdf = ["B","S"]
def qwer = ["B"]
log.info asdf
String result = getExpectedResult(asdf,qwer)
log.info result
public String getExpectedResult(def dbList, def inputCom)
{
def masterSet = [A:'A',B:'BS',C:'CDE']
def status= "true"
for(e in inputCom){
masterValOfCom = masterSet[e]
log.info masterValOfCom
dbList.each{
if(!masterValOfCom.contains(it)){
status="false"
return status
}
}
}
return status
}
The above returns true which is good.
Now I have list of values coming from the loop as for asdf as
[A,B]
[A]
[B]
and so on..
and values for qwer are [A],[B],[C]
now hyow to insert these asdf and qwer in getExpectedResult
because now I use the above code its throwing me error stating MissingPropertyException
Related Content
- 3 months ago
- 7 years ago
Recent Discussions
- 15 years ago