Skip to content

Render stacktrace for concrete exceptions in failing tests #368

Closed
@EgorkaKulikov

Description

@EgorkaKulikov

Description

We should show in generated code the full or partial stack trace of exception in concrete execution.

Expected behavior

If concrete execution fails with implicit exception (unexpected NPE, for example), we generate a green or red test, depending on plugin settings. If such tests should be red, we generate a warning that the current test fails with an exception.

But often not only the exception type is useful, but also its stack trace. So, the suggestion is to render the exception stack trace too, but separate it for developing and production - a user needs only user code methods from stack trace but concrete methods invocations from stack trace could be useful for debugging.

Context

Migrated from JIRA, issue 1644.
Look at CgMethodConstructor.writeWarningAboutFailureTest method

Metadata

Metadata

Labels

comp-codegenIssue is related to code generatorctg-enhancementNew feature, improvement or change request

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions