Skip to content

Incorrect analysis steps in the SARIF report for private functions #247

Description

@mmvpm

Description

When we generate a SARIF report for the class with a private function, there is no step (in the analysis steps) for this function from the test file.

To Reproduce

  1. Run test generation (using any plugin) for the class with private method. For example:
public class Example {
    private int invert(int x) {
        return 1 / x;
    }
}
  1. Open the SARIF report using VS Code and click to the "Analysis steps"

Expected behavior

There are two steps:
image

Actual behavior

There is only one step (only a line with an exception in our function)
image

Additional context

We are trying to find the line in the generated tests with something like <objectName>.<methodName>(<arguments>), but in the case of private functions we have <methodName>Method.invoke(<objectName>, <arguments>)

Metadata

Metadata

Assignees

Labels

ctg-bugIssue is a bug

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions