NUnit Test being ignored

I have build a configuration for project using the Visual Studio 2008 Solution File Runner, I have specified the DLL where my NUnit tests are located.

The project is built fine, however all test are being ignored with the following error:
No suitable constructor was found

This error shows up on each attempt to run a test.

I have no categories marked for exclusion, or inclusion.
The NUnit version for the runner si 2.5.0, the same I use for my testing.
I have the checkbox "Run recently failed test first" unchecked.

I also use ReSharper and the test run perfectly with it.

I have found no documentation on this error, any suggestions as to what it might be happening?

Regards
Albert

11 comments
Comment actions Permalink

Could you please attach a screenshot of your build configuration settings.
Attach a sample test source code.

Thanks!

0
Comment actions Permalink

Attached you can find the screenshots detailing my build configuration.

Let me know whats wrong.

Following is the source for one of the tests:

    [Category("Unit Tests")]
    [TestFixture("DotNetConfigurator Tests")]
    public class DotNetConfiguratorTests
    {
        AppSettingsSection _testData;

        [SetUp]
        public void Init()
        {
            _testData = new AppSettingsSection();
            _testData.Settings.Add("firstValue", "firstResult");
            _testData.Settings.Add("secondValue", "secondResult");
            _testData.Settings.Add("intValue","500");
            _testData.Settings.Add("boolValue","true");

        }

        [Test]
        public void LoadConfig_Should_SuccessFully_Load_A_Configuration_File()
        {
            var configManager = new Mock<IConfigurationManager>();

            var config = new Mock<IConfiguration>();
            config.Setup(m => m.AppSettings).Returns(_testData);

            DotNetConfigurator configurator = new DotNetConfigurator(configManager.Object);
            configurator.UseStub = true;
            configurator.StubConfig = config.Object;

            configurator.LoadConfig();

            KeyValueConfigurationCollection result = configurator.Config;

            Assert.That(result,Is.Not.Null);
            Assert.That(result["firstValue"].Value,Is.EqualTo("firstResult"));
            Assert.That(result["secondValue"].Value,Is.EqualTo("secondResult"));

        }



Attachment(s):
screen4.png
screen3.png
screen2.png
screen1.png
0
Comment actions Permalink

Do you run x64 windows?

0
Comment actions Permalink

The OS on which TeamCity runs is Windows Server 2003 (32Bit).

0
Comment actions Permalink

Any suggestions?

0
Comment actions Permalink

Please attach build log

0
Comment actions Permalink

Please provide me with an email or another way to send you the log privately.

0
Comment actions Permalink

Was there ever any resolution to this?

0
Comment actions Permalink

Tim,

We resolved the issue in email.
The outcome was the following:

As long as you use [TestFixture("FluteDbParameter Tetsts")], NUnit runner will expect a 1-parameter constructor link C(String s);

The fix is to swith to NUnit 2.4.* or NUnit 2.2.* or to remove parameters from TestFixture attribute.

Please refer to NUnit 2.5 documentation of the [TestFixture] attribute at
http://www.nunit.org/index.php?p=testFixture&r=2.5.3


Thanks!

0

Please sign in to leave a comment.