Discussion Forum

Welcome to the Discussion Forum, we encourage you to REGISTER on our forum and participate in the debate.For more details Click here

Online Advertising

Viewers now you can promote Your Websites/Blogs/Products by using our online advertising program.Using this feature you can place your Ads in my blog and can attract the people logging over here.To place your ads, just sign in my Guest Book and leave your details over there.

Tuesday, June 23, 2009

PDF File Verification in OpenSTA

To begin with, OpenSTA emulates browser traffic, it does not run a real browser. The only evidence you will have that the server has produced the PDF file is that a link to it, a url, will be returned as the result of a get or post. Next, when you click on that link, opensta records the browser fetching the file.

So, when playing back a script, you have to first be sure the file name of the pdf doesn't change... if it does, you need to correlate it. Next you find the GET statement that retrieves the PDF file. Consider either checking the status returned to be sure its 200 or perhaps loading the response (load response_info body on ) and verifying the first few bytes to see if it contains the right text (something like %PDF should appear in the text).

Thursday, June 11, 2009

Text Verification script in OpenSTA

Consider that we need to check whether the particular page gets loaded while executing the application under test by OpenSTA..
For the above scenario let us derive a script,
Place the following code below the url where we would like to verify the text,
SET VER_STRING = "Your Search Text goes here"
LOAD RESPONSE_INFO BODY ON 2 INTO VER_BODY
Log VER_BODY
!HTML response body content will be stored in the above variable.
SET VER_LOCATION = ~LOCATE (VER_STRING,VER_BODY), CASE_BLIND
!Location of the string you searched will be stored in the above variable.
SET L2 = ~EXTRACT(VER_LOCATION, 62, VER_BODY)
Log L2
!Text searched for verification will be stored in the above variable.
IF (VER_LOCATION >= 0) THEN
LOG "Verification SUCCES - Page contained the string '", VER_STRING , "'"
ELSE
LOG "Verification FAILED - Page did not contain the string '", VER_STRING , "'"
ENDIF

Note:
2 refers to Connection Id and
62 refers to the length of yor search string.
Free advertising


Lowes Coupon
How to Blog

Free Advertising