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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/main/webapp/help.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@ <h2>General Usage</h2>

and then specify the path to the MSTest TRX file, <code>TestResults/testResults.trx</code> in the above example.
</p>
<p>
When using VSTest.Console.exe, you can't specify the path to the resulting TRX file. Thus, you can specify a pattern like <code>TestResults/*/*.trx</code> (/ or \, either will work).
<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.

</p>
<p>
If you use the vstestrunner-plugin, the full path to the TRX file is exposed by an environment variable. So, you can also use an environment variable,
Expand Down