Skip to content

Support artificial errors rendering in summaries #1739

Closed
@EgorkaKulikov

Description

@EgorkaKulikov

Description

An ArtificialError is a kind of suspicious behavior that is detected in engine, but does not lead to execution failure.
The existing example is overflow detection. One more kind of artificial errors in the future is taint analysis error.

We should render correct summaries for artificial errors.

Expected behavior

  • Summaries does not contain any text related to throws keyword
  • Summaries does not contain any inner errors like OverflowDetectionError

Context

Current implementation looks like the following:

     /**
     * @utbot.classUnderTest {@link A}
     * @utbot.methodUnderTest {@link A#inc(int)}
     * @utbot.throwsException {@link org.utbot.engine.OverflowDetectionError} in: return x + 1000;
     */
    @Test
    @DisplayName("inc: return x + 1000 : True -> ThrowOverflowDetectionError")
    public void testInc_ThrowOverflowDetectionError()

The suggested implementation is:

     /**
     * @utbot.classUnderTest {@link A}
     * @utbot.methodUnderTest {@link A#inc(int)}
     * @utbot.errorDetected in: return x + 1000;
     */
    @Test
    @DisplayName("inc: return x + 1000 : True -> DetectOverflow")
    public void testInc_DetectOverflow()

Metadata

Metadata

Assignees

Labels

comp-summariesSomething related to the method names, code comments and display names generationctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions