JetBrains / TeamCity.VSTest.TestAdapter

Apache License 2.0
30 stars 14 forks source link

Output in not formatted in microsoft/dotnet containers #18

Closed DmitryShaburov closed 6 years ago

DmitryShaburov commented 6 years ago

Hello!

I'm trying to run tests in docker container, but do not get teamcity-formatted output from dotnet test command

Steps to reproduce:

docker run -it --rm microsoft/dotnet:2.0.7-sdk-2.1.200-jessie
# mkdir tests
# cd tests
# dotnet new MSTest
# dotnet add package TeamCity.VSTest.TestAdapter -v 1.0.8
# set TEAMCITY_VERSION=10
# set TEAMCITY_PROJECT_NAME=myproj
# dotnet test
Build started, please wait...
Build completed.

Test run for /tests/bin/Debug/netcoreapp2.0/tests.dll(.NETCoreApp,Version=v2.0)
Microsoft (R) Test Execution Command Line Tool Version 15.7.0
Copyright (c) Microsoft Corporation.  All rights reserved.

Starting test execution, please wait...

Total tests: 1. Passed: 1. Failed: 0. Skipped: 0.
Test Run Successful.
Test execution time: 2.2262 Seconds

Expected behaviour: dotnet test output is teamcity-formatted

Actual behaviour: dotnet test output is not teamcity-formatted

logankp commented 6 years ago

I'm having this same issue. Turning up the verbosity of dotnet test seemed to help:

dotnet test -v normal

dtretyakov commented 6 years ago

The cause of that is a breaking change in vstest start in some .NET CLI versions: https://github.com/Microsoft/vstest/issues/1580

NikolayPianikov commented 6 years ago

@dtretyakov Microsoft/vstest#1580 is about SDK 2.1.300-rc1-008673

NikolayPianikov commented 6 years ago

@logankp what dotnet --version do you use?

dtretyakov commented 6 years ago

The image microsoft/dotnet:2.0-sdk currently includes .NET SDK 2.1.200:

> dotnet --version
2.1.200
logankp commented 6 years ago

@NikolayPianikov I'm using version 2.1.300-preview2-008533 locally, 2.1.200 in the container. Both versions have the same issue. 2.1.100 works correctly.

NikolayPianikov commented 6 years ago

@dtretyakov you are right about SDK 2.1.200, so we will wait for Microsoft/vstest#1580

NikolayPianikov commented 6 years ago

Logger 1.0.9 uses normal verbosity level as default