user1590561
user1590561

Reputation: 613

MSTest EventListener

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

Upvotes: 2

Views: 852

Answers (1)

John Koerner
John Koerner

Reputation: 38087

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.

Upvotes: 0

Related Questions