mardi 9 avril 2019

Showing additional data on exceptions in tests

My tests project have some action running in cycle with different parameters. On some of them the exceptions thrown (whose types are different) and I like to watch not only exception, but parameters (passed by me and external info too).
Maybe there's something global that can be set on every iteration or something like Assert.Throws() (Assert.Nothrow()?) which will catch exception, add needed message and throw again?

P.S. I've tried to manually catch and rethrow exceptions with adding needed records to .Data, but Test Explorer not showing exception data, only type, message and stack trace.

Aucun commentaire:

Enregistrer un commentaire