简体   繁体   中英

JMeter and double equals signs (==) in viewstate

I'm using JMeter to loadtest a ASP .NET web application but I get problems when viewstate
contains double equals signs (==) at the end of the string.
I extract the viewstate from the previous get-request with a Regular Expression Extractor and have
verified in Debug Sampler that my parameter contains the double equals signs, but when posting
the viewstate value ${viewstate1} with the __VIEVSTATE parameter the double equals signs are
removed from the request.

How can I include the equals signs in the request so that I get a valid viewstate? Is there perhaps a pre/post processor I can use to add the missing equals signs? Examples?

After running the requests through fiddler and comparing results from JMeter requests and browser requests I found that the problem was not with the double equals signs, but with an extra space at the end of the viewstate. The extra space was added because the template in my Regular Expression Extractor had a space after $1$ . Removing this space from the template fixed the viewstate and my requests came through.

The reason for targeting the double equals signs as the problem was that under the Request tab of the View Results Tree I only looked at the parameter values on the HTTP tab. On the tabular display on the HTTP tab the equals signs do not show, but on the Raw tab they show as %3D%3d (ie ==).

Since I found the answer to my own question I could have deleted it, but I chose to post my findings with the regular expression templates in case some one else accidentally adds a space in that textbox.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM