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
1
vote
2 answers

How to run a single specflow scenario outline using nunit3 console tool

Using VS2015 the Test Explorer allows you to run a single scenario outline. Now I need to do the same using NUnit3 console tool (I'm using NUnit as Unit Test Provider). Currently I'm using the following command in order to run a test using console…
figuedmundo
  • 375
  • 1
  • 4
  • 15
1
vote
1 answer

Nunit System.BadImageFormatException

I'm having some trouble running my tests from command line. I have a separate project for the tests and usually using Rider where the tests run flawlessly. However, I want to run them in a CI environment and therefore need to be able to run them…
timedistance
  • 31
  • 1
  • 3
1
vote
1 answer

nunit with -test takes a loooong time to start - without works fine

I am using NUnit Console Runner 3.7.0 and similar nunit framework Whenever I am running the console without specifying which tests to run, it runs at once. As soon as I give it a few tests to runs it takes about 5 minutes to even start running. I've…
AngelicCore
  • 1,413
  • 3
  • 22
  • 40
1
vote
2 answers

Why do Selenium tests behave different on different machines?

I couldn't find much information on Google regarding this topic. Below, I have provided three results from the same Selenium tests. Why am I getting different results when running the tests from different places? INFO: So our architecture:…
J-Roel
  • 520
  • 1
  • 4
  • 21
1
vote
1 answer

How to specify to NUnit test runner to execute tests in 64 bits

I've a lot of UnitTests, which are all configure as AnyCPU. We would like them to run as x64 on the BUILD machine. The build machine is a Jenkins server that runs basically the NUNIT console runner: C:\nunit-console\nunit3-console.exe…
J4N
  • 19,480
  • 39
  • 187
  • 340
1
vote
1 answer

Determine if NUnit Tests are finished running in PowerShell

I can't seem to find a callback or a good way to determine if NUnit tests are finished running in a PowerShell script. I have come up with the solution below, but, it is not solid. Anyone have a better idea how how I would go about this? Or, maybe…
J-Roel
  • 520
  • 1
  • 4
  • 21
1
vote
1 answer

TeamCity: How to show Nunit3 file attachments in TeamCity test results?

NUnit3 recently added a functionality to add attachments to test results using TestContext.AddTestAttachment(). This adds a url\filelink of the file in results. I can see the entry in Test Result XML generated by console runner. But I do not see the…
H.D.
  • 455
  • 5
  • 19
1
vote
1 answer

List all tests with NUnit console runner

There was a console command for listing all tests in a Visual Studio project with NUnit console runner. Do somebody know it? I use version 3.6.1.
kame
  • 20,848
  • 33
  • 104
  • 159
1
vote
1 answer

Pass parameters from nunit3-console to TestFixture constructor, not to TestMethod

I have a problem with executing test from nunit3-console. I need to pass parameters to TestFixture constructor, but i want to call an specific Test. In my fixture i have two different constructors and one method without arguments. Now i call this…
1
vote
1 answer

How to make nunit-console find all assemblies in a non-default location

I'm working on a .NET solution with many test projects that uses a post-build step to move all the solution's outputs to a different folder which is the only location accessible for my testing. When running nunit-console I can specify the different…
Roy
  • 11
  • 2
1
vote
1 answer

How to run Nunit test in F# from console

I have a project written in F# 4.1 which uses Nunit 3.6.1. I use VisualStudio 2017 to build a projects and NUnit Console Runner 3.6.1 to run tests. But when i try to run my tests a receve an…
Maxim Kitsenko
  • 2,042
  • 1
  • 20
  • 43
1
vote
1 answer

Nunit3: how to save the test results while tests are running via Console Runner

NUnit3 Console runner saves test results in xml at the end of the test run. But in my case I want to save the partial results on each test failure, so that in case console runner crashes or is stopped, I can still get partial results for completed…
H.D.
  • 455
  • 5
  • 19
1
vote
1 answer

Nunit-console runner not running any tests

So I am trying to run a powershell script that is triggered by TeamCity to run specific unit tests based on the names of the files that were changed on each github commit. Here is how I am running it from the command…
Morgan G
  • 3,089
  • 4
  • 18
  • 26
1
vote
1 answer

Bamboo Nunit parser task incorrectly parses the results from nunit3-console.exe (25 tests were quarantined)

In Bamboo plan I have script-task, where script body is: @echo off SET nucpath=%1 SET projectvar=%2 SET xmlvar=%3 CALL SET xmlvar=%%xmlvar:-xml=--result%% SET outputvar=%4;format=nunit2 SHIFT SHIFT SHIFT SET remvar=%2 :loop SHIFT if [%1]==[] GOTO…
1
vote
1 answer

NUnit3 as part of buildstep in TeamCity throws "Process exited with code -2"

I am facing interesting issue. I've created TeamCity build step that runs unit tests using NUnit3 console (via command line). Build step settings: Command executable: SomeRootFolder\Packages\NUnit.ConsoleRunner.3.4.1\tools\nunit3-console.exe …
Kajiyama
  • 3,393
  • 8
  • 26
  • 38