Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Allow customization of test tree in NCrunch Tests window
DanHil
#1 Posted : Wednesday, June 26, 2013 3:34:37 PM(UTC)
Rank: Advanced Member

Groups: Registered
Joined: 11/12/2012(UTC)
Posts: 85

Thanks: 11 times
Was thanked: 3 time(s) in 3 post(s)
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:

Code:

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


Example:

Code:

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:

Code:

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.
Remco
#2 Posted : Wednesday, June 26, 2013 11:49:59 PM(UTC)
Rank: NCrunch Developer

Groups: Administrators
Joined: 4/16/2011(UTC)
Posts: 6,979

Thanks: 931 times
Was thanked: 1257 time(s) in 1170 post(s)
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
1 user thanked Remco for this useful post.
DanHil on 6/27/2013(UTC)
Users browsing this topic
Guest
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.

YAF | YAF © 2003-2011, Yet Another Forum.NET
This page was generated in 0.044 seconds.
Trial NCrunch
Take NCrunch for a spin
Do your fingers a favour and supercharge your testing workflow
Free Download