#4636·keploy

[bug]: keploy test prints "Testrun passed" for a test case whose assertion fails

Author: omlahoreCreated Sep 24, 2026Updated Sep 28, 2026
Labelskeploy

Is there an existing issue for this?

  • I have searched and didn't find similar issue

Current behavior

Match compares the response and prints the "Testrun passed" or "Testrun failed" banner, with the diff table on a fail, before it checks tc.Assertions and returns AssertionMatch's verdict. So the banner is about the response comparison while the verdict comes from the assertions, and they can disagree. A test case whose status_code assertion fails on a response that matches the recording prints "Testrun passed" and then shows up as failed, and a passing assertion on a drifted body prints "Testrun failed" with a diff for a test case that passes. I found it with a test that captures what Match prints, not from a real app run, but compareHTTPRespForReplay falls through to a Match with logs on whenever the quiet match fails, so I think the "Testrun passed" one shows up on a normal keploy test run.

Steps to Replicate

  1. Make a test case with a recorded 200 response, body {"a":1}, and the assertion status_code: 500.
  2. Call Match with an actual 200 response and body {"a":1}, with emitFailureLogs true.
  3. It prints Testrun passed for testcase with id: ... and returns false. With the assertion set to status_code: 200 and an actual body of {"a":2}, it prints Testrun failed with a diff and returns true.

Operating system

MacOS

Version

main at 4800a30

Repository

keploy