Skip to content

Show Java step exception reason in standalone report - #812

Closed
jay23606 wants to merge 2 commits into
authorjapps:masterfrom
jay23606:pr-go/811-standalone-reports-omit-the-exception-me
Closed

jay23606 wants to merge 2 commits into
authorjapps:masterfrom
jay23606:pr-go/811-standalone-reports-omit-the-exception-me

Conversation

@jay23606

@jay23606 jay23606 commented Nov 6, 2026

Copy link
Copy Markdown

Bug

When a Java method step throws, the standalone reports (JSON, granular CSV, HTML) mark the step FAILED but show only the generic Oops! Not decided... assertion text. The underlying cause is only in the executor log and JUnit failure.

Change

  • ZeroCodeMultiStepsScenarioRunnerImpl records the exception reason for the step, adding the root cause when the root throwable is not the same object as the top-level exception.
  • ZerocodeCorrelationshipLogger uses that reason in the step's assertions for the report, so the failure cause shows without opening the logs.
  • ResponseLogBuilder exposes the exception message to the logger.

Testing

  • Added testFailedStepWithExceptionWillShowExceptionReasonInAssertions to ZerocodeCorrelationshipLoggerTest.
  • mvn -o -pl core -Dtest=ZerocodeCorrelationshipLoggerTest test passes on the fix (6 tests, 0 failures).
  • On the base commit, the same test fails with but: was "{Oops! Not decided. Possibly due to non JSON content was encountered. See log for details}".

Regression test: fails on base three times (/Oops! Not decided/), passes on fix three times (mvn -o -pl core -Dtest=ZerocodeCorrelationshipLoggerTest test)

Fixes #811

@jay23606

Copy link
Copy Markdown
Author

Closing as superseded: master already includes the same fix in e28249b ("Include execution failure reasons in standalone reports"), so failed steps show the exception in the standalone report. The one difference in this PR is that it wraps the message as "{Step failed with exception. …}". If you want that wrapper, I can open a small follow-up PR against master for it.

@jay23606 jay23606 closed this Nov 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Standalone reports omit the exception message for failed Java steps

2 participants