jeudi 23 avril 2015

How do I check if code is running from Visual Studio or from Automated Build

We have a scenario wherein we have sql unit tests, for that we have a sql test project which reads connection string from App.config.

We now want that if we run test from Visual studio it should use ConnectionStringA else if it runs from Automated Build, it should use ConnectionStringB.

Can I somehow determine if the test is running under visualstudio or automated build ?

Thanks

Aucun commentaire:

Enregistrer un commentaire