0

We use TeamCity (Version 8) to manage our builds, trigger octopus deployments and finally execute integration tests against our deployed services. In the case of the integration tests, we want to avoid storing usernames and passwords in source control but would be happy to allow TeamCity to pass this information when the unit tests are run by the MSTest runner.

How can we pass (safely) passwords, urls and usernames stored only in team-city? Is this good practise or is there a better way to do this?

The Senator
  • 5,181
  • 2
  • 34
  • 49
  • TeamCity can store passwords securely. How are these being consumed? Are they account credentials for users (personas) in the test scenarios or connection settings / api keys etc? – Matt Mar 30 '16 at 13:39
  • I'm happy to store the user name and passwords in TeamCity, but how do I pass these values through to my MSTest runner when actually executing the tests. Just assume for now I only need a single user and password to be passed to my test runner. – The Senator Mar 30 '16 at 16:27
  • You'd probably need to write out a config file dynamically such as app.config and the tests would have to read in settings using the ConfigurationManager.AppSettings["key"] – Matt Mar 30 '16 at 16:41

0 Answers0