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
2
votes
1 answer

NUnit 3 Extension to Fail Test on a Failed Debug.Assert

I'm trying to write a NUnit 3 (3.8.1) extension that lets a test fail if it has a failed Debug.Assert(...) (instead of silently run through or even hang because it shows the failed assertion dialog). In a NUnit 2 addin, I was able to so by…
Dejan
  • 9,150
  • 8
  • 69
  • 117
2
votes
4 answers

TeamCity Build Fails Because NUnit is Locking Files?

We have been having an issue with our project's Continuous Integration. Occasionally, we want to try to clean all of the files on build within TeamCity in its checkout directory. Whenever we try to do this, nunit-agent.exe ends up remaining open…
Doctor Blue
  • 3,769
  • 6
  • 40
  • 63
2
votes
1 answer

Nunitlite-runner.exe - Dll file has no TestFixtures

I'm trying run tests from nunitlite-runner.exe but i got Error message 1) Invalid : /myfile.dll Has no TestFixtures I have in source code [TestFixture] public class MyClassName { [Order(1)] [Test] public void Case1() { // …
qchar90
  • 404
  • 1
  • 5
  • 11
2
votes
2 answers

Parameterized test using nunit3-console.exe with TestCase attribute

I am trying to run nunit3 parameterized test using TestCase attribute. My Test method looks like: [Test] [TestCase("testuser")] public void OBA_Test(String name) { …
ProgSky
  • 2,530
  • 8
  • 39
  • 65
2
votes
1 answer

Difference between agents and worker threads

I'm working on running NUnit console runners using Jenkins. These tests connect to a Selenium Grid (which is also run by Jenkins), so I want to limit their level of parallelism in order to avoid getting agents starving while waiting for a free node…
towel
  • 2,094
  • 1
  • 20
  • 30
2
votes
1 answer

Run all tests in nunit3-console with unset category

I am trying to run nunit3-console tests with where filter that returns true when category is not set. How do I set 'no category specified'? I have tried various forms with no luck. nunit3-console MyTests.dll --where "cat == ''" Thanks
Jan Hyka
  • 47
  • 5
2
votes
2 answers

Why Nunit3 OneTimeSetUp() is called after [Test] and not before

I have my unit tests written in Nunit 2.6 but planning to upgrade to Nunit 3.6.1 , however I noticed a weird problem with Nunit 3.6.1 (or may be I did not understood it correctly). The problem is around OneTimeSetUp(). In Nunit 2.6.3, I had…
user85
  • 1,526
  • 5
  • 26
  • 42
2
votes
1 answer

NUnit-Console finds no test fixtures for an NUnitForms test with NUnit 3.x

I've been messing around with NUnitForms and I've run into a snag with my simple test. I'll provide more information below but to summarize the question briefly, I'm in a state that I need to inherit from the NUnitFormTest class to use the…
Fizz
  • 3,427
  • 4
  • 27
  • 43
2
votes
1 answer

Using Profiler on mono to gather code coverage information does not include the assemblies of the tested dll

Currently I am working on a Xamarin Project using Xamarin Studio on Mac. I have created a NUnit test project to test the core PCL 4.5 library. On command line: mono --debug --profile=log:report,coverage nunit3-console.exe…
Stam
  • 2,410
  • 6
  • 32
  • 58
2
votes
2 answers

How to use "--where" parameter in NUnit 3 console?

NUnit 3 has "--where" parameter in console that allows us to select different tests to run. It can include different namespaces or test categories. I want (but don't know how) to include some namespaces to run tests. I have specific examples and I…
Denis Koreyba
  • 3,144
  • 1
  • 31
  • 49
2
votes
1 answer

NUnit Multiple TestFixture with different Category attribute

I have a test class with multiple TestFixture and I want to provide different category per testfixture like: [TestFixture("WebsiteA"), Category("A")] [TestFixture("WebsiteB"), Category("B")] public class LoginTests { public LoginTests(string…
Megha
  • 509
  • 5
  • 16
2
votes
1 answer

nunit3-console.exe gives Access Denied error on running on a win 10 64 bit machine

I installed Nunit3 on my new windows 10 64 bit machine. When I try to run the nunit3-console.exe it gives me an error. Access is denied. I have administration rights on this machine. I even tried running the Nunit exe as administrator, but still no…
Vijay Nag
  • 257
  • 2
  • 9
  • 21
2
votes
1 answer

How to run individual tests in NUnit ConsoleRunner 3.4.1 with `--test=NAMES` argument

How can I execute just a single test case through the NUnit ConsoleRunner using the --test=NAMES argument. If I right click on a test case in Visual Studio and 'Copy' this is the information regarding the test. Test Name: …
Buster
  • 685
  • 1
  • 5
  • 28
2
votes
1 answer

NUnit runner failure, when running tests in NUnit.ConsoleRunner.3.2.1

So here is the error that is plaguing my test suite. [07:34:36][Step 4/4] Exception has been thrown by the target of an invocation. [07:34:36][Step 4/4] [07:34:36][Step 4/4] Server stack trace: [07:34:36][Step 4/4] at…
Buster
  • 685
  • 1
  • 5
  • 28
2
votes
2 answers

Running NUnit 3 from Powershell

I have a PS script which I've been successfully using to run and process results from NUnit 2.6.3. I've recently upgraded to NUnit 3.2.1 and am having problems with passing arguments to the NUnit executable. The script is called from Octopus deploy…
johng14
  • 21
  • 1
  • 3