I want to use mstest.exe to run my unit test on build server, but I don't want to install visual studio on the build server. Can I just install mstest without visual studio?
I think you probably can, but its definitely not supported.
I've found this blog article written by someone who claims to have MSTest working without Visual Studio installed.
@crocpulsar You need to install Visual Studio on your Build server, but you do NOT need to buy an additional licence.
There are just way too many dependancies to getting build & MSTest to work without VS installed and it is most definaly not supported.
As long as the person who starts the build has a licence you do not need one for the build server. This has been the case since the dark days of 2005 and as long as there is eddition parity then you are OK. If everyone in your team has Ultimate then you are free to install it on the build server, but if one of your team had Premium then you should idealy install premium on the Builkd server.
This also enables lost of other bits like Code Coverage, Test Impact Analysis, Architecture Validation among others.