I've got a unit test in my MonoTouch project that I can't run from inside MonoDevelop -- it fails with "Unix transport error." Poking around on the web it looks like that's associated with the NUnit test runner blowing up, so I thought I'd try using the command-line test runner.
I used MonoDevelop's "Create Package" to build and package...
Where can I find the XSD for the XML file that Nunit uses ?
...
I have code which require me to Pinvoke into a 3rd party native DLL. The issue is that when I use the Nunit test runner for those tests, the native dll is locked by the nunit processes (nunit.exe and nubit-agent.exe). Thus my post-build copy command fails because of this.
The only way to generate a 'successful build' (includes post-buil...
I have the following test which aims to ensure that file path generated is of a specific format. Using Nunit's fluent interfaces, how can I go about this?
I am having trouble with the regex.
[Test]
public void AssetControlPath_ShouldHaveFormat_BaseDir_YYYY_MMM_YYYYMMMDD()
{
//Arrange
var baseDir = "C:\\BaseDi...
I'd like to have a configuration where my build server runs a NUnit test that opens and drives a browser on a remote machine. What would be the best way to accomplish this?
It was easy to do in Selenium 1, because the java proxy server sat between your tests and the browser. In Selenium 2, your tests communicate directory with the brow...
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?
...
Hi,
I am using VSTS 2008 development edition and I want to convert NUnit tests to MS tests. Currently some of the tests have "category" attribute of NUnit to control which tests to be run. I did some search and it looks like in VSTS 2008, we will need to create test list by Test Manager from VSTS Test edition.
The question is how can ...
I'm sure I missing something simple here but I can't figure out why my NUnit object comparison test continues to fail.
I have a simple object:
public virtual int Id { get; private set; }
public virtual string Description { get; set; }
public virtual string Address { get; set; }
public virtual string Ports { get; set; }
...
I'm trying to get a Session Timeout when I call on a certain Stored Procedures in my DB (the return code for this in my DB is 3). I wanna do that so that I can make a successful Assertion to my DB. I tried putting the thread to sleep for a couple of minutes but I'm sure there is a more practical (faster) way to get a Session Timeout erro...
I am creating test scripts in Visual Studio IDE using Selenium RC and
executing them thru NUnit. In order to run these tests on Virtual PC,
what would I need to do.
What all would I need to have on the Virtual machines? Only NUnit or
even Selenium?
If anybody has any experience setting this up and executing the test I
would appreciate ...
Is there any way to test a Windows Phone 7 Class library? Usually (for WinForms or WPF applications) I create separate class library and add reference to nunit.framework.dll and to a class library which I want to test.
Here, if I create new Windows Phone class library it doesn’t allow me to add reference to NUnit framework assembly.
I...
I am using NUnit asserts within a MSTest project like as follows (NOTE: This shouldn't matter see comments to Dave Falkner's answer):
using Microsoft.VisualStudio.TestTools.UnitTesting;
using MSTestExtensions;
using Assert = NUnit.Framework.Assert;
using Is = NUnit.Framework.Is;
This has worked great in my unit tests, but in my integr...
I'm attempting to write a unit tests for an ASP.NET MVC 2 post action that takes a view model as its sole parameter. The view model is decorated with validation attributes such as [Required]. I'd like to test two scenarios. The first scenario is when a valid set of data is passed in (ie, all required properties have values) and a redirec...
I have a rather large set of integration tests developed in C#/NUnit. Currently it is one test fixture, one class. In [TestFixtureSetUp] I create a database from a script and populate it with test data, also from a script. My tests do not modify data, so they can run in any order or in parallel.
My problem is that I have too many tests...
I'm working on a variation of this stack overflow answer that provides reliable cleanup of tests. How do you write unit tests for NUnit addins?
Examining how NUnit self tests, I have determined:
You can write tests, that pass, that verify correct behavior of NUnit for failing tests.
You write unit tests against test fixtures in a s...
We have a WinForms application that we're planning to port to Silverlight. Obviously the UI will need to be totally rewritten, but we have a lot of business logic that's well-tested with NUnit tests. We use ReSharper to run the tests inside the IDE, and nunit-console to run the tests on the continuous integration machines.
As we start m...
I'm currently making use of Castle Windsor version 2.1 as my container and would like to perform integration tests using the services registered with it.
Currently, I do this my using the Common Service Locator to retrieve my service instance and perform my integration tests against it as such:
var myService = ServiceLocator.Current.Ge...
With continuous integration, it makes a lot of sense to re-run failed unit tests first the next time a cycle starts. This shortens the feedback loop.
Is there any known way to achieve this with CCNet and NUnit?
In principle, CCNet would have to have "memory" of which unit tests failed and NUnit would need to be instructed to run them i...
When I load my executable in NUnit, the application appears to be "locked". I run the tests but when I want to make some modifications to them, I have to close NUnit first otherwise my compilation will fail.
Is there any workaround for this?
EDIT
According to Process Explorer, the only process accessing my executable right now are "nu...
If I want to test that a method throws an exception of a particular type, NUnit's ExpectedException attribute doesn't care about the actual type; if I throw a generic Exception before the method call, the test passes:
[Test, ExpectedException(typeof(TestCustomException))]
public void FirstOnEmptyEnumerable()
{
throw ...