Summary: | HTTP URL-Rewriting Modifier doesn't work with path set in HTTP Request Default | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Stefan Reinhold <octi73> |
Component: | HTTP | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P2 | ||
Version: | 2.0.1 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP | ||
Attachments: | Testcase |
Description
Stefan Reinhold
2004-11-22 12:30:36 UTC
Created attachment 13517 [details]
Testcase
The attached testplan has two HTTP Request Default elements; these are both in the scope of all the HTTP Samplers. It would be better to combine these, as there's no guarantee which one will be applied first. May I suggest that you try the test again with a single HTTP Request Default element? This might fix the problem. (In reply to comment #2) > The attached testplan has two HTTP Request Default elements; these are both in > the scope of all the HTTP Samplers. It would be better to combine these, as > there's no guarantee which one will be applied first. The had the inner HTTP Request Default elements disabled and it didn't work either. Now I tested it again with removing it. So I had only one request default element with all the information including path and the bug was still alive. By the way having the two request default elements worked perfectly when I disabled the URL-rewriting modifier. > > May I suggest that you try the test again with a single HTTP Request Default > element? This might fix the problem. After debugging a bit I noticed that swapping two lines in org.apache.jmeter.threads.TestCompiler.configureSampler(Sampler) solved the problem for me. When configureWithConfigElements(sampler, pack.getConfigs()); goes before runPreProcessors(pack.getPreProcessors()); then the substitution is done correctly. Excerpt from revision 1.42 with my change applied: public SamplePackage configureSampler(Sampler sampler) { //NOTREAD currentSampler = sampler; SamplePackage pack = (SamplePackage) samplerConfigMap.get(sampler); pack.setSampler(sampler); configureWithConfigElements(sampler, pack.getConfigs()); runPreProcessors(pack.getPreProcessors()); //replaceStatics(ret); return pack; } I did not verify this change with the latest Nightly Build but with release 2.0.2. Regards, Stefan I think you've hit the nail on the head. Makes sense to apply the Config elements before the Pre-Processors. I've committed the change to the 2.0 branch. This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1473 |