Different unit test naming formats

Hi there,

it seems that Continua CI handles test names for NUnit tests differently if tests use parameters. Test methods without parameters are listed without any additional names while test methods with test cases are listed with their fully qualified identifier.

Here is an example:

namespace MyProduct.Tests;

[TestFixture]
public class UnitTests
{
    [Test]
    public void SimpleTest()
    {
    }
   
    [Test]
    [TestCase(“input value”, “expected result”)]
    public void MultipleTests(string input, string expectedResult)
    {
    }
}

Continua CI will list “SimpleTest” and “MyProduct.Tests.UnitTests.MultipleTests(input value, expected value)”.

As the namespace and the test fixture are listed in separate column the fully qualified identifier is not neccessary for tests with parameters.

We are still at version 1.5.1.49.

Kind regards

Kay Zumbusch

Hi Kay,

Thanks for reporting this. I have implemented a fix for the next version.

I also found out that the name of the text fixture is wrong for unit tests with parameters. In case of my example the name of the test fixture for tyhe simple test is “UnitTests” whil the name for the test with parameters is “MultipleTests”.

Kind regards

Kay Zumbusch

Hi Kay,

Yes, the fix will deal with this too. 





Hi Dave,

I was finally able to update to the latest version of 1.6. Although the naming of the tests is consistent now I’m still not entirely happy with the result. The test name includes the full identifier of the test method although name space and fixture have dedicated columns. I would prefer just the test name in the name column.

Additionally the evaluation of the namespace seems to be incomplete. From my sample I’d expect “MyProduct.Tests” as the namespace but we only get “MyProduct”.

Regards

Kay Zumbusch

Hi Kay,

Thanks for reporting this. We missed this as our tests only had a single namespace. We’ll get this fixed and send out a new version tomorrow.