TeamCity - Configure MSTest Settings to execute a command before the tests

563 views Asked by At

I try to configure the MSTest Settings ssection [Step 3 Runner: Visual Studio (sln)]. My particular configuration require to call a set of scripts (TestSetup.cmd) before the tests. Everything works fine in Visual Studio, but I don't know how to call the scripts from TeamCity. I tried to add in the MSTest metadata the .vsmdi file but without success. The script are not executed.

My question is how to call the command from TeamCity in the MSTest Settings section?

Thank you and best regards!

testrunconfig file:

This is a default test run configuration for a local test run. MSTest Settings screen shot TestSetup.cmd

Versions : TeamCity Enterprise 5.1.3 Microsoft Visual Studio Team System 2008 Development Edition

I

1

There are 1 answers

0
Phillip Ngan On

Add a build step before the MSTest runner which runs your testsetup.cmd.