Skip to content

Instantly share code, notes, and snippets.

@joelbyler
Created November 8, 2012 23:30
Show Gist options
  • Save joelbyler/4042597 to your computer and use it in GitHub Desktop.
Save joelbyler/4042597 to your computer and use it in GitHub Desktop.
Automatically run tests in visual studio using MSTEST and Post Build Event
//Put this in your project properties Compile tab under Build Events...
//From Project to Build Test Project (replace 'Project Tests' with your actual test project name)
CD "$(SolutionDir)\Project Tests\$(OutDir)\"
"$(DevEnvDir)MSTEST.exe" /testcontainer:"Project Tests.dll"
//When test project is built
CD "$(TargetDir)"
"$(DevEnvDir)MSTEST.exe" /testcontainer:"$(TargetFileName)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment