I wanted to run my tests on each project build (CTRL-SHIft-B) I accomplished it using macros, here are the steps:
Make sure that you have a window where you can run the tests from visible , in my case I’m using Test Results because I had run a couple of test already but the same approach should work using Test View or Test List Editor)
- First we need to record a macro to lunch the Tests

the macro toolbar will appear
- while recording the macro, click on the desire option to run the test, for example in my case I’ll click on “Run All Tests in Tests Results”

- if you are using the Test List Editor for example you should click on “Run Checked Test”

- Stop recording the macro using the macro toolbar.
- Now open the Macros IDE

- Under “MyMacros” Select the recording module

- Cut the code generated under TemporaryMacro() and then from “MyMacros” select (double click) EnviromentEvents
- From the dropdowns select BuildEvents and then OnBuildProjConfigDone

- and then paste the code generated for the RecordingModule (the code should be in you clipboard from two steps above)
- save it and ready to go… when you build your project you should see the tests running by themselves….
796aaee4-ed5c-4d08-8cb4-d66928bcf9da|1|5.0