Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VSTest.Console example specifying result file #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SQLEmil
Copy link

@SQLEmil SQLEmil commented Jul 6, 2018

Adds syntax example for VSTestConsole where the TRX output file name is specified and note about using relative paths.

Adds syntax example for VSTestConsole where the TRX output file name is specified and note about using relative paths.
<p>When using VSTest.Console.exe, you can specify the path to the resulting TRX file by using <code>/Logger:trx;LogFileName="testResults.trx"</code>. Example:
<ul><code> "%PROGRAMFILES(X86)%\Microsoft Visual Studio\2017\Professional\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" MyTestProject\bin\Release\MyTestProject.dll /Logger:trx;LogFileName="testResults.trx"
</code></ul>
and then specify the path to the MSTest TRX file, <code>TestResults/testResults.trx</code> in the above example. (The directory is assumed to be <code>TestResults</code> in the path of execution. You can use relative paths to write to the current directory (i.e., <code>..\testResults.trx</code>), but the TestResults folder will still be created.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can use /logger:trx;LogFileName="TestResults.trx" /ResultsDirectory:"." to prevent it from creating the TestResults folder. See VSTest.Console.exe command-line options.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants