Forum Discussion
As per your statement , I have created the login utility that open the URL and enter the username and password which are pricked from the variables created at the project suite level. I have shared the login utility among the different project suites. But gain if the password changes then I have to go to every project suite to change the password.
How can we store the password unencrypted ? Do Testcomplete has the feature to store the password unencrypted at central place ?
Thanks
NG
I think store the Username & Password in an external file (excel, open office etc). Lets say they have columns Username, Password, New Password.
You have your generic function in the project to login.
Login(Username, Password){
// Read from external file
// Enter Username, Password & Submit
// If your password has expired message{
Change_Password (Password, New Password)
}
// your normal code.. to home page.
}
// function to change password
Change_Password (Current Password, New Password){
//
}
This way you will only change your external file's Password & New Password fields every 6 months and don't have modify any TestComplete variables for those many Project suites.
- nisgupta9 years agoValued Contributor
Storing the password in external file. is not the recommended option that our department want as in the external file password is not encrypted. Wherever we are storing the password it should be encrypted .
Does Testcomplete has the feature where we can store the password in one place and then all the project suite will access it. Right now I can see the testcomplete allow to define project suite variable but is there something that can be defined outside the project suite .. may be a global variable and all the project suite can access it ?
Please update
Thanks
Nishchal
- cunderw9 years agoCommunity Hero
Create a login keyword test outside of the rest of the projects / suites.
Store your credentials as a variable inside the keyword test (using password for the type of the password variable).
Add the login keyword test as an existing item to all projects that require logging in.
Call that keyword test in all tests.
Now when the credentials change, you can update it in the single keyword tests and all projects that call it will use the new credentials.
Alternatively you could encode the credentials in a text file, environment variable etc... read in the encoded password, and decode it at run time to type it in.
- tristaanogre9 years agoEsteemed Contributor
In the project or project suite, on the "Temporary Variables" panel, you can add a variable as a "password" type which will store passwords as encrypted. You can then call that password variable in either a Keys or SetText call elsewhere and TestComplete will unencrypt it. When posting this to the log, all it will say is that the password was entered.
As for populating that variable externally... I'm a bit confused... you say you want TestComplete to store that password outside of the project... but you don't want the password stored in any plain-text files. The password variable type is your best bet but, in the meantime, you'll still need to find someway of updating that value... either by manually editing the project when you update the password or using any of the suggestions already made here.