Skip to content

Automated Testing Support Improvements #3912

@jeremydmiller

Description

@jeremydmiller

Based on some recent interactions on Discord and w/ JasperFx client work, here's a few ideas for improving integration testing w/ Marten:

  • Have a testing time option that runs ResetAllData() on IHost startup, but always before the async daemon starts up. Use an extension on IServiceCollection so that plays well with Alba or WebApplicationFactory overrides
  • Especially if not using Wolverine managed projection distribution, have a Marten equivalent to Wolverine's RunWolverineInSoloMode() to force the Marten async daemons to all run in Solo mode for faster spin up and better behaved testing behavior
  • Either an improved WaitForNonStaleProjectionDataAsync() or yet another testing utility that acts a bit more like Wolverine's TrackActivity() that records both the progress and any errors that happen during the processing of projections and/or subscriptions while trying to finish the test. The impetus for this was helping folks who where seeing WaitForNonStaleProjectionDataAsync() timeout because the projections were encountering errors, which don't necessarily get shown in some testing harness usages (looking at you xUnit hijacking the Console output). My vision here is something like Wolverine's message tracking that will blow up w/ a textual report of all exceptions that Wolverine encountered while testing so you can better understand what went wrong.

And of course, thinking about a grander vision where there's maybe a more unified JasperFx / Critter Stack way of centralizing the "I'm in Solo" mode configuration and also the generic tracking mode.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions