Skip to content

Console logger always enabled, even if another logger is specified #1046

Closed

Description

Assume you have a logger called SimpleLogger that implements ITestLogger, that writes its output to the console. When invoking vstest.console.exe using this logger (via /TestAdapterPath:"C:\Path\To\Logger\Directory\Simple.TestLogger.dll" / Logger:SimpleLogger), the logger's output is interspersed with the output of VSTest's default console logger.

Since there is no way to suppress the default console logger, this essentially makes it impossible to use a different logger that does write to console.

Fix

Recommendations

  • Standardise VSTest's Logger command-line argument with MSBuild's, so that instead of having to specify a logger with /TestAdapterPath:"C:\Path\To\Logger\Directory\Simple.TestLogger.dll" / Logger:SimpleLogger, one can use the far simpler syntax of /Logger:SimpleLogger,"C:\Path\To\Logger\Directory\Simple.TestLogger.dll". The former syntax is an abuse of the TestAdapterPath (since a logger isn't an adapter).

Environment

  • Windows 10 Enterprise x64
  • Visual Studio 2017 Enterprise version 15.3.3
  • Microsoft (R) Test Execution Command Line Tool Version 15.3.0-preview-20170628-02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions