nunit / nunit-console

NUnit Console runner and test engine
MIT License
217 stars 152 forks source link

.nunit file created by teamcity not supported #427

Closed jnothbauer closed 6 years ago

jnothbauer commented 6 years ago

Hi all, I am using Teamcity to run nunit tests and recently updated to NUnit.Console 3.8.0. NUnit-File (.nunit file inside, cannot upload directly): teamcity.zip Command line: nunit3-console.exe teamcity.nunit --result=teamcity.nunit.xml --noheader --framework=net-4.5 --agents=1 --process=Single will yield: 1) Invalid : D:\source\git\vgm\teamcity.nunit File type is not supported

The same file works with NUnit.Console 3.2.0. Please note that this behavior is independent of the actual test assemblies. Any ideas? Thanx, Nothi

CharliePoole commented 6 years ago

My guess is that your system in question does not have the nunit-project-loader extension installed.

jnothbauer commented 6 years ago

Thank you for your input, I double checked my nunit3 installation. Here is a picture of my packages folder (nunit is installed via nuget): packages_folder Moreover, I used the --wait parameter to survey the nunit3-console.exe with ProcessExplorer. I can see, that the extension dlls are actually loaded. Anything else I can try? Thanks, Nothi

rprouse commented 6 years ago

Adding a confirm label. TeamCity is very popular, so it is surprising that it has stopped working. The project file from the ZIP is;

<NUnitProject>
<Settings activeconfig="active" appbase="C:\tcwork\5eb9234d600d6dfc\bin\Release"/>
<Config name="active">
<assembly path="C:\tcwork\5eb9234d600d6dfc\bin\Release\TDWorx.Designer.Logic.IntegrationTest.dll"/>
<assembly path="C:\tcwork\5eb9234d600d6dfc\bin\Release\TDWorx.Designer.Transfer.Autodesk.Test.dll"/>
<assembly path="C:\tcwork\5eb9234d600d6dfc\bin\Release\TDWorx.Designer.Transfer.Ifc.Test.dll"/>
<assembly path="C:\tcwork\5eb9234d600d6dfc\bin\Release\TDWorx.Designer.ViewModel.IntegrationTest.dll"/>
<assembly path="C:\tcwork\5eb9234d600d6dfc\bin\Release\TDWorx.Designer.ViewModel.Test.dll"/>
</Config>
</NUnitProject>
ChrisMaddock commented 6 years ago

@jnothbauer - I guess you may be seeing this issue: https://github.com/nunit/nunit-console/issues/386

Could you check, and let us know?

CharliePoole commented 6 years ago

Simplest way to see what extensions are installed is to run nunit3-console --list-extensions which will show if any extensions are installed for each extension point. Of course, you have to use the same copy of the runner that is being used by teamcity if it's teamcity that's showing the problem.

jnothbauer commented 6 years ago

I just remoted into the build agent, and nunit3-console --list-extension yields: Runtime Environment OS Version: Microsoft Windows NT 10.0.17134.0 CLR Version: 4.0.30319.42000

Installed Extensions Extension Point: /NUnit/Engine/NUnitV2Driver Extension: NUnit.Engine.Drivers.NUnit2FrameworkDriver Extension Point: /NUnit/Engine/TypeExtensions/IService Extension Point: /NUnit/Engine/TypeExtensions/ITestEventListener Extension: NUnit.Engine.Listeners.TeamCityEventListener (Disabled) Extension Point: /NUnit/Engine/TypeExtensions/IDriverFactory Extension Point: /NUnit/Engine/TypeExtensions/IProjectLoader Extension: NUnit.Engine.Services.ProjectLoaders.NUnitProjectLoader FileExtension: .nunit Extension: NUnit.Engine.Services.ProjectLoaders.VisualStudioProjectLoader FileExtension: .sln .csproj .vbproj .vjsproj .vcproj .fsproj Extension Point: /NUnit/Engine/TypeExtensions/IResultWriter Extension: NUnit.Engine.Addins.NUnit2XmlResultWriter Format: nunit2

jnothbauer commented 6 years ago

@ChrisMaddock I can confirm, that as soon as I omit "--process=Single" the file will be parsed. SO it seems to be related to #386. Thanks for your help!

rprouse commented 6 years ago

@jnothbauer thanks for the confirmation. I am going to close as a duplicate.