Skip to content

Inconsistent diagnostic option names for command line and environment variable #7159

@Bertk

Description

@Bertk

Describe the bug

Diagnostic option name was renamed from --diagnostic-output-fileprefix to --diagnostic-file-prefix (#6165) but the environment variable name is still TESTINGPLATFORM_DIAGNOSTIC_OUTPUT_FILEPREFIX.

https://github.com/dotnet/docs/blob/fde0a56ed2df06307faec6bfa9fba7ea7e687f02/docs/core/testing/microsoft-testing-platform-migration-from-v1-to-v2.md?plain=1#L70

This problem also exists for --diagnostic-synchronous-write option (former --diagnostic-filelogger-synchronouswrite).

The documentation is still using the old option name:
https://github.com/dotnet/docs/blob/main/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md

Steps To Reproduce

Check code for diagnostic extension and documentation:

public const string DiagnosticOutputFilePrefixOptionKey = "diagnostic-file-prefix";

public const string TESTINGPLATFORM_DIAGNOSTIC_OUTPUT_FILEPREFIX = nameof(TESTINGPLATFORM_DIAGNOSTIC_OUTPUT_FILEPREFIX);

https://github.com/dotnet/docs/blob/fde0a56ed2df06307faec6bfa9fba7ea7e687f02/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md?plain=1#L21

https://github.com/dotnet/docs/blob/fde0a56ed2df06307faec6bfa9fba7ea7e687f02/docs/core/testing/microsoft-testing-platform-extensions-diagnostics.md?plain=1#L31

Expected behavior

documentation and environment variable name use identical name e.g. environment name: TESTINGPLATFORM_DIAGNOSTIC_FILE_PREFIX

Actual behavior

names are mixed up in documentation and implementation

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: MTPBelongs to the Microsoft.Testing.Platform core libraryBreaking ‼️

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions