The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> OpenSTA

Pages: 1
vennela222
Newbie


Reged: 10/31/11
Posts: 7
how login page will be validated in OpenSTA
      #690977 - 11/14/11 07:09 AM

i recorded the login page with the valid username and password. Later i modified the script with invalid username and password then i ran the script. But the script got passed. Could you please suggest me how OpenSTA will validate the Login Page?

Post Extras: Print Post   Remind Me!   Notify Moderator  
Bernie VelivisModerator
Moderator


Reged: 06/02/03
Posts: 1604
Loc: Hollis, NH, USA
Re: how login page will be validated in OpenSTA [Re: vennela222]
      #691134 - 11/15/11 07:13 AM

You can validate that a request has returned expected results by looking at the http status code (if > 400, usually it did not work). Even if you get a 200 code back, there still could be an error. Only way to be sure is to search for a string in the response that indicates success.

for example;

PRIMARY GET URI "http://www.opensta.org/ HTTP/1.0" ON 2 &
HEADER DEFAULT_HEADERS &
,WITH {"Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, " &
"application/x-shockwave-flash, application/vnd.ms-excel, application/vnd.ms-powerpoint, " &
"application/msword, */*", &
"Accept-Language: en-us", &
"Connection: Keep-Alive"} &
,WITHOUT {"Referer"}

load response_info body on 2 into buffer
!log buffer

set successString = "OpenSTA Users Home Page"

set offset = ~locate(successString, buffer), CASE_BLIND
if (offset = -1) then
Log "VERIFY RESULTS FAILED! Couldnt find ",successString ," in ", buffer
exit
endif

This technique is somewhat limited by the maximum variable size (for the variable BUFFER in this example), which is 64Kb.

--------------------
Bernie Velivis, Performax Inc
Bernie's blog


Post Extras: Print Post   Remind Me!   Notify Moderator  
vennela222
Newbie


Reged: 10/31/11
Posts: 7
Re: how login page will be validated in OpenSTA [Re: Bernie Velivis]
      #691391 - 11/17/11 04:18 AM

Thank you very much Bernie

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



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

Moderator:  SteveKay, AJ, dansut, Bernie Velivis 

Print Topic

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

Rating:
Topic views: 1994

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5