I'm using TeamCity Enterprise 9.1.5 (build 37377).
I have created a Build Configuration.
I have created an NUnit Build Step.
For NUnit Runner I selected NUnit 3
.
For Path to NUnit Console Runner I entered: packages\NUnit.ConsoleRunner.3.7.0\tools\nunit3-console.exe
In my Visual Studio solution I have installed the NUnit.Runner package.
When I run the Build Configuration I get the following error in the logs:
File type is not supported
How do I get my NUnit tests to run in TeamCity?
What worked for me:
I uninstalled NUnit.Runner and installed the following packages:
Why is the error being generated?
The ConsoleRunner can't handle .nunit files. That ability is part of NUnit.Extension.NUnitProjectLoader. The directory that extension is in will need to be listed as part of the .addins file. (I can't find the GitHub links where I found that information.)
How I troubleshooted:
TeamCity generated an .nunit file. I copied that file from the agent to my development machine to troubleshoot and run nunit3-console.exe myself. Once it ran on my development machine, TeamCity worked, too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With