Encrypting Passwords in Test Studio

Tuesday, August 28, 2012 by Jim Holmes | Comments 2

Using safe, generic accounts for testing is a boon; however, sometimes that’s simply not possible. Corporate policies may prevent “fake” accounts, or perhaps the test accounts have access to sensitive areas. In these cases it’s critical you’re able to secure the logon credentials.

Test Studio’s Service Pack 2 for our 2012 R1 release now enables you to securely encrypt passwords in your tests with just a simple click.

Here’s how a test logging on to our demo app looks. You can see the password is stored in clear text in the test:

image

The password is also stored in clear text in the XML for the test file itself:

image

Encrypting the password is a snap. Select the step with the password, and pull down  the Encrypt property. Set it to True and save the file. (NOTE: Changes are not persisted to your test’s XML file until you save the test!)image

You’ll see the test step update to remove the clear text.

image

The backing XML information is also now encrypted:

image

A few important notes:

  • Encryption is via the standard .NET library and is implemented with the AES algorithm.
  • Encrypting a test step changes that step’s properties to read only. You can’t update the password after you’ve saved the encrypted step. You’ll need to re-record that step.

We hope you find this new feature useful in your testing!

About the author

Jim Holmes

Jim Holmes

has around 25 years IT experience. He is co-author of "Windows Developer Power Tools" and Chief Cat Herder of the CodeMash Conference. He's a blogger and evangelist for Telerik’s Test Studio, an awesome set of tools to help teams deliver better software. Find him as @aJimHolmes on Twitter.

2  comments

  • Praveen Anasuri 14 Jun 2013
    This is nice, I can use encrypted password in the test script. I am also looking for a way to add encrypted password in Local Data?

    Please let me know.
  • Jim Holmes 14 Jun 2013
    @Praveen: There's currently no way to encypher data from sources. One thing you might consider doing is creating separate login scripts for different user accounts and encyphering the credentials in those separate scripts.

Add comment

  1. Formatting options
       
      
     
     
       
  2. (optional, emails won't be shown on public pages)
  3. (optional)