Skip to content

Expected-output aspect tests with AspectTesting on xunit.v3, inside the solution's test run #220

Open

Description

@CaffeinatedCoder

Goal

Test the aspects against expected output a reviewer can read, with Metalama.Testing.AspectTesting, inside the solution's test run. Needs #173.

The #93 spike (spikes/AspectTestingSpike) found that AspectTesting 2026.1 works, but only as a separate VSTest command. It depended on xunit v2, and a VSTest project in CodoMetis.TypeKit.slnx makes dotnet test --solution refuse the whole run. Metalama 2027.0 moves Metalama.Testing.AspectTesting and Metalama.Testing.UnitTesting to xunit.v3, and renames TestContext to MetalamaTestContext (release notes, "Breaking changes").

To measure

  1. Does an AspectTesting project on 2027.0 run under Microsoft Testing Platform, beside the other projects, with dotnet test --solution and through tools/BuildVerdict?
  2. Does it test the real src/CodoMetis.TypeKit.Generators (internal aspects, applied by the TransitiveProjectFabric) through a project reference?
  3. Can its expected files and the README's generated-code blocks (GeneratedCodeBlockTests, Docs: show the generated code for the simple cases in the READMEs #92) share one source, or do they stay separate on purpose?

Done when

  • If it runs in the solution: expected-output tests for a plain value object, a validated one and a closed set, run by CI, each shown failing on a seeded change to an aspect (verify-the-guard).
  • If it doesn't: the spike README gets the 2027.0 answer, and the issue closes as not planned with the evidence.

Activity

  1. added this to the 2.5.0 milestone on Oct 31, 2026
  2. added
    testsAdds or changes tests only (tests, probes, harnesses); no library code
    package/generatorsAffects CodoMetis.TypeKit.Generators
    on Oct 31, 2026
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

    package/generatorsAffects CodoMetis.TypeKit.GeneratorstestsAdds or changes tests only (tests, probes, harnesses); no library code

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions