Skip to content

Ambigous test points should not be ignored #113

@gruenedd

Description

@gruenedd

Hi,

If more than one test points matches, i would expect that the result is added to each matching test point.
But currently just the warning a raised and nothing happens.
Background is that i have multiple test suites within the test plan and some of them share test cases.

I think this could be changed here in TestResultProcessor.ts

  } else {
    const testCaseNames = matchingPoints.map(item => JSON.stringify(item)).join("\n");
    this.logger.warn(`Multiple matches were found for test case: ${frameworkResult.name}. Matches:\n${testCaseNames}`);
    this.logger.info("To prevent this warning, adjust the duplicates or the testCaseMatchStrategy to be more specific.");

    // ------------------------------------------------------------------------------
    matchingPoints.forEach(p => {
      result.matches.set(p.id, frameworkResult);
    });
    var matchingPointIds = matchingPoints.map(p => p.id);
    testPoints = testPoints.filter(i => matchingPointIds.indexOf(i.id) === -1);
    // ------------------------------------------------------------------------------
  }

Would it be possible to add this?
Or maybe i miss something here and this change isn't even required(?)

Cheers

Metadata

Metadata

Assignees

No one assigned

    Labels

    wontfixThis will not be worked on

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions