Skip to content

Add properties to capture a possible test output to add to the TestNode #3740

Closed

Description

Brad Wilson (@bradwilson) is not using the VSTestBridge where we capture the standard out/err using old properties from TestCase (PR #3486)

In the current TestNode properties list we don't have the counterpart for it https://github.com/microsoft/testfx/blob/main/src/Platform/Microsoft.Testing.Platform/Messages/TestNodeProperties.cs

The proposal TBD is to add

public record TextProperty(string Text)
public record TextErrorProperty(string Text)

that an adapter author can use to add text information associated with a test.

I would prefer to not have in the name StdOut/Err because these properties could be used also without the console StdOut/Err. An adapter could have a different mechanism to generate this information. Let's say the idea is to have textual information.

Otherwise we should go for specific

public record ConsoleStandardOutputProperty(string Text)
public record ConsoleStandardErrorProperty(string Text)

cc: Amaury Levé (@Evangelink) Jakub Jareš (@nohwnd)

Activity

  1. added
    area/mtp
    on Sep 1, 2024
  2. MarcoRossignoli commented on Sep 2, 2024

    @MarcoRossignoli
    ContributorAuthor

    I did some check on how xunit and other adapters uses VS test box and for now I'll go with

    public record StandardOutputProperty(string Text)
    public record StandardErrorProperty(string Text)

    Despite what's xunit is sending thought ITestOutputHelper is not the StdOut(Console.Writeline api is captured) in VS we don't have at the moment space for "generic informational text" so xunit will continue to send that write to the ConsoleStandardOutputProperty.

    cc: Brad Wilson (@bradwilson)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/mtpstate/in-pr

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions