title: How do I programatically determine how many unit tests have been executed?
body: <p>I have a CodedUI test suite that runs as MSTest Unit tests.  I have a method in the AssemblyCleanup that will email the results of the test run that is stored in an external database.  How can a programmatically determine how many unit tests were executed during the last run session?  I don't want to send the email if we are executing less than 10 tests.  This way we only get emails when we run our whole CodedUI suite and not when we are debugging tests.  We currently have a SendEmail flag that has to be manually set but I would like this to be programmatically determined.</p>