question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Allow multiple loggers to be provided via runsettings

See original GitHub issue

Is it possible to specify html logger and other loggers via runsettings file?


How to use this html logger with runsettings file? I tried via cli and it works, but no luck through the config file.

<LoggerRunSettings> <Loggers> <Logger friendlyName="html"> <Configuration> <LogFileName>test.html</LogFileName> </Configuration> </Logger> </Loggers> </LoggerRunSettings>

_Originally posted by @dracos1993 in https://github.com/microsoft/vstest/pull/2103#issuecomment-536173035_

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
nohwndcommented, May 4, 2020

@dracos1993

This is what you’d do from settings, I actually just copied it from the log and removed unneeded lines:

dotnet test --% --logger trx;LogFileName=foo.trx --logger html;LogFileName=foo.html --diag c:\temp\log.txt
<RunSettings>
  <RunConfiguration>
  </RunConfiguration>
  <LoggerRunSettings>
    <Loggers>
      <Logger friendlyName="trx" enabled="True">
        <Configuration>
          <LogFileName>foo.trx</LogFileName>
        </Configuration>
      </Logger>
      <Logger friendlyName="html" enabled="True">
        <Configuration>
          <LogFileName>foo.html</LogFileName>
        </Configuration>
      </Logger>
    </Loggers>
  </LoggerRunSettings>
</RunSettings>

Read more comments on GitHub >

github_iconTop Results From Across the Web

0016 Loggers information from RunSettings
Multiple Loggers can be added in runsettings by adding Logger node in LoggerRunSettings.Loggers section. Configuration is optional in Logger ...
Read more >
Configure unit tests by using a .runsettings file
You can create more than one .runsettings file in your solution and select one as the active test settings file as needed.
Read more >
In TFS, how can you perform a Test Run with a Custom ...
I want to run my automated tests in TFS using a Custom Logger. Normally you would do this by adding something like /Logger:MyCustomLogger...
Read more >
VSTest.Console.exe command-line options - Visual Studio ...
Specify the parameter multiple times to enable multiple loggers. Example: To log results into a Visual Studio Test Results File (TRX), use
Read more >
Tools > Options > Test > Auto-detect runsettings file
The Auto-detect runsettings file setting at Tools > Options > Test cannot be changed. While the checkbox can be clicked and changed, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found