I am writing a small C# project that will count the coverage of all tests individually in a project with tests C#. To do this, I need to get a list of all the tests in the project in the FullyQualifiedName format, which can then be passed to the --filter parameter for the dotnet test command. What is the easiest way to do this?
I was hoping that the dotnet test -t(or --list-tests) command would help me, but it only outputs the names of the methods, without specifying which path they are on, and this information is not enough to run each test individually
I've seen a solution for the NUnit framework https://github.com/nunit/nunit3-vs-adapter/discussions/897, but I need it for MSTest and for Xunit
I found a solution for Xunit using this https://github.com/xunit/xunit/issues/542
It doesn't work for MSTest
There is also a problem that due to
Assembly.LoadFrom(dllPath), the assembly file is blocked