Created
April 3, 2013 13:03
-
-
Save hjerpbakk/5301029 to your computer and use it in GitHub Desktop.
Shows a message box containing the duration of all tests in an MSTest test class.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Stopwatch testTimer; | |
[ClassInitialize] | |
public static void ClassInit(TestContext testContext) | |
{ | |
testTimer = new Stopwatch(); | |
testTimer.Start(); | |
} | |
[ClassCleanup] | |
public static void ClassCleanup() | |
{ | |
testTimer.Stop(); | |
MessageBox.Show(string.Format("Test duration {0} milliseconds.", testTimer.ElapsedMilliseconds)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment