I am doing an encoded user interface test with a bat file, you can simply copy the .dll test CUIT file to your application and invoke it using the bat executable. Even you can use test agents to run code code tests from different computers where you do not have Visual Studio.
my bat file is as follows:
Run all test methods from a DLL:
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\mstest.exe" /testcontainer:"DLL_Location\CUIT_03.dll" /resultsfile:"ResultFile_Location\result.trx"
Run a single testing method from the DLL:
"C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\mstest.exe" /testcontainer:"DLL_Location\CUIT_03.dll" /test:"TestMethodName" /resultsfile:"ResultFile_Location\result.trx"
source share