Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NUnit.Testlogger ignores LogFileName parameter #56

Open
gkalnytskyi opened this issue Oct 24, 2019 · 2 comments
Open

NUnit.Testlogger ignores LogFileName parameter #56

gkalnytskyi opened this issue Oct 24, 2019 · 2 comments

Comments

@gkalnytskyi
Copy link

gkalnytskyi commented Oct 24, 2019

There are two issues with the names of test result files:

  1. If not LogFileName parameter is specified as in --logger=nunit then default file name will be "TestResults.xml", while for html/trx loggers that will be "_.trx". I understand that this is NUnit console default behavior, but dotnet test is not an NUnit console, and, I believe it should follow dotnet test conventions
  2. If you specify LogFileName (e.g. --logger=nunit;LogFileName=nunit3.xml) this parameter is ignored by the log adapter and TestResults.xml file is produced instead.

Project Framework: .Net Core 2.1
NunitXml.TestLogger: 2.1.41

@codito
Copy link
Collaborator

codito commented Oct 25, 2019

For (1), can you clarify some more on the convention? Are you expecting a *.trx file output from this logger? Or is it the name of the file that should be different?

For (2) can you try --logger="nunit;LogFileName=nunit3.xml"? ; is sometimes interpreted by the command prompt.

@gkalnytskyi
Copy link
Author

Hello @codito,
(1) I'm not expecting the MSTest trx file. I expect the default name have the format <UserName>_<VMName>_<Date in yyyy-MM-dd>_<Time in hh_mm_ss>.xml.
(2) Here is almost exact command that I was running in CMD and Powershell

dotnet test <path to .net core 2.1 project file> --configuration Debug --settings .\BbswAutotestNunit.runsettings --results-directory .\test-results\ --logger:"nunit;LogFileName=nunit3.xml" --test-adapter-path:.

The result is the same for both CMD and Powershell file with name TestResults.xml gets created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants