Skip to content

NpathMetric's testability impeded by intertwining mvn process execution with output analysis #796

@ivanovmg

Description

@ivanovmg

It seems reasonable to refactor NpathMetric towards better testability.

The problem is that this class runs mvn process under the hood
and then analyzed the output produced.
Consider the option of splitting the running mvn part
from the actual analysis of the process output.

Then we can test thoroughly the part related to the analysis of the output file,
while the part related to running the process will be a part of a simple imperative shell.

@ivanovmg ideally, we should change the implementation of npath/main.py and remove the dependency on Maven. It should not be difficult to implement it in Python.

Originally posted by @yegor256 in #702

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood-titleThe title was checked by ChatGPThelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions