nunit-console icon indicating copy to clipboard operation
nunit-console copied to clipboard

Overall result: Unknown

Open mogikanin opened this issue 5 years ago • 2 comments

Hello, the weird thing happens with latest 3.10.0 console runner. It returns "unknown" test result.

  Test Run Summary
  Overall result: Unknown
  Test Count: 0, Passed: 0, Failed: 0, Warnings: 0, Inconclusive: 0, Skipped: 0

Same thing happens on 3.9.0, 3.8.0. Only 3.7.0 works almost fine, except it returns a bunch of errors for projects without tests.

No suitable tests found in... Either assembly contains no tests or proper test driver has not been found.

For project files loading it uses NUnit.Extension.VSProjectLoader v.3.8.0

used command line:

nunit3-console.exe --noresult --labels=All --framework=net-4.5 --config=Debug --domain=Multiple  solution_file.sln

The first question, is there a way to disable No suitable tests found in in 3.7.0 runner? And the second, why happens result: Unknown in newer versions :smile: If needed, I can provide logs from runner. Thanks in advance!

mogikanin avatar Jan 15 '20 12:01 mogikanin

Regarding disabling No suitable tests found in then you can use --skipnontestassemblies (if it exsists in 3.7). See https://github.com/nunit/docs/wiki/Console-Command-Line for more information.

Regarding the status then it appears when the console cannot parse the result from the test results. Can you upload the test results (after removing the option --noresult). Also you can try --trace=Debug to get more information in the logs.

mikkelbu avatar Jan 15 '20 20:01 mikkelbu

@mikkelbu thanks, --skipnontestassemblies works fine in 3.7. But appeared new errors "Invalid\File Not found" for projects which uses choose-when conditions inside csproj file. I believe this is a reason of issue. All of these projects uses conditional assembly name like this:

 <Choose>
    <When Condition="$(Configuration.Contains('Conf1'))">
	   <PropertyGroup>
		<AssemblyName>assembly1</AssemblyName>
      </PropertyGroup>
    </When>
    <Otherwise>
	 <PropertyGroup>
		<AssemblyName>defaultName</AssemblyName>
      </PropertyGroup>
    </Otherwise>
  </Choose>

For 3.10.0 I've attached logs. nunit_output.zip

mogikanin avatar Jan 16 '20 05:01 mogikanin