vstest
vstest copied to clipboard
dotnet test --list-tests ignored --logger parameter
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
@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: 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.
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.
Is there any chance this will make it into 2.0?
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.
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