Postman - String match resulting in assertion error

861 Views Asked by At

I am trying to validate a JSON response with data from csv file. Both contain same values but still test fails.

Here is the error on collection runner Address Line 1 Validation 0 | AssertionError: expected '9 DRAGSTAFF AVE' to equal '9 DRAGSTAFF AVE'

1

There are 1 best solutions below

6
On BEST ANSWER

thats usually formating error , just copy paste the actual part from the assertion message and replace the expected value in csv .

enter image description here

copy the highlighted part and replace the value in csv ( hope your assertion is like pm.expect(responsefromjson).to.equal(valuefrmcsv)