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

How to execute parameterized testcase if I dont want to specify the parameters using TestCase Attribute?

How to execute the below code from the Nunit Console if I doesnt know the Parameters which will be passed during execution. [TestCase] public void ExecuteString(string someValue) { Console.WriteLine(someValue); } I know that…
0
votes
0 answers

Called by Open Cover, Nunit Runner Console throws NullReferenceException and hangs forever

In my project, I use Nunit 2 framework. In the build server, I use Open Cover 4.6.519 to analyze the code coverage with the following command: "OpenCover.4.6.519\OpenCover.Console.exe" …
Ha Pham
  • 373
  • 3
  • 18
0
votes
1 answer

Run Specflow Feature file with Nunit Console from 3.4 and above

I need to run my Speflow feature file with Nunit 3.6 console. Just need to know how can i run specific feature? As fixure is not supported anymore so just need to know what else can be used? Tried --test = but no luck. I've tried below command…
v. api
  • 47
  • 10
0
votes
1 answer

c# extremely easy unit test error

I write this helloworld unit test and build it. It always have this build error: "The command://...../Nunit.ConsoleRunner3.6/nunit3-console.exe exited with code 1".I search all the stackoverflow but there is no a single thread about Nunit test exist…
Tim He
  • 11
  • 3
0
votes
1 answer

NUnit3 Tests Don't seem to be running in parallel

I have the following [assembly: LevelOfParallelism(10)] [Parallelizable(ParallelScope.Self)] public class MessageHandlerTests { [Test] public async Task WhenCallingHandle_ShouldInvokeConsumer( [Values(1, 25)] int messageCount, …
Jeff
  • 35,755
  • 15
  • 108
  • 220
0
votes
1 answer

How to get nunit console 3 to output failed and ignored tests (only) to text files?

I understand that nunit console 3 can write to TestResult.xml after running the tests, where the TestResult.xml is located inside the directory specified by --work parameter. But from what I can tell, TestResult.xml contains too many (irrelevant)…
Graviton
  • 81,782
  • 146
  • 424
  • 602
0
votes
1 answer

"System.ArgumentNullException : Argument cannot be null" while running NUnit tests through command line

While running NUnit tests through command line (nunit-console.exe assemblyName.dll), ConfigurationManager is not able to read the keys from 'App.config' file hence the program is throwing "System.ArgumentNullException : Argument cannot be null" I…
Srikanth Gurram
  • 1,022
  • 1
  • 10
  • 22
0
votes
1 answer

My NUnit extension(Addon ) is not getting detected by NUnit tests when I run it in VS2015

I am running NUnit 3.6 in VS 2015 and trying to create extenstion (Addon ) for NUnit , but so far the NUnit is not detecting the addon , I put its path it in .addins file , and every thing the documentation saying but no luck . if I run the unit…
sino
  • 754
  • 1
  • 7
  • 22
0
votes
1 answer

Nunit3-console: Run tests concurrently(per assembly)

I've started a nUnit3 tests on a computer that has 2 core. It seems it runs only with 1 agent. I've read the documentation but they say the --agents=X is to reduce the number of threads. Why by default it doesn't use 2 agents if I've 2 cores? Should…
J4N
  • 19,480
  • 39
  • 187
  • 340
0
votes
1 answer

How to create a dll-file from cs-files for nunit-console runner in visual studio

I have many tests in the .cs format. When I want to run nunit-console C:\Users\...\Desktop\web-testing\xxxxxx.dll /output="C:\Users\...\Desktop\result.xml", I need a dll. But how to create this file?
kame
  • 20,848
  • 33
  • 104
  • 159
0
votes
0 answers

How to interpret coverage summary from mono profiler report

I created a unit test project for a PCL in a Xamarin Application. I am running on console: mono --debug --profile=log:coverage,report,covfilter=+MyProject.Core.Contacts.ViewModels.ContactsViewModel \ ../nunit3-console.exe \ --noh \ …
Stam
  • 2,410
  • 6
  • 32
  • 58
0
votes
0 answers

Run coverage from visual studio and from command line get different result, how to correct it?

I have a project with unit test, when I right click project and run from visual studio, I got 100% coverage. Please see attachment coveargeA.jpg The method is CleanUpInProcessExperiments. but when I run it with command line, then I got 0%…
Hesper
  • 1
0
votes
0 answers

Can not get NUnit Runner task working

I've created NUnit Runner task, but it failes all the time. As an executable I'm using nunit3-console.exe My tests in .net 4.6.1 test project use NUnit3 This is how the job is configured: nunit job configuration After plan run I've got error: Could…
0
votes
0 answers

While running the NUnit Test Cases through command prompt, Success Exception is thrown on MAC machine only. Any Solution to resolve it?

While running the NUnit Test Cases through command prompt, Success Exception is thrown on MAC machine only. All Test Cases are passing on Xamarin Studio. Even I am able to run all the NUnit Test Cases on Windows machine through IDE as well as CMD.…
user2014334
  • 122
  • 1
  • 9
0
votes
1 answer

Using the output of a [ValueSourceAttribute] Nunit Test in the following Test

I am developing a unit test project where I create an item in a test, then create sub items for it in the following test. These tests are parameterized tests, and these parameters are collected in the runtime, so when the project starts it starts.…