karate icon indicating copy to clipboard operation
karate copied to clipboard

should karate.compareImage() throw an exception on a failure

Open ptrthomas opened this issue 11 months ago • 3 comments

refer comments on this stack overflow issue: https://stackoverflow.com/a/76586756/143475

@jkeys089 perhaps when karate.compareImage() is used, it should always return the delta as the mismatchPercentage and leave it to users to decide how to handle it, that's how karate.match() works by the way

karate.match() returns a JSON with { pass: boolean } in it - I know that should be arguably { passed: boolean } but lets stick to pass. so should the karate.compareImage() also return a pass: boolean property.

ptrthomas avatar Jun 30 '23 15:06 ptrthomas