Giter Club home page Giter Club logo

Comments (3)

OsirisTerje avatar OsirisTerje commented on June 19, 2024

The reason for the recommendation to not change the testname is that the Visual Studio test explorer is driven by the testname. However, the default is {m}{a}, so not sure why that should not work for you.

The problem: Now ShouldBeTrue_WhenIsLastFoundAtSameDayAsLimit is just duplicated, I cannot differentiate the tests and see them in NUnit.

I can't see what you're pointing at. I am possibly drowning in the image there. The first image looks like it still has template parameters, but the test code doesn't. I am confused. Can you point it out?

You are correct that the template parameters are for the testname, and not for the description. I am not sure if you want this to work in VS or in NCrunch.

from nunit.

rklec avatar rklec commented on June 19, 2024

I am possibly drowning in the image there. [...] I am confused. Can you point it out?

Oh I am sorry seems I indeed uploaded the wrong first image I am sorry, I've corrected it in the post.

So the actual problem seems to be that NCrunch always shows the description.

Also to see how NCrunch structures tests the code structure in my example is:

[TestOf(typeof(NotFoundWithinDuration))]
internal class NotFoundWithinDurationTest
{
    // ...
    public class ShouldDelete : NotFoundWithinDurationTest
    {
      // ...

      // ....
      public void
            ShouldBeTrue_WhenLastFoundTimeIsInThePast(int numberOfDaysLastFound, int notFoundLimitInDays)
        {
           // ....
        }
   }

So that is why there is a plus in there etc, it uses the class names for it. That said, this does not matter, actually. NCrunch just always replaces the test name with the NUnit description if it has one. That is the root cause, leading to my tries here...

NCrunch v4.11.0.2 (in my case) with Visual Studio 2022 (17.8.4)

from nunit.

OsirisTerje avatar OsirisTerje commented on June 19, 2024

Have you raised an issue with NCrunch about this? It seems to me that the best place to fix this is in NCrunch, so that it doesnt use the description but the testname. In this case you should ignore the recommendation, given that you get a view in TestExplorer or NCrunch that you're happy with.

You could also look into moving the test data into a testcasesource, and then build up the description yourself with the correct parameters.

from nunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.