Daily Usage Issues

Solution Filter

Started by fsdschmidt on 2,643 views

Hi,

we have larger solutions and I use the solution filter feature (slnf) of Visual Studio for better performance. All works fine but seemingly NCrunch ignores the filtered solution, builds and tests all projects. Are solution filter unsupported?

Regards,
Micha
Hi Micha,

Thanks for posting.

We can't support this feature, because its function is to prevent VS from loading projects that we need to be able to build and load into an environment in which to run your tests. Sorry.
Ok, thanks for your fast reply. The advantage of this limitation is that I can see if my changes effects the whole unfiltered solution and if tests runs on grid node it's ok. :)
Just out of curiosity, While I understand that you cannot limit what you load (and or build) when you have slnf files open, wouldn't it be possible to at hide projects not in the filter and not to (automatically) run tests that are not in the filter?
erwinvandervalk wrote:Just out of curiosity, While I understand that you cannot limit what you load (and or build) when you have slnf files open, wouldn't it be possible to at hide projects not in the filter and not to (automatically) run tests that are not in the filter?


We don't have any facility to let you hide these projects in the Tests Window according to anything other than the available filters on this window. However, there IS an option for selective automatic execution of tests via the custom engine modes.

You can set up a custom engine mode that uses a filter on the 'Tests to execute automatically' setting that specifically excludes projects that match a name filter. You can make the condition larger to include the name of every project you want to exclude. If the UI makes it annoying to do this for every project, note that you can also edit these filters in your NCrunch settings files in XML format, where you can copy/paste easily.

Another option would be to use Assembly-level category attributes (which are respected by NCrunch) to categorise all tests within a project. You can then set the above filter to exclude or include tests based on this category.

Post a reply

Log in to reply.