The proxy recorder currently defaults to creating HTTP Samplers with "Follow redirects" enabled. However the recorded samples include the redirects performed by the browser, so playback will follow the redirect and then send the recorded redirect sample. Possible solutions include: 1) Default to not following redirects. That is easy to do, and the replay will always sample the original redirects. However, if the redirect is not static, the replay is likely to fail. 2) Somehow detect the samples that are the result of a redirect, and drop them from the recorded test (perhaps better, disable them?)
In the meantime, it would help to update the docs.
It's easy to detect a redirect - e.g. using HTTPSampleResult.isRedirect() - however it's not the redirect response sample that needs to be disabled - it's the subsequent samples that are the result of the redirect (and any further redirects). Keeping track of this is a bit trickier.
URL: http://svn.apache.org/r1521679 Log: Proxy recording and redirects Added code to disable redirected samples. Bugzilla Id: 55531 Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/component_reference.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3228