Using Project/ProjectSuite password variables in other places than SetText or Keys
So we wanted to make our test data a bit more secure an decided to move the login password strings to the project variables and make it a password, so that it is encrypted and not hardcoded in our script unit anymore.
I wanted to do the same thing with the password we use to access the application's SQL database, but found out it didn't work. After reading the information I noticed password variables only work for SetText and Keys.
Is there a workaround within TestComplete to also make it work when the password is used in another way?
For example when using it to set an SQL connection string.
Here's what we use:
function getDBConnectionString(){ return 'MultiSubnetFailover=True;Provider=SQLOLEDB.1;Persist Security Info=False;Database=' + SMF.SQLUtilities.databaseName + ';Server=tcp:' + SMF.SQLUtilities.SQLServerName + ',1433;User Id=testcomplete;Password = ' + Project.Variables.SQLpassword.DecryptedValue; }
It doesn't actually decrypt into plain text on screen, it just passes the Decrypted value through. No where does that actual value get exposed unless I were to write that string out to a log or something.