Skip to content

fix: AOT tests silently skip on local machines #4877

@thomhurst

Description

@thomhurst

Description

File: TUnit.Engine.Tests/InvokableTestBase.cs (Lines 82-85)

if (Environment.GetEnvironmentVariable("GITHUB_ACTIONS") != "true")
{
    return;  // Silently skips!
}

AOT tests silently return without any indication when not running in GitHub Actions. Developers might think they've tested everything when they haven't.

Suggested Fix

  • Use [Skip("AOT testing only available in CI")] or equivalent instead of silent return
  • Log a warning when AOT mode is skipped
  • Document in CLAUDE.md how to manually run AOT tests locally
  • Add a marker in test output showing which modes actually executed

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions