So need help. In SoapUI we can handle it? (so that API response(10.0) match with Assertion value 10)
If its not possible using Message Content Assertion, then is it possible with JSONPath Existence Match ( I have not much knowledge of Json)
So need help. In SoapUI we can handle it? (so that API response(10.0) match with Assertion value 10)
If its not possible using Message Content Assertion, then is it possible with JSONPath Existence Match ( I have not much knowledge of Json)
Format cell and take data as text like this - '176.98 and then call it. Else try this code:-
def data = 176.98 log.info new Double(data).round(2) assert new Double(result).round(2)==176.98
Hope it works for you.
Hi avidCoder,
Thank you so much for your reply, your solution '176.98 works. But in my spreadsheet (which I'm using for Data Source) there are so many columns which are using formulas. And if im doing the changes ('176.98 ) then formulas does not work.
Regrading your 2nd solution, I am not sure where to add this code as i am new to ReadyAPI (SoapUI Pro) so please provide my more details where i need to add the code in ReadyAPI. Do i need to add custom properties?
I will be very thankful to you :)
Thanks,
Amit
yes.. got your issue.. In this case, You should go for second approach:-
def data = 176.98 log.info new Double(data).round(2) assert new Double(result).round(2)==176.98
Whatever column name (Output_loanTerm) data you want to fetch for assertion.
Read that column data using Java/Groovy code and convert it into double value rounded upto 2 digit.
If you want all the column data to be changed use for loop and implement the same.