3

Do you guys take time to properly name your Unit tests ?

I kinda feel it's waste of time. (There are comments with description of the test tho)

Comments
  • 8
    Test00[n].class.method.scenarioIAmTesting.

    When you run all tests and something fails, I don't have to go read the test class to work out what's failed.
  • 1
    @C0D4 Interesting !

    Maybe I’ll do something similar.

    Right now if a test fails, I just need to double click on it to see description.

    Here is an example
  • 4
    Always.

    And I always try to preserve the trhee-parts naming convention
  • 1
    Easy, spam the issue tracker with features and regressions. Now name the tests with only issue IDs.
  • 2
    WhenConditionIfApplicable_Method_DoesExpectedThing
  • 0
    What I do is GivenClassName.ItThrowsWhenAIsNull();
  • 1
    @spongessuck I find having method being the first in line more manageable. If I'm testing a class with multiple methods, seeing method first adds a nice additional grouping for all the cases
Add Comment