Skip to content

Bug: folderconverter-tests-file-never-compiled-assertions-never-run #627

Description

@drmoisan
  • Work Mode: full-bug

Summary

UtilitiesCS.Test/OutlookExtensions/FolderConverter_Tests.cs exists on disk but has no
<Compile Include> entry in UtilitiesCS.Test/UtilitiesCS.Test.csproj. Because every project in
this repository is non-SDK packages.config style with no wildcard globbing, a source file without
an explicit include is simply not part of the compilation. The file's tests are therefore never
built and never run. The test project builds green, the suite reports a healthy pass count, and the
assertions in this file contribute nothing to it.

This is the silent-exclusion failure mode of explicit-include projects. There is no diagnostic: the
build does not warn, the test runner does not report the file as skipped, and a reader browsing the
repository sees what appears to be an active test file. The only way to notice is to check the
project file, or to observe that a /TestCaseFilter naming the class matches zero tests.

It was found exactly that way. During issue #614 work a filter alternation
FullyQualifiedName~FolderConverter_Tests was added to a verification step and matched zero tests.
Verified directly: grep -c "FolderConverter_Tests.cs" UtilitiesCS.Test/UtilitiesCS.Test.csproj
returns 0 while the file is present on disk.

The immediate risk is bounded. The assertions in the orphaned file are duplicated by a compiled and
currently green test, so no behavior is presently unverified because of it. The durable risk is not
bounded: any future edit to that file is a no-op that looks like work, any future assertion added to
it provides false assurance, and the same class of mistake silently disables any other test file
added without a project entry. A test file that cannot fail is worse than no test file, because it
is mistaken for coverage.

Recommended fix is to add the <Compile Include> entry, then run the class and fix whatever it
reports - the file has never been compiled against current production code, so it may not build or
pass without adjustment. If the duplication is judged redundant, delete the file outright rather
than leaving it in place uncompiled. Either resolution is acceptable; leaving it as-is is not.

Worth pairing with a guard: a check that every .cs file under a project directory appears in that
project's include list would catch this class of defect for both test and production code. The same
explicit-include fragility underlies issue #615, where <Analyzer Include> paths drifted from
packages.config.

Environment

  • OS/version: Windows 11 Pro 10.0.26200; .NET Framework 4.8.1; Visual Studio 18 Community MSBuild.
  • Python version: Not applicable; this is C# / MSBuild project configuration.
  • Command/flags used: grep -c "FolderConverter_Tests.cs" UtilitiesCS.Test/UtilitiesCS.Test.csproj
    and a vstest.console.exe run with /TestCaseFilter:"FullyQualifiedName~FolderConverter_Tests".
  • Data source or fixture: Repository source on the issue Bug: efc-store-root-selection-leaks-full-outlook-path-into-filing-boundary #614 branch.

Steps to Reproduce

  1. Confirm UtilitiesCS.Test/OutlookExtensions/FolderConverter_Tests.cs exists.
  2. Search UtilitiesCS.Test/UtilitiesCS.Test.csproj for FolderConverter_Tests.cs; it returns zero
    hits.
  3. Build the solution; it succeeds with no warning about the excluded file.
  4. Run vstest with /TestCaseFilter:"FullyQualifiedName~FolderConverter_Tests"; zero tests match.

Expected Behavior

Every .cs file under a project directory is either compiled by that project or absent from the
repository. A test file present in the tree runs in the suite, and a filter naming its class matches
at least one test.

Actual Behavior

The file is silently excluded from the compilation. It builds nothing, runs nothing, and reports
nothing, while appearing to be an active test file.

Logs / Screenshots

  • Attached minimal logs or screenshot
  • Snippet: grep -c "FolderConverter_Tests.cs" UtilitiesCS.Test/UtilitiesCS.Test.csproj returns 0;
    the file is present at UtilitiesCS.Test/OutlookExtensions/FolderConverter_Tests.cs.

Impact / Severity

  • Blocker
  • High
  • Medium
  • Low

No behavior is currently unverified, because a compiled test duplicates the assertions. Severity is
Medium rather than Low because the file is indistinguishable from working coverage and will absorb
future edits that silently do nothing.

Source

From: docs/features/potential/2026-08-26-folderconverter-tests-file-never-compiled-assertions-never-run.md

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

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions