简体   繁体   中英

In JMeter, Getting “Object moved here” response for login post request while performing Load test in Asp.net Web app

I have performed Load testing in Asp.net application using JMeter. While login, am getting "Object Moved Here" message as response.

In View result tree, I found Login main sampler displaying with two sub samplers. In that one sub sampler is with the "Object Moved Here" message.

In my test plan, I have handled - CSS/JQUERY Extractor to extract dynamic values "Event validation" & "View State" - HTTP Cookie manager(Checked "Clear cookies each iteration" & Cookie policy: Compatibility)

Note: Except the Login functionality request & response, all the other HTTP samplers in my test plan are worked as expected.

Anybody have any solution for this?

Well-behaved JMeter test should do exactly what real browser is doing , to wit:

  • send the same HTTP requests as real browser does
  • handle "embedded resources" (images, scripts, styles, fonts) like real browser does
  • properly mimic AJAX requests
  • simulate browser headers , cache and cookies

In particular your case Object moved here request stands for a HTTP Redirect , to wit first request gets 3xx status code and being pointed to another location.

You should verify what real browser is doing using Network tab of its developer tools and ensure that JMeter is doing the same. If the browser is not doing the redirect you can explicitly tell JMeter not to follow the redirects by unticking Redirect Automatically and/or Follow Redirects boxes in the HTTP Request sampler

JMeter关注重定向

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