Skip to content

unittest "test run" reports wrong test case count #494

Description

Steps to reproduce

Write a unittest function with one test case data input

[DataTestMethod]
[DataRow(1)]
public void YouTest(int value)
{...}

When you run the test using

dotnet test

the output will be:
...
Starting test execution, please wait...
Total tests: 2. Passed: 2. Failed: 0. Skipped: 0. Test Run Successful.

Expected behavior

Actually it's only one test here, [DataTestMethod] is not a test.

Actual behavior

2 tests passed

Environment

MSTest 1.3.2

Note- This happened after we added support for hierarchical results #417
Fix - It would perhaps be best to say both in the CLI output - x tests and x+n test results.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions