spekt / junit.testlogger

JUnit test logger for vstest platform (<= v3.x)
MIT License
77 stars 15 forks source link

Run tests from VS TestExplorer #55

Closed maximusmp closed 1 year ago

maximusmp commented 2 years ago

Hello!

I'm using your library via a .runsettings file in VS 2022 to specify the Logger. If I run the Unit Tests by using command "dotnet vstest" and specifying the settings file everything runs perfectly, but if I use TestExplorer to run the same tests (after setting the same runsettings file from menu "Test->Configure Run Settings") I have some problems with the report, e.g.: the timestamp is always "0001-01-01T00:00:00"; the {assembly} attribute for the log file name does not work; etc.

Thank You

maximusmp commented 2 years ago

Just adding a note: the same issue also happens if I specify the "Tests" parameter from the command line.

Examples: "dotnet vstest .\UnitTestProject1.dll /Settings:test.runsettings" works "dotnet vstest .\UnitTestProject1.dll /Tests:TestMethod2 /Settings:test.runsettings" does not work.

codito commented 2 years ago

@maximusmp thank your for reporting this! What is the test framework (mstest/xunit etc.) used for UnitTestProject1.dll?

@Siphonophora IIRC the /tests argument might be invoking a different execution path for the unit tests, this is adapter specific. It may be a good idea to repro this in testlogger first.

maximusmp commented 2 years ago

Hi,

the test framework for the project is MSTest, but I tried with a test which uses xUnit and the result was the same.

Siphonophora commented 2 years ago

Did a quick repo on one of my own projects to start. I was able to repo these using both the test.runsettings and command line.

@maximusmp Are there any other issues you are seeing? Nothing else jumps out at me from testing so far.

Siphonophora commented 1 year ago

Closing as inactive