Forum Discussion

mahendra_1's avatar
mahendra_1
Occasional Contributor
14 years ago

HOw to modify recorded http traffic to rerun again

hi,



I am new to testComplete load testing. I have recored a scenario and while play back it executes with few warnings, but nothing has happended at applicantion end if I manually navigate to application and check. I always thorws the below warnings

1. Request #1 of connection #2 of the virtual user Task (1) completed with warnings.

2. Request #2 of connection #2 of the virtual user Task (1) completed with warnings.



How do I modify the HTTP traffic recored and rerun the script.





Thanks in Advance,

Mahendra

4 Replies

  • mahendra_1's avatar
    mahendra_1
    Occasional Contributor
    Hi Allen,



    Thanks for the support. I was able to validate the server request body with the recored traffic for a request and its same.

    But I am having issue with ASP.NET hidden values like __VIEWSTATE. In one my reuest requestbody has a __VIEWSTATE and that is the reson my test is failing.

    I went thorugh teh help for " Atuo-Updating Page Parameters". But I could not understand it how to implement.  How do I use the dynamically generated VIEWSTAE using regular espression.

    It would be great if you can help in this or provide me a sample, so that I can follow the same.

    _VIEWSTATE sample :

    "C4zskF0Uc6s2V1sYCsQQADL8Sm3XH9eye1Z9NhUmMp0iBXZrzXTzml0yU12BLZxvw188x4H7H4hewrup6YELeQvPDwavTrWiIufcG7cPqoYT0MgrkCnG6F3kpNMLmAfgy2+X5UmCmB88NsNURgeTANBXinQ8OUn2Q7XcV0ukDCbn4DQorxq6mZ6b5IGY2bIxHWjIY3VjRrGotk8q3AzQ1V5WFxTtI80WHpYn2OqX6MeWmJNEvhKPeKvhg5rEtNpnOejF2PlFkn3eCvmGwS/pyvILQfJkapQPOumaZpzdcaEPbuxGW/QuUbGCn0yNGUkcma4ubImSwd+PnggzGJ6u4nhqd2EL+q7FxqJFVlnH8ynObYWzTZsy2gTWbOl32HtBxDPOpvpjwp6Y3yNtP9htV9PS3lvpSf4LKj8RTXwuMnKRVtFD8/Hsys/KkIM9c08i7zXdB7IPyTBLfbkrsVQWXX0DN/lYBoVU9dmQdV4rZYLFxsxN3t+/sKUQPSV0YKSLo1NVwmnTGSrZuVXcarHYC2l5qYGNj7V+FLTzLbmiNuZw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+KPfsQJaxwqsfg08NvLfd8lTvXDETjPtVHxZFDOq8F48vv+ze7ThC58Cbz4j7OZZMgOl6YmMfahCOLZuwbBWtG0pS7x7Xqyfu0gilDNZZDa4Euhm8ZBGQvrbxbbHbg8OUsJwPTeKnqudhnpFmEoF2zoVWq2KukI1t+ldnLFbXslXtKPwbzTMTSPK/ZD+l9WelIuAQYzrnn6J+qw2a7UvhBtRMvMIzXFW1WfPqvTJL1WhWpx1mCuR9LvK+UKvMpx4zdrA1aOrsig3QrUDtDyrXWXXBQVR67fqnq0LVhI/35VNqlhbuz2NFYTiWoYPN4+a+PuSTS/JGkiG1tNt6gJv2fwdVxiyQP3+EhDE5Aw29C5zr98x893jQ43yBuiyS9z3yQUKr/s6gQcYjUBpZ/UwYS5"

  • Hi Mahendra,





    Here are the auto-updated parameters for common ASP.NET variables:





    Name: __VIEWSTATE

    Regular Expression: \sname\s*?\=\s*?"__VIEWSTATE"[^^]*?\svalue\s*?\=\s*?"(.*?)"[^^]*?>

    Replacing Mask: $1





    Name: __EVENTVALIDATION

    Regular Expression: \sname\s*?\=\s*?"__EVENTVALIDATION"[^^]*?\svalue\s*?\=\s*?"(.*?)"[^^]*?>

    Replacing Mask: $1





    Here, the Name field refers to an URL or body variable name (that is, a parameter of a GET or POST request). The regular expression is applied to the body of responses sent by your web server (that is, to the HTML markup returned by the server in general case). Since the __VIEWSTATE value is written in a hidden input tag, the particular regular expression retrieves a tag whose "name" attribute equal to "__VIEWSTATE" and gets the value of the "value" attribute from the same tag - that is, retrieves the viewstate value. The Replacing Mask field specifies the new value of the __VIEWSTATE URL or Body parameter which should be inserted instead of the recorded value. The value can be either a hard-coded string or (which is a more common case) a string retrieved from an actual server response via a regular expression (as in the sample above). The "$1" string means that the recorded value should be replaced with the value retrieved from the first regular expression match group (note the parentheses in the regular expression above - the value in parentheses is the value which will be retrieved from the actual HTML and inserted in HTTP requests).