The online community for software testing & quality assurance professionals
Calendar   Today's Topics

Lost Password?


Testing Tools >> Visual Studio Test Edition

Pages: 1

Reged: 06/13/12
Posts: 3
Encrypt Password and UserName in VSTS
      #709816 - 06/13/12 07:24 AM

Hi All,

I am new to VSTS. Trying to create scripts using VSTS 2008. Scenario is I uses a AD account login credential to login to sharepoint application. The recorded script does not show the user name and password in the script both are in encrypted format. As i am bit familiar with load runner i tried recording the same scenario Load runner uses web_set_user to capture the login credentials. Do we have the same kind of option or any work around to decrypt the password in VSTS script.


Post Extras: Print Post   Remind Me!   Notify Moderator  

Reged: 04/24/09
Posts: 395
Loc: San Diego
Re: Encrypt Password and UserName in VSTS [Re: Shankar_Pradeep]
      #709833 - 06/13/12 08:29 AM

It is a security feature. If you need your username and password in plain text then you should hard code them in the login method.


Post Extras: Print Post   Remind Me!   Notify Moderator  

Reged: 06/13/12
Posts: 3
Re: Encrypt Password and UserName in VSTS [Re: kisvacak]
      #709841 - 06/13/12 09:51 AM

Hi Thanks for the reply.
let me make clear the issue what i am facing, There is a SharePoint application with and option to login using Windows and form based authentication.
If I record the script logging in using windows based authentication the script does not record the user name and password form post parameters but the same site if i record using Forms based authentication scripts records user name and password. Below is the piece of code:

Windows Based Authentication script:
request4Body.FormPostParameters.Add("__LASTFOCUS", this.Context["$HIDDEN1.__LASTFOCUS"].ToString());
request4Body.FormPostParameters.Add("__EVENTTARGET", "ctl00$PlaceHolderMain$ClaimsLogonSelector");
request4Body.FormPostParameters.Add("__EVENTARGUMENT", this.Context["$HIDDEN1.__EVENTARGUMENT"].ToString());
request4Body.FormPostParameters.Add("__VIEWSTATE", this.Context["$HIDDEN1.__VIEWSTATE"].ToString());
request4Body.FormPostParameters.Add("__EVENTVALIDATION", this.Context["$HIDDEN1.__EVENTVALIDATION"].ToString());
request4Body.FormPostParameters.Add("ctl00$PlaceHolderMain$ClaimsLogonSelector", "Windows");
request4.Body = request4Body;

Form Based Authentication script:
request3Body.FormPostParameters.Add("__LASTFOCUS", this.Context["$HIDDEN1.__LASTFOCUS"].ToString());
request3Body.FormPostParameters.Add("__EVENTTARGET", this.Context["$HIDDEN1.__EVENTTARGET"].ToString());
request3Body.FormPostParameters.Add("__EVENTARGUMENT", this.Context["$HIDDEN1.__EVENTARGUMENT"].ToString());
request3Body.FormPostParameters.Add("__VIEWSTATE", this.Context["$HIDDEN1.__VIEWSTATE"].ToString());
request3Body.FormPostParameters.Add("__EVENTVALIDATION", this.Context["$HIDDEN1.__EVENTVALIDATION"].ToString());
request3Body.FormPostParameters.Add("ctl00$PlaceHolderMain$signInControl$UserName", "USERNAME");
request3Body.FormPostParameters.Add("ctl00$PlaceHolderMain$signInControl$password", "PASSWORD");
request3Body.FormPostParameters.Add("ctl00$PlaceHolderMain$signInControl$login", "Sign In");

This is a blocker for me to continue with scripting. Please help me to go forward.

Kind Regards,

Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1

Extra information
0 registered and 3 anonymous users are browsing this forum.

Moderator:  AllenGay, RSBarber, AJ 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Topic views: 2411

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5