Skip to content

Test count in start-run report is always 0 #441

@cyanite

Description

@cyanite

This is because the MasterTestRunner is never "loaded" (i.e. the Load method called) before the tests are run, which then makes CountTests return 0. Curiously, no code ever calls Load except some unit tests, which thus seem to test behavior not actually encountered when running the program.

There is also a bug in Load which makes it crash for aggregated test runs.

I don't know if there is a good reason to not always call Load. It seems to work fine for me on a large-ish .nunit test suite with 1 nunit3 test assembly and 50 nunit2.

I will create a pull request which "fixes" the bug in Load (makes it return null where it otherwise crash; no one uses the result anyway), and adds an option to nunit-console, --preload, to load the MasterTestRunner before running the tests. This fixes the bug.

Metadata

Metadata

Assignees

Labels

BugNeeds DesignV4All issues related to V4 or later - use -label:V4 to get V3 issues

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions