vstest icon indicating copy to clipboard operation
vstest copied to clipboard

dotnet test --list-tests ignored --logger parameter

Open livarcocc opened this issue 8 years ago • 5 comments

From @kmcgain on April 9, 2017 23:19

This may be a missing feature rather than an issue.

Steps to reproduce

dotnet new xunit dotnet restore dotnet build dotnet test --list-tests --logger trx

Expected behavior

A TestResults folder created with a single trx file that includes test definitions

Actual behavior

The parameter is ignored and the list is displayed in the program output

If trx file is not appropriate for listing the tests then an alternative output should be supported as the regular output is not easily parsable.

Copied from original issue: dotnet/cli#6280

livarcocc avatar Apr 10 '17 04:04 livarcocc

@kmcgain: We don't update trx file with tests for list tests. Can you please help us to identify the use of trx with list tests. It will be very helpful if you will tell us about the use of trx with list test.

/cc:@pranavkm @codito

Faizan2304 avatar Apr 12 '17 13:04 Faizan2304

@Faizan2304: I want to push a test assembly into docker container, discover all tests and then launch n containers with individual instructions to filter the test run for their specific set of tests.

It seems the simplest way to discover the tests would be with dotnet test. By having an easily parsable output it would make this job cleaner. Currently I need to either switch to reflection to discover tests myself or parse normal output of dotnet test - - list with a regex - not the end of the world, just another step that everyone will have to do themselves.

I don't specifically care about trx as I'm not trying to drive an existing test harness with It.

kmcgain avatar Apr 12 '17 22:04 kmcgain

It may help if logger interfaces support events to handle Discovered Tests (currently they only support Run Result events). This will allow to generate any kind of output with a custom logger and script it easily.

The default console output is customized by adapters. Today user may see different outputs for mstest and xunit tests.

codito avatar Apr 16 '17 14:04 codito

Is there any chance this will make it into 2.0?

yaakov-h avatar May 13 '17 11:05 yaakov-h

dotnet test --list-tests | grep "    " | perl -pe 's/    //g and s/\([a-zA-Z.]+\)//g' | sort -u

Can serve as a (sub-optimal) workaround for anyone else stumbling on this.

megla-tlanghorst avatar Nov 02 '22 10:11 megla-tlanghorst

This is a new feature and won't be implemented, we are focusing on adding new features to Testing.Platform instead. https://aka.ms/testingplatform

nohwnd avatar Jul 09 '24 08:07 nohwnd