The recommendation is to check in the .v3.ncrunchproject-files for the team to share settings. Fine so far. But I have an issue with ignored tests. We are starting to have a lot of tests distributed over several projects, all in the same solution. To use nCrunch efficiently, I usually ignore tests I'm not currently working with. However, this is a pain when we have the project files checked in, because I don't want to check in these tests as ignored, but I want to ignore them during my work. Having all the nCrunch project files modified in git makes it very difficult to get a clean overview of what code I have changed.
So, what is the general idea behind this and the reason this setting is in these files? Am I not supposed to ignore tests during my work? Or is there another way of ignoring tests that don't affect the ncrunch project files?
Please advice.
Remco NCrunch Developer
#11538
23 Nov 2017 22:24 UTC
Hi, thanks for posting!
There are two ways of using NCrunch's ignored tests feature, and nothing in between:
1. You use it to temporarily ignore tests for yourself that you don't want to focus on running. In this case, make sure you have the 'Share tests ignored by NCrunch' setting set to 'False' (NOT the default). When you do this, the ignored tests will be stored in the ncrunchproject.user file, which you ideally won't be checking into your VCS.
2. You use it to permanently ignore tests that don't work correctly under NCrunch. In this case, make sure you have the 'Share tests ignored by NCrunch' setting set to 'True' (this is the default). Under this, the ignored tests are stored in the shared ncrunchproject file which you should ideally have checked into your VCS.
Note that this feature is only one of the ways you can ignore tests. NCrunch also respects IgnoreAttribute and ExplicitAttribute. You can also comment out test attributes for tests that don't work or are otherwise under development. You can also customise your engine modes with filters to avoid running specific kinds of tests automatically.
There are two ways of using NCrunch's ignored tests feature, and nothing in between:
1. You use it to temporarily ignore tests for yourself that you don't want to focus on running. In this case, make sure you have the 'Share tests ignored by NCrunch' setting set to 'False' (NOT the default). When you do this, the ignored tests will be stored in the ncrunchproject.user file, which you ideally won't be checking into your VCS.
2. You use it to permanently ignore tests that don't work correctly under NCrunch. In this case, make sure you have the 'Share tests ignored by NCrunch' setting set to 'True' (this is the default). Under this, the ignored tests are stored in the shared ncrunchproject file which you should ideally have checked into your VCS.
Note that this feature is only one of the ways you can ignore tests. NCrunch also respects IgnoreAttribute and ExplicitAttribute. You can also comment out test attributes for tests that don't work or are otherwise under development. You can also customise your engine modes with filters to avoid running specific kinds of tests automatically.
Thanks for quick reply! This 'share tests ignored by NCrunch' setting was just what I was looking for.
Post a reply
Log in to reply.