ERROR: An error occurred [java.lang.ClassCastException]
I am trying to add a Groovy Script to compare Data Source Results with Rest API Resuest. I am asserting as a individual Step. Currently it is erroring out and the error is Java.Lang.ClassCastException.
If I Remove For Loop then Script passes, but i want script to go through all records in db and compare all node elements from API
Re: ERROR: An error occurred [java.lang.ClassCastException]
Do you have the whole error message or know what line the error occured on? I have not been able to try it but by guess is that the error is coming from i<=ItemCountResponse in the for loop. My guess is that ItemCountResponse is not an numeric value. What value do you get if you output ItemCountResponse without the .toString() ?
Also, you dont need to define the variable i before you use it in the for loop. The variable is declared when you do for(i=0;