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.