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

Async test hangs in Nunit 2.6.2

I have this simple test method below. [Test] public async Task OneSimpleTest1() { var eightBall = new EightBall(); var answer = await eightBall.WillIWin(); Assert.That(answer, Is.True); …
govin
  • 6,445
  • 5
  • 43
  • 56
2
votes
1 answer

Running nunit-tests from the command line

I get the following output when trying to run nunit-console Testsuite.sln NUnit version 2.4.8 Copyright (C) 2002-2007 Charlie Poole. Copyright (C) 2002-2004 James W. Newkirk, Michael C. Two, Alexei A. Vorontsov. Copyright (C) 2000-2002 Philip…
David Müller
  • 5,291
  • 2
  • 29
  • 33
1
vote
1 answer

How do you clean up NUnit processes with Psake?

I have a Psake script that works great locally. It runs great; however, Nunit spins up nunit-agent.exe processes and will not dispose of them. This isn't an issue locally since I am not pulling down fresh copies of my repository (which contains…
JamesEggers
  • 12,885
  • 14
  • 59
  • 86
1
vote
1 answer

Can NUnit TImeoutAttribute override NUnit Console Runner timeout?

I currently use NUnit Console to run my NUnit 3 tests. I pass a Timeout command-line option to NUnit Console Runner. This timeout is about 30 minutes, but I have one test that takes longer than 30 minutes, so I put a TimeoutAttribute on that one…
Ken
  • 72
  • 8
1
vote
1 answer

NUnit.ConsoleRunner throwing System.ArgumentException : The net-4.5.2 framework is not available error

Azure DevOps pipeline failing after updating NUnit.ConsoleRunner nuget package to to 3.15 version. Command use to run the nunit test: exec /Library/Frameworks/Mono.framework/Versions/Current/bin/mono --debug…
Suchith
  • 1,276
  • 17
  • 39
1
vote
3 answers

Is it possible for run NUnit against a specific (long) list of tests

I have a list of several thousand NUnit tests that I want to run (generated automatically by another tool). (This is a subset of all of the tests, and changes frequently) I'd like to be able to run these via NUnit-Console.exe. Unfortunately the /run…
AndyM
  • 3,574
  • 6
  • 39
  • 45
1
vote
0 answers

Bamboo build is hanging for 20 minutes

Running Integration tests from AWS Bamboo using NUnit console runner is hanging for 20 minutes and eventually fails the build with the error message Force Stop build feature is enabled for current plan. Either Bamboo has detected the build has hung…
1
vote
0 answers

How to fix unordered scenario & steps execution in Nunit 3 logs and make them ordered

E.g. I have four scenarios in two different features files as below. Feature 1: Scenario 1 : Validate title Given I am logged in application And I verify the title Scenario 2: Verify book checkout Given I am logged in application …
1
vote
1 answer

nunit where condition for categoriy not being set

I have a bunch of testcases within my test-class: [TestFixture] class MyTestClass { [Test] public void Test1() { ... } [Test(Category = "MyCategory")] public void Test2() { ... } } What I want to achieve now is to run only the…
MakePeaceGreatAgain
  • 35,491
  • 6
  • 60
  • 111
1
vote
1 answer

Running unit tests in multiple assemblies using nunit-console

I would like to run the fast tests in all the test assemblies in one go, to get a convenient unified output. My current batch file looks like this, it runs the tests: but many of the tests fail (they pass when the assemblies are specified…
Ben Aston
  • 53,718
  • 65
  • 205
  • 331
1
vote
1 answer

Use NUnit Prefilter by nunit3-console

I'm developing data driven tests using Nunit3 and .Net Core 3.1 and I have many tests with more different data sources, which sometimes have complex logic inside. When I want start only one tests I want to start only one data provider, but I run…
1
vote
1 answer

How to use exclude a category attribute in Nunit command line Execution

I Want to exclude only 1 test case parameter from the below during comman line execution nunit3-console.exe Excel.Test.dll --where="cat!=IgnoreForNow" but this excludes all the parameters(A, B, C, D) [TestCase("A"), Category("IgnoreForNow")] …
VSanka
  • 85
  • 2
  • 9
1
vote
0 answers

How can I invoke a dotnet cli command from C# code?

I have written an NUnit test. Now, I need to run those tests from my C# code. My tests are built using .net core 3.1. I need to invoke two commands from my C# code. 1) dotnet test 2) dotnet test --filter "Category=CategoryA&Category=CategoryB" How…
Ayan
  • 115
  • 2
  • 10
1
vote
1 answer

Running TestFixtures in particular order by using NUnit-Console runner

We use NUnit for implementing GUI tests. We have multiple TestFixtures (Test Suites) focused on a set of application functionalities. Test suites have different priorities of execution ( E.g.: Set A need to be verified before running Set B, because…
1
vote
1 answer

How to order Test Scenarios in specflow using nunit3console

How can I order my scenarios to run in a given order? I have a series of scenarios that depend on the previous scenario having run. I'm running my specflow tests using nunit3console. I haven't found anything online that seems to work. And yes my…
elllo
  • 79
  • 2
  • 9