Build/Test Issues

Use wildcards or regular expression in filter "is in project with name"

Started by markoaschoff on 2,412 views

Is it possible to use wildcards or regular expressions in test filter "is in project with name"?

I would like to configure tests to run automatically that are in projects with following name scheme: *.UnitTests

Currently this does not seem to work.

Regards
Marko
Hi Marko,

Thanks for posting.

This should be possible with the filter full name matches regex filter. The UnitTests keyword will probably be unique enough so you don't have to add any other wildcard.
Hi Michael,

thank you. Unfortunately that does not cover exactly what I'd expect. Typically I have my unit tests in the same root namespace as the production code to reduce the amount of required using directives. In that case UnitTests is not part of the full name, however it is part of the project name.

My current workaround is to specify multiple filters with exact project name. But this way I need to add a filter every time I add a new unit test project to my solution.

Regards
Marko
Ah thanks for clearing that up!

One thing I can think of is to add a category to the test project on an assembly level and filter on that. This means you don't have to change the filter, but you'd still be required to make a modification to the test project.

I'll check with Remco and see if he has any other ideas
We've talked this through and we'll be adding this in before the V4 release. This should be available within a couple of weeks.
That's good news, thanks alot. :-)

Post a reply

Log in to reply.