How to compare two Array Lists in SoapUI using groovy script?
I have 2 lists, the first one I got from json response when collecting all the customer numbers, the second one from a database using a query that should give me the same customer numbers as the response to the rest request. listA = [0012345678, 0012123443, 0012321232, 0055544321] listB = [0012123443,0012321232,0055544321, 0012345678] I want to check if both of the lists contain the same items. I don't care about the order, just if they have the exact same items. I tried listA.contains(listB), listA.containsAll(listB), i tried sorting both the lists (listA.sort() and listB.sort()) and then used equals, I still get false. It doesn't even seem to really sort the values, I thought this would work considering they are numbers, or at least appear so. There is no difference in number of white spaces between the numbers in both lists. Any suggestions?2.3KViews0likes1CommentPassing array from groovy to request in Ready!API 2.3.0
Hi, I am passing multiple dates to my request, From groovy I returning this:[2018-06-11, 2018-06-13, 2018-06-11, 2018-06-14, 2018-06-11, 2018-06-14] Before version 2.3.0 I was using the script below to access each element (this one gives 2018-06-11): ${Groovy-CheckIn-CheckOut#result#$[0]} However in latest version it returns empty, also GetData no longer recognizes this array. Is there other way to access, is it related to JSON version update (I am not using one)?808Views0likes0Comments