Skip to content

Mocha Test id depends on the file path #1561

@fforjan

Description

@fforjan

When running javascript unit test via Mocha on a TFS build, TFS is not able to detect that the test was failing in a previous build and tag as failing in the current build

Expected Behavior

same test failing in consecutive build should be detected as failing in the first build.

Actual Behavior

same test failing in consecutive build is not detected as failed in the first build

Steps to Reproduce

My assumption about this issue is about the test having some file path in its ID. the file path depends on the workspace location and is different between build agents:
Build A :
image

Build A + 1
image

Which seems to be related to the fully qualified name : https://github.com/Microsoft/nodejstools/blob/master/Nodejs/Product/TestAdapter/TestFrameworks/NodejsTestInfo.cs#L42

On regular C# unit tests, you can see the ID seems to not only include the file name but the class name which should be the unique ID
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions