Database Test Configuration AllowConfigurationOverride database name

267 Views Asked by At

How can I get different build agents to run the unit tests against their own specific instance or database name? Are there any property overrides or variables available in .dbunittest.config files ?

I have a TFS 2010 build server with the default 4 build agents managing a continuous integration solution that builds a database project, deploys it on the build server and runs the database unit tests from the separate db unit test project using app.config of the test project with an override clause.

LoginName.dbunittest.config provides control over the connection string used for the testing database. It seems like the build agents all use this same connection string meaning that parallel builds are tested against the same database.

App.Config

<DatabaseUnitTesting AllowConfigurationOverride="true">


LoginName.dbunittest.config 

<ExecutionContext ConnectionString="Data Source=(local);Initial Catalog=db_unit_tests" ... />
<PrivilegeContext ConnectionString="Data Source=(local);Initial Catalog=db_unit_tests" ... />
0

There are 0 best solutions below