MSTest EventListener

833 views Asked by At

NUnit has special event listener to respond to events that occur in the course of a test run. Does MSTest have some similar functionality?

1

There are 1 answers

0
John Koerner On

MSTest has attributes you can use to get similar functionality:

One behavior that can catch people off guard is that the order in which these methods fire might not be what you expect. Because tests are run in a non deterministic order you may get multiple class initializes before you get a class cleanup, so you can't rely solely on the class cleanup to isolate test cases across classes. There is a good writeup of this behavior on Mark Seemann's blog.