Questions tagged [nunit-console]

nunit-console.exe is the command line version of NUnit, provided so that you can run your unit tests from the command line.

nunit-console.exe is the command line version of NUnit, provided so that you can run your unit tests from the command line. This is the ideal solution when you need to run your unit tests on a build server or run code coverage with NCover. There's both an x64 and x86 version for running unit tests compiled against 32-bit and 64-bit modes.

In NUnit3, the executable was renamed nunit3-console.exe

272 questions
3
votes
1 answer

NUnit with Rhino Mocks exception: Why is it throwing this exception?

I'm getting an exception that really makes no sense to me whatsoever. I have an Expect call for a method that takes 3 arguments into it: The types are called CallContext, IDal, and List. NUnit throws me 2 exceptions: One for not expecting a method…
Corey Adler
  • 15,897
  • 18
  • 66
  • 80
3
votes
4 answers

Programmatically Gathering NUnit results

I am running some NUnit tests automatically when my nightly build completes. I have a console application which detects the new build, and then copies the built MSI's to a local folder, and deploys all of my components to a test server. After…
skb
  • 30,624
  • 33
  • 94
  • 146
3
votes
1 answer

nunit-console.exe hangs after finishing test run

We got a problem with NUnit 2.5.3: nunit-console.exe does not return after finishing all tests. The process hangs forever. Example: All tests succeed, but it keeps doing something. Output: Runtime Environment - OS Version: Microsoft Windows NT…
Igor Lankin
  • 1,416
  • 2
  • 14
  • 30
3
votes
1 answer

NUnit run failing in MSBuild after Upgrade - System.IO.FileLoadException: Could not load file or assembly nunit.framework

I recently upgraded my solution to Visual Studio 2013 and updated the references to NUnit 2.6.3 in the test libraries from 2.6.2. Everything works fine in Visual Studio but my MSBuild scripts that drive the deployment system are completely…
Keith Jackson
  • 3,078
  • 4
  • 38
  • 66
3
votes
2 answers

Running multiple unit test projects in Jenkins only records second set of results

I have searched for a while and can't find an answer on here for the first time ever. I have a solution which contains multiple C# projects. Two of these projects are unit test projects. I am building this solution with Jenkins, attempting to run…
Brendan
  • 4,327
  • 1
  • 23
  • 33
3
votes
2 answers

Having NUnit console report test results during the test run, after each test

I run NUnit console on my test assembly but sometimes my NUnit crashes (I'm currently figuring out why). When nunit crashes no xml report is created and I effectively am left without any test report. The test run is very long and it's a bad…
synepis
  • 1,292
  • 16
  • 28
3
votes
1 answer

NUnit.ConsoleRunner.Runner "System.Security.SecurityException: That assembly does not allow partially trusted callers"

nunit-console.exe throws the following error while i tried to execute from Mapped Network Drive Unhandled Exception: System.TypeInitializationException: The type initializer for 'NUnit.ConsoleRunner.Runner' threw an exception. --->…
Ravivarman
  • 61
  • 4
3
votes
1 answer

OpenCover - cannot find PDB

I am having some trouble getting OpenCover to work I have the following folder structure \Tools \Tools\Nunit \Tools\OpenCover \Buildartifacts When my code compiles, all the compiled code is generated into the BuildArtifacts folder. This includes…
Darren Guy
  • 1,123
  • 2
  • 13
  • 39
2
votes
1 answer

nUnit console fails to use proper configuration file under .NET Core

I have a C# test project compiling under .NET6, using System.Configuration.ConfigurationManager 7.0.0 (so I can use configuration files instead of JSON files, for legacy reasons). The code looks like this: [Test] public void TestConfiguration() { …
Ketchup201
  • 129
  • 1
  • 9
2
votes
1 answer

I am trying to run a test using NUnitEngine. But, it gives me FileNotFoundException: Could not load file or assembly. How to fix this?

I am reading a set of tests from an NUnit test dll file. I am reading it using System.Reflection. Then I am trying to run a test inside that dll using NUnitEngine. But, while doing "runner.Run", NUnitEngine throws the following exception…
Ayan
  • 115
  • 2
  • 10
2
votes
1 answer

ServiceStack License not found when using NUnit 3 through Console Runner in TeamCity

I am using a valid license key. But I keep getting this error: ServiceStack.LicenseException : The free-quota limit on '10 ServiceStack Operations' has been reached. Please see https://servicestack.net to upgrade to a commercial license or visit…
glazjoon
  • 518
  • 2
  • 6
  • 15
2
votes
2 answers

Which Packages do I need to refer to to create my own NUnit console runner?

I am trying to create my own NUnit console runner. Adding a reference to NUnit to my project does not let me access NUnit.Common, NUnit.Engine or NUnit.Options as used in the console runner…
jbcoe
  • 3,611
  • 1
  • 30
  • 45
2
votes
0 answers

Can't run Unit Test via command line

I've been searching a lot about running unit tests via cli in macos and i find a path to achieve this but i cant't run them all. I'm using Unity3D engine to create the solution and csproj and i need to find a way to run the tests via console. So…
2
votes
1 answer

Make NUnit have unique results .xml instead of TestResult.xml

I have a situation where more than one NUnit Console Runner might be triggered on the same VM. How do I uniquely name my TestResult.xml file? I do not see an option for this in the docs. So far, my solution has been to dynamically create the…
J_sdev
  • 341
  • 1
  • 13
2
votes
1 answer

How to build custom NUnit 3.x test runner with Engine extension in C#

I need to run a test N times where the number N is supplied through an external file. So N is not compile time constant. How can I achieve this? I have tried implementing ITestAction and IFrameworkDriver like the following. When run a test in debug…