Is it possible to pass wildcard testcontainer values to the command-line mstest.exe rather than manually hardcoding multiple testcontainer values? Such as
Mstest.exe /testcontainer:tests.dll
I'm wanting to manually invoke mstest in our tfs 2012 upgrade template.xaml build processso tthat it behaves like a autodiscovery way similar to running tests in default template.xaml
If not could this be written into a bat script to loop through folders from a given start folder?
It is also possible to use cmd file to collect containers by wildcard into a single variable, and then run mstest with this variable expanded:
MSTest
doesn't take a wildcard parameter for the testcontainer (look here for a reference on the command line options). It can however take multiple /testcontainer arguments, as follows:You will have to supply these parameter another way. This can be done using a batch file, but
MSBuild
may be a better choice for this:(with thanks to https://stackoverflow.com/a/2770682/62662 for the transform)
Save i to a file (
testall.proj
), and run it withMSBuild testall.proj
, or create a batch file to run it for you.Also note that mstest loads all supplied testcontainers in one application domain, so they will need to support the same platform target (any cpu, x86, x64).