This tool enables diagnostic log collection for various unit test framework components.
NOTE: vstest.diag modifies configuration files (*.exe.config) of several binaries in VS install directory, please remember to run vstest.diag /disableLogs
after log collection is complete.
Get the latest release from here. Unzip it to c:\tmp\vstest.diag
.
$ # open VS Developer Command Prompt
$ cd c:\tmp\vstest.diag
$ vstest.diag /enableLogs
$ # run your tests
$ # for example, vstest.console.exe mytests.dll /settings:my.runsettings /logger:trx
$ vstest.diag /disableLogs
$ # analyze/share the logs for diagnosis
/EnableLogs Enables various diagnostic logs for unit test framework.
Post this you can execute the test platform scenarios, the details will be captured by the logs.
Run this tool again with /DisableLogs to stop collecting the verbose logs.
Leaving logs enabled will cause slow performance.
/DisableLogs Disables the logs if enabled earlier.
Copy following logs from %temp% and share them for diagnosis:
- DiagnosticsLog.txt (The log for this tool)
- WCFEtwTrace.etl (WCF log)
- *.TpTrace.log
Apache License v2.0.
Clone the project, run nuget restore
, patch and send a pull request!
We (VS Unit Testing team at Microsoft) developed this tool as a side project. It collates the numerous diagnostics switches for test platform from various MSDN blog posts into a single tool.
Hope it helps! <3