Skip to content

QoL suggestion: fail fast in Assert.Multiple under debugger #4738

@MaceWindu

Description

@MaceWindu

While Assert.Multiple is nice for failure reporting on test runs, it is quite bad when you try to debug test compared to regular assert.

  • with simple assert you get exception on assertion failure and could debug it
  • with Assert.Multiple you get exception at the end where you probably lost all related test context already and need to put manual breakpoints inside of delegate to be able to debug first failure (or comment Assert.Multiple wrap)

I propose to throw assert exception on first failure if process is under debug (Debugger.IsAttached == true) with some kind of switch for backward compatibility. E.g. for those who use tests with debbugger for any reason or just enjoy having troubles during debugging.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions