Skip to content

ITestResult.TotalCount does not seem to behave as specified #5126

Description

@maettu-this

For test process statistics/reporting I need to retrieve the number of executed tests. Using ITestResult.TotalCount does not return the result expected, due to the fact that same tests are [Explicit] and not executed during a "normal" test run.

ITestResult.TotalCount specifies:

Gets the number of test cases executed when running the test and all its children.

However, in my opinion, an [Explicit] test cannot be be considered "executed" during a "normal" test run. The Repro Sample demonstrates this:

Actual:

=> Issue5126.SetUpFixture
TotalCount = 2

Expected:

=> Issue5126.SetUpFixture
TotalCount = 1

Alternative approach:
Keep TotalCount as is but additionally provide ExecutedCount.

Issue5126.zip

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions