nunit-console

Does anyone know where to find NUnit console exit codes meanings?

回眸只為那壹抹淺笑 提交于 2019-12-18 18:48:57
问题 I am getting error message from my MSBuild: "nunit-console.exe" exited with code -100. Does anyone know where NUnit console exit codes meanings can be found? 回答1: Error code -100 stands for UNEXPECTED_ERROR static ConsoleUi() { OK = 0; INVALID_ARG = -1; FILE_NOT_FOUND = -2; FIXTURE_NOT_FOUND = -3; TRANSFORM_ERROR = -4; UNEXPECTED_ERROR = -100; } EDIT: Additional information from a thread on the NUnit-Discuss google group: Additionally, positive values give a count of failed tests in the run.

Pass parameters via the command line to NUnit

我只是一个虾纸丫 提交于 2019-12-17 23:15:47
问题 Is it somehow possible to pass values to NUnit tests via the command line? My tests use a certain URL. I have different instances of my code at different URLs and would like to specify the URL via the command line. File App.config is not an option, because I want to run the tests for different URLs via a batch file. 回答1: Use an environment variable to pass the information. Use set from the command-line or <setenv> from NAnt. Then read the value using Environment.GetEnvironmentVariable() . 回答2

Can NUnit Console Runner report failed tests on the fly?

五迷三道 提交于 2019-12-14 03:57:25
问题 nunit-console seems to work like this (params: /nologo /wait /labels ... ) It outputs only the label for each test when a test is started, like so: ***** Our.Tests.Bla ... here come some Console.WriteLine // Note that in case Our.Tests.Bla fails, nothing is reported here immediately ***** Our.Tests.Blub ... here come some Console.WriteLine ***** Our.Tests.Foo ... here come some Console.WriteLine If any test fails, it reports the test failures only at the end of the complete run. Normally this

Nunit-console.exe fails with return code 7 using Nant and Bamboo

空扰寡人 提交于 2019-12-11 11:23:08
问题 I'm getting not too much saing error while running nunit test on Bamboo build server. It causes showing build resuts as red and shows that project has only 27 unit test and all they passing (project has more than 500 tests and some are failing) I've tried to run the same test using nunit-console on my local machine, but it runs without any problems. Bamboo log: [exec] D:\BambooAgent\..\nant.build(277,5): [exec] External Program Failed: C:\Program Files\NUnit 2.5.9\bin\net-2.0\nunit-console

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

风流意气都作罢 提交于 2019-12-11 06:56:59
问题 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 afterloop SET remvar=%remvar% %2 GOTO loop :afterloop REM Ensure PATH includes nunit3-console.exe or edit the line below to include full path. %nucpath% %projectvar% %xmlvar% %outputvar% %remvar% with arguments: ${bamboo.build.working.directory}\src

How can I suppress nunit console output?

丶灬走出姿态 提交于 2019-12-11 01:34:58
问题 Is there a way to suppress nunit errors and failures displayed on console output? I tried using the command line options: /xml, /out, /err. But still get the output in console. 回答1: From your use of the /xml option, I can see you are using an older version of NUnit, however, the answer is the same for newer ones as well. There is no way to change the report output produced by the console runner. You can redirect the entire thing to a file, or even to the null device, but you can't suppress

NUnit Multiple TestFixture with different Category attribute

百般思念 提交于 2019-12-11 00:49:38
问题 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 websiteName) { } [Test] //test } When I am running test with nunit3-console runner giving stating --where "cat==A" then it still run the test method for both websites. Is there a way to run test for just one category in this kind of model? 回答1: You have a

Running nunit-console on a solution file leads to System.IO.FileLoadException

℡╲_俬逩灬. 提交于 2019-12-06 02:23:36
问题 When I try to use nunit-console.exe to run all the tests in a solution file as such: nunit-console.exe MyProject.sln I get the following exception (shown below). However when run the console runner on ANY of the projects in my folder structure, the runner works just fine and never gives me the following exception. I also am pretty certain that the version of the nunit library that I am linking to is the same as the runner that I am using. Also, my solution doesn't reference any projects that

Running tests on Mac OS X console using mono/nunit-console/4

荒凉一梦 提交于 2019-12-05 19:14:00
问题 I have Max OS X 10.11.1 installed, with Xamarin on it. I wrote simple testing class, just to test running Nunit tests on Mac OS X & Ubuntu, class has literally one method which returns string: using System; namespace testing_project { public class EmptyClass { public EmptyClass () { } static void Main(string[] args) { } public string helloWorld() { return "Hello World!"; } } } And I have a NUnit class to test my EmptyClass: using System; using NUnit.Framework; namespace testing_project {

Running nunit-console on a solution file leads to System.IO.FileLoadException

[亡魂溺海] 提交于 2019-12-04 08:10:55
When I try to use nunit-console.exe to run all the tests in a solution file as such: nunit-console.exe MyProject.sln I get the following exception (shown below). However when run the console runner on ANY of the projects in my folder structure, the runner works just fine and never gives me the following exception. I also am pretty certain that the version of the nunit library that I am linking to is the same as the runner that I am using. Also, my solution doesn't reference any projects that are outside the directory structure containing my .sln file. Does anyone have any clue what I can do!?