0

I am using MSTest and running unit tests on Team Foundation Server. I am doing wildcard test execution as here; also see image.

I want to use an arbitrary test settings file for one specific dll / test assembly (let's call it foo.dll) and not use any test settings file/use the default settings for every other dll that is grabbed by the wildcard. What is the best way to do that?

I have an image that might help illustrate:
enter image description here

(The above is an image of the screen at Process tab-->Basic-->Automated Tests-->Test Assembly, within the Team Foundation Build template.)

Community
  • 1
  • 1
vard
  • 3
  • 2

1 Answers1

0

With the standard, out of the box process templates you can't do what you're after. You can't wildcard assemblies and exclude some at the same time, and you can't attach a test settings file for just some assemblies. The reason being that under the hood it's doing a single test run and the settings apply for the whole test run.

As an idea, you could copy and customize the build process template, and specifically alter the section relating to running tests to do what you need. Add a second test run to it for example so you can do one set of tests without the run settings and another run with them. For both test runs use the wildcard specification and then use the criteria/arguments tab to decide which tests to run. In the DLL you want to exclude from the first run, tag the tests with an attribute and ignore those in your first test run. For the second include just tests with that attribute.

Richard Banks
  • 12,456
  • 3
  • 46
  • 62