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
0
votes
0 answers

Is there anyway to run only the tests that are under "Debug\AnyCPU" in NUnit3 Console?

I can run all of my test cases in a solution file ( in DEBUG mode) by using the following command: nunit3-console.exe "%SlnFile%" /config:Debug --skipnontestassemblies --result="%TestResult.xml%" But this command will run for all tests under…
Graviton
  • 81,782
  • 146
  • 424
  • 602
0
votes
1 answer

Use NUnit Console Runner to run all of the test projects under a VS solution

My VS Solution consists of production code and also test code, properly separated into different csprojects. It's always one to one correspondence between a production project and a test project. Is there anyway to run all the test projects under…
Graviton
  • 81,782
  • 146
  • 424
  • 602
0
votes
0 answers

Fail build at 80% pass rate NUnit-Console + Jenkins

Could you tell me how to run tests in NUnit-Console so that they don't fail the build in Jenkins. I want my build to fail at 80% pass rate. But under the current conditions, it fails if at least 1 test fails. Because the build returns an error code…
Richardok
  • 31
  • 5
0
votes
1 answer

How to set global timeout for project in NUnit

I want to set a global timeout for running a project in NUnit so that all tests in the project in total do not exceed for example 1 hour and sequential execution of tests is interrupted when this timeout is exceeded. That is, some part of the tests…
Max
  • 3
  • 1
0
votes
1 answer

Unit testing net5.0 ASP.Net projects with the NUnit console?

I've recently been trying to implement automated unit test within my Jenkins pipeline using the nunit3-console.exe, for multiple Test projects that implement Microsoft and Asp.Net related functionnalities within their set-up methods. The test…
Nougat
  • 37
  • 5
0
votes
0 answers

NUnit console runner - DLLs missing?

as the name implies, I've been having issues trying to run tests using the nunit3-console.exe command with some tests because it is apparently unable to load certain dlls: nunit3-console.exe C:\MyProject.csproj 1) SetUp Error :…
Nougat
  • 37
  • 5
0
votes
2 answers

NUnit Console Runner pass XSLT parameters

When using the Console Runner, I am using an XSLT transform to convert the NUnit XML output to a custom HTML report using transform with --result option. I need to access some environment variables within the XSLT file, and the only way I know of…
Ken
  • 72
  • 8
0
votes
1 answer

Error finding configuration file when using nunit3-console runner

I'm trying to execute my SpecFlow tests through nunit3-console runner but I'm receiving the following error: System.IO.FileNotFoundException : The configuration file 'appsettings.json' was not found and is not optional. The expected physical path…
eclipse06
  • 11
  • 2
0
votes
1 answer

Powershell NUnit console seems to hang after tests via Octopus/Powershell (Chrome driver still open)

I seem to have an issue when running a PowerShell script as a part of a step in our deployment Octopus pipeline. The tests run against a few websites, and each website has a range of tests. These are just locally setup websites on our…
minkz96
  • 21
  • 4
0
votes
1 answer

nunit-console tests produces different result from different locations

I have got nunit-console.exe in 2 locations on my machine. First is where I installed it (c:\program files (x86)\nunit 2.5.10) and second is where I have copied it into (d:\tests\nunit). I am required to work with the copied version. I am trying to…
Prasanna K Rao
  • 1,086
  • 2
  • 8
  • 18
0
votes
0 answers

Nunit-console fails to run tests depending on ASP.NET Core dependencies

I have an issue running nUnit Tests that depend on ASP.NET core framework. They run perfectly fine and green in VisualStudio 2019. I can also run them in command line using 'dotnet test'. However, whenever I run them using nunit-console I get the…
mikus
  • 3,042
  • 1
  • 30
  • 40
0
votes
1 answer

How to run two NUnit console runners in parallel for the same application?

how can I run the NUnit console.exe in parallel for the same application. Is it possible to do that?
ratty
  • 13,216
  • 29
  • 75
  • 108
0
votes
1 answer

Unable to run my SpecFlow features code through Console

I am beginner in SpecFlow. I am unable to run SpecFlow features through console file. My NUnit Versions: NUnit - 3.13.1 NUnit3TestAdapter - 3.17.0 NUnit.ConsoleRunner - 3.11.1 NUnit.Console -…
Kiran
  • 1
  • 2
0
votes
1 answer

Run only few tests from nunit selenium test suite via command line

I want to run 5 tests from a suite of 200 tests via commandline. The framework uses Selenium with nunit and is built on c#. After looking for solution online, /run was what I thought could fix my problem but it says invalid argument. Can someone…
Tanvi Vira
  • 13
  • 3
0
votes
1 answer

Generating nunit test result when a test fails

I am currently working with the nunit-console. I have a dll which have 8 tests. To run the test a bat file has been created with following command: nunit-console.exe Sample.dll Result.xml This runs all the tests & generates the result after…