Search code examples
javascriptpostmanpostman-collection-runnerpostman-testcase

Postman - String match resulting in assertion error


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'


Solution

  • 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)