I would like to generate a test log to a file, and I found this post on the Internet that shows how to enable MSTest logging, but it doesn't seem to work:
Here are the steps you must follow to enable MSTest logs.
Change to the MSTest installation directory through the administrator command line. (usually the installation directory is similar to C: \ Program Files \ Microsoft Visual Studio 11.0 \ Common7 \ IDE).
Open the mstest configuration file (MSTest.exe.config) and add a fragment similar to the one shown below in the node configuration. Make sure that the path you specify exists and that you have the appropriate permissions for it.
**
<system.diagnostics>
<trace autoflush="true" indentsize="4">
<listeners>
<add name="myListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="c:\temp\MSTest.log" />
</listeners>
</trace>
<switches>
<add name="EqtTraceLevel" value="4" />
</switches>
</system.diagnostics>
</configuration>
**
- Save the configuration file and try running the test.
After that, a log file on the specified path should be generated.
- ?