NUnit tests runner problem when specify wildcard in "Run tests from"

Hi TeamCity support,
We have the problem when we specify wildcard in "Run tests from" on "NUnit tests runner" build step.
This is our TeamCity information
TeamCity: TeamCity Professional 9.0.5 (build 32523)
NUnit: 2.6.4

We have dll file structure like this

-------------------- Component1.Testing.dll
-------------------- Component1.Testing.dll.config

-------------------- Component2.Testing.dll
-------------------- Component2.Testing.dll.config
-------------------- Component1.Testing.dll

-------------------- Component3.Testing.dll
-------------------- Component3.Testing.dll.config
-------------------- Component1.Testing.dll
-------------------- Component2.Testing.dll

We configured the NUnit tests runner in "Run tests from" as "*Testing*\bin\debug\*Testing*.dll"

What we found is that
- NUnit tests runner run test for "Component1.Testing.dll" for 3 times (equal to the number of dll in every folder)
- NUnit failed when run test for "Component1.Testing.dll" in these folders (Component2.Testing and Component3.Testing) because the NUnit cannot find the application config file, so it cannot find some binding redicrect.

My question is that
- Do we have a way to specify wildcard to run test dll from it's own directory? E.g. Run test for "Component1.Testing.dll" under "Component1.Testing" only

   - Right now, we use a temporary solution by specify each assembly file (seperate each file by semicolon e.g. Component1.Testing\bin\Debug\Component1.Testing.dll;Component2.Testing\bin\Debug\Component2.Testing.dll;Component3.Testing\bin\Debug\Component3.Testing.dll)
     For this way, we found that we are missing to run test when we add a new dll.

Thank you for yuor help in advance.

Thanasak P.

1 comment
Comment actions Permalink

Hi, Thanasak Polrak

Wildcards are described in the, there is no way to do it using wildcards

You could create a step to make a list of testing assemblies. For example you could use a MSBuild Inline Task or you could use a powershell script to find and to filter the assemblies, after that you could send this list via console to the TeamCity using TeamCity service message "setParameter":
You could use this parameter in the field "Run tests from"


Please sign in to leave a comment.