NUnit Test Run Order

I just want to point out that while most of the responders assumed these were unit tests, the question did not specify that they were. nUnit is a great tool that can be used for a variety of testing situations. I can see appropriate reasons for wanting to control test order. In those situations I … Read more

How can I run NUnit tests in parallel?

If you want to run NUnit tests in parallel, there are at least 2 options: NCrunch offers it out of the box (without changing anything, but is a commercial product) NUnit 3 offers a Parallelizable attribute, which can be used to denote which tests can be run in parallel

Run Selenium tests in multiple browsers one after another from C# NUnit

NUnit 2.5+ now supports Generic Test Fixtures which make testing in multiple browsers very straightforward. http://www.nunit.org/index.php?p=testFixture&r=2.5 Running the following example will execute the GoogleTest twice, once in Firefox and once in IE. using NUnit.Framework; using OpenQA.Selenium; using OpenQA.Selenium.Firefox; using OpenQA.Selenium.IE; using System.Threading; namespace SeleniumTests { [TestFixture(typeof(FirefoxDriver))] [TestFixture(typeof(InternetExplorerDriver))] public class TestWithMultipleBrowsers<TWebDriver> where TWebDriver : IWebDriver, new() … Read more

How can I run NUnit tests in Visual Studio 2017?

Add the NUnit test adapter NuGet package to your test projects 2.* (https://www.nuget.org/packages/NUnitTestAdapter/) 3.* (https://www.nuget.org/packages/NUnit3TestAdapter/) Or install the Test Adapter Visual Studio extension. There is one for 2.* (https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.NUnitTestAdapter) 3.* (https://marketplace.visualstudio.com/items?itemName=NUnitDevelopers.NUnit3TestAdapter). I prefer the NuGet package, because it will be in sync with the NUnit version used by your project and will thus automatically match the … Read more