Can some one please explain why my assertion is failing
As on the image ActualschoolList and ExpectedchoolList are same.(you can see it as a log )
But when I try to assert it its giving me an error.
How to fix this.
Both variables are having somthing similar to this ""
I think it is because you variable "ActualschoolList" is an empty Groovy List object, but your variable "ExpectedchoolList" is the literal string "" these are two different things, thus the assertion fails. If you are expecting an emty list, try defining "ExpectedchoolList" as follows:
def ExpectedchoolList = 
See the following page for more info on working with lists:
Instead of doing  == , match the size if you don't want to assert on the items inside your List.
assert (actualList.size() == expectedList.size()) : "Size not equal"
Click "Accept as Solution" if my answer has helped, and remember to give "kudos" 🙂
Click "Accept as Solution" if my answer has helped,
Remember to give "Kudos" 🙂 ↓↓↓↓↓
Thanks and Regards,