Feature Suggestions

Allow customization of test tree in NCrunch Tests window

Started by DanHil on 5,871 views

I understand that the title is a bit vague, so let me give you a concrete example:

I structure most of my tests in the following way:

- One folder per class under test
- Inside that folder, one class per method or closely related functionality
- Inside the class multiple test methods for different scenarios

In other words: The name of the class and the folder hierarchy is important.

Currently, the tests window displays this info in the following way:


<MyCompany>.<MyProduct>.<MyProject>.Tests
|- <MyCompany>.<MyProduct>.<MyProject>.Tests.<The>.<Namespace>.<NameOfTestClass>
    |- <Method name in test class>


Example:


FireDevelopment.SomeLobApplication.UI.Tests
|- FireDevelopment.SomeLobApplication.UI.Tests.ViewModels.ShellViewModelTests.ConfirmOrder
    |- IfAllPositionsHaveBeenChecked_MarksOrderAsConfirmed


This is redundant and hides a lot of info in the noise.
The following would remove the redundancy and the noise:


FireDevelopment.SomeLobApplication.UI.Tests           <- The project
|- ViewModels                                         <-| The name-
    |- ShellViewModelTests                            <-|     space hierarchy
        |- ConfirmOrder                               <- The test class
            |- IfAllPositionsHaveBeenChecked_MarksOrderAsConfirmed                        <- The method name inside the test class


What do you think?

For reference: I am using xUnit.net.
Hi Daniel -

This makes sense. There are plans to add new grouping options to the Tests Window to allow this sort of thing. I hadn't originally considered the idea of breaking up the namespaces into separate tree nodes, and I do like this idea. I'm hoping to include some (or all) of this functionality in the upcoming V2 release - we'll have to see how the scope progresses and whether it can be included :)

Cheers,

Remco

Post a reply

Log in to reply.