Forum Discussion
There are several ways you can do this. I would recommend storing the credentials somewhere all projects / suites can access them by creating a shared login utility so you only have to update in one place.
If your tests are all performing the same steps when logging in, that process should not be recreated for each test, that creates a maintenance night-mare, not only for the credentials like you are seeing, but especially if the login process ever changes.
If you create a shared script or keyword test you will only ever have to make a change once, as opposed to however many different tests are logging into the AUT.
- tristaanogre9 years agoEsteemed Contributor
Another possible mitigation is to have those modularized login routines that cunderw described pull from a central file containing the username and password. It would then update the project level variables with the value so that they can continue to function. So, when you go through the process of changing the password every 60 or 90 days, part of that process would be to update that file so that, immediately, your automation will have the latest and greatest information. Of course, that presents some security concerns about having passwords stored somewhere unencrypted but there are ways around that as well.
- nisgupta9 years agoValued Contributor
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
- shiva_ranabhat9 years agoContributor
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
- nisgupta9 years agoValued Contributor
As you mentioned that "storing the credentials somewhere " , what does it mean ? Does testcomplete has the option to store the password outside the project suite ?
Please update
Thanks