In our organization we have an old legacy system that requires a plain-text password.
When making calls from our .Net webservices we need to supply our own username/password, so when writing integration tests we are hard-coding the credentials.
The tests are executed using NUnit, and only executed on our local machines. What’s the best way to secure our passwords without exposing them to other developers who checkout the source code?
You could use a properties file. Each developer has their own file on their machine, but the system always assumes that this properties file will exist with the variables.
When we use a tool like Subversion, we normally have a file titled something like “properties.txt.tmpl” which is the master definition of the properties file. Each developer would then be responsible for copying that to properties.txt, and making sure that any changes to the .txt.tmpl file were made to their local copy.
Then all we have to do is set Subversion to ignore the properties.txt file, and we don’t get any conflicts.