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?
It is possible to run mstest.exe without visual studio.
Download one of the Agents for Visual Studio ISO's below and install the Test Agent on the server:
Visual Studio 2017 (127MB disk space, less than that for download)
Visual Studio 2015 (128MB setup, 2GB disk space required)
Visual Studio 2012 (224MB)
Visual Studio 2013 (287MB)
Visual Studio 2010 (515MB)
This installs everything needed for running mstest.exe from the command line and is much lighter weight than visual studio. ~500mb download and around ~300mb to install just the test agent if I remember correctly.
UPDATE
For versions older than VS 2017, look here: