nunit-2.5

Why do my tests fail when run together, but pass individually?

二次信任 提交于 2019-11-29 06:12:31
问题 When I write a test in Visual Studio, I check that it works by saving, building and then running the test it in Nunit (right click on the test then run). The test works yay... so I Move on... Now I have written another test and it works as I have saved and tested it like above. But, they dont work when they are run together. Here are my two tests that work when run as individuals but fail when run together: using System; using NUnit.Framework; using OpenQA.Selenium.Support.UI; using OpenQA

NUnit 2.5.8, lots of nunit-agent.exe

时光总嘲笑我的痴心妄想 提交于 2019-11-29 03:48:34
Each time I run a test in nunit I get another nunit-agent, which does not exit the test completes, or when the tests are reloaded in nunit or when I restart nunit. This ever increasing list of nunit-agent.exe's creates a increasing problem when I try to attach to process from VS2010 and try to debug the running test Any ideas, Trying to task kill these process is not the answer .... (my environment VS2010, dot net 4.0, nunit 2.5.8, ... ) Sean I've just encountered the same problem. The fix is to edit the NUnit.exe.config file and add this: <startup> <requiredRuntime version="4.0.30319" /> <

Initialize log4Net as early as possible with NUnit

∥☆過路亽.° 提交于 2019-11-28 06:07:11
问题 I'm wondering what is the best way to initialize log4Net in a NUnit project. Of course I want to call the init code (ie. XmlConfigurator.Configure() ) as soon as I can to get as many early log output as I can. But since my project is run through NUnit, I have little control on its entry point. According to NUnit documentation, it should call some constructors first, then a method marked with the [SetUp] attribute in a class marked with [TestFixtureSetup] . So, First, I created a static helper

NUnit 2.5.8, lots of nunit-agent.exe

别说谁变了你拦得住时间么 提交于 2019-11-27 17:50:18
问题 Each time I run a test in nunit I get another nunit-agent, which does not exit the test completes, or when the tests are reloaded in nunit or when I restart nunit. This ever increasing list of nunit-agent.exe's creates a increasing problem when I try to attach to process from VS2010 and try to debug the running test Any ideas, Trying to task kill these process is not the answer .... (my environment VS2010, dot net 4.0, nunit 2.5.8, ... ) 回答1: I've just encountered the same problem. The fix is

Data-driven testing in NUnit?

爷,独闯天下 提交于 2019-11-27 12:42:45
问题 In MSTest you can do something like: [TestMethod] [DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "testdata.csv", "testdata#csv", DataAccessMethod.Sequential)] public void TestSomething() { double column1 = Convert.ToDouble(TestContext.DataRow["column1"]); ... Assert.AreEqual(...); } What is the equivalent code in NUnit 2.5? 回答1: I would look at the parameterized tests documentation in NUnit 2.5 and see if you can do something like what you're doing there. I do not recall NUnit