microsoft / testfx

MSTest framework and adapter
MIT License
714 stars 253 forks source link

TestResult missing ComputerName #675

Closed aukevin closed 1 year ago

aukevin commented 4 years ago

Description

The TestResult object that MsTestV2 produces does not have the ComputerName set anywhere. Could this field be added to the TestResult object?

Steps to reproduce

Run any test and view the resulting TestResult object. It should not have ComputerName set.

Expected behavior

The expectation was for this field to be set. It was set in previous versions of mstest.

Actual behavior

The field is null.

Environment

OS: Windows 10 Entierprise 10.0.18363 vstest.console: 16.4.0 mstest package version: 2.0.0

AB#1686844

aukevin commented 4 years ago

The TestResult generating code in this repo looks like it's here: https://github.com/microsoft/testfx/blob/6c1ee30a895fcef6e751f0f503192aeb0df99b5e/src/Adapter/MSTest.CoreAdapter/ObjectModel/UnitTestResult.cs#L157

Evangelink commented 1 year ago

Hey folks! Really sorry for the huge delay in handling this regression.

We will fix it in the next version of MSTest (v3).

@engyebrahim you can refer to the class/method mentioned by @aukevin. In this conversion method, you can set Environment.MachineName in the property.