Hi Andrey, I've encountered you're situation as well in different circumstances:
I have to test something like http://localServer1:port1/folder1/<various actions i want to test> However, the programmers change localServer1 and folder1 ALL THE TIME due to the various branches of the application. Therefore, when I record the test plan with the Proxy Server, - add User Defined Variable in the test plan or in the workbench (doesn't matter) |- add a variable like basePath = "folder1" Now, all the samples recorded are like: http://${server}:${port}/${basePath}/<whatever needs to be tested> - note that the proxy server substitutes actual text found in the requests from the browsers with the variable that has such a value... therefore, I figure out all the variables I need to use in the test script and when I record I make sure I have them all in the User Defined Variable with the correct value. >From now on, when a new branch of the application is launched, they change the folder1 to folderX and I only have to change one variable. This makes things a lot easier then to edit all samples with a text editor (or manually). Don't know if this is what you were looking for, but I doubt there is a better way than this. On Wed, Aug 19, 2009 at 10:40 AM, Andrey Simonov<[email protected]> wrote: > >> That's how the default works - if the sampler path field is empty, the >> default is used, otherwise the path is used. > > Well, that's where we've started! > > Quote from the first thread: > >> >> >> So is there any way not to specify folder1/folder2 all the time? > > > > sebb-2-2 wrote: >> >> On 18/08/2009, Andrey Simonov <[email protected]> wrote: >>> >>> > What did you expect to happen? >>> > What actually happened? >>> >>> >>> 1. I've created HTTP Req Def element to Test Plan >>> 2. Entered Server Name and server port >>> 3. Entered Default folder "/folder1/" >>> >>> Then I've created a HTTP sampler with the following details: >>> >>> blank server name >>> blank server port >>> folder = /folder2/page >>> >>> The actual HTTP request was: >>> >>> server:port/folder2/page >>> >>> I was expecting the request to be: >>> >>> sever:port/folder1/folder2/page >>> >> >> Thanks for the clear description. >> >> That's how the default works - if the sampler path field is empty, the >> default is used, otherwise the path is used. >> >> This is the same behaviour as for the host field - e.g. if the default >> host is "hostA", and the sampler has the host "hostB" you would not >> expect the sampler to try to contact "hostAhostB". >> >> Of course, the path is different from the host, port and protocol >> fields, and it would be possible to combine the default with the >> current sampler and get a sensible value. >> >> However, that's not the way original code was designed (before my time). >> >>> >>> sebb-2-2 wrote: >>> > >>> > On 18/08/2009, Andrey Simonov <[email protected]> wrote: >>> >> >>> >> > Yes, try it. >>> >> >>> >> I have tried it, it did not work. That is exactly the reason why I >>> have >>> >> created this post. >>> > >>> > Well, it works for me. Just tried it. >>> > >>> > What did you expect to happen? >>> > What actually happened? >>> > >>> >> >>> >> >>> >> sebb-2-2 wrote: >>> >> > >>> >> > On 18/08/2009, Andrey Simonov <[email protected]> wrote: >>> >> >> >>> >> >> Hello, >>> >> >> >>> >> >> I have a question regarding HTTP Request Defaults - is there any >>> way >>> >> to >>> >> >> specify a default folder in this element or anywhere else? >>> >> >> >>> >> >> Currently only server name and port are defaulted. But all my >>> server >>> >> >> requests go like >>> >> >> >>> >> >> server:port/folder1/folder2 >>> >> >> >>> >> >> So is there any way not to specify folder1/folder2 all the time? >>> >> > >>> >> > Yes, try it. >>> >> > >>> >> >> From Help on 'HTTP Request Defaults' element: >>> >> >> Note that the path is the default for the full path, not a >>> prefix to >>> >> be >>> >> >> applied to paths specified on the HTTP Request screens. >>> >> > >>> >> > That means that if the default is >>> >> > >>> >> > /folder1/folder2 >>> >> > >>> >> > then a sampler which uses >>> >> > >>> >> > /folder7 >>> >> > >>> >> > will use /folder7, not /folder1/folder2/folder7 >>> >> > >>> >> > When in doubt, try it out. You can use the mirror server to check >>> what >>> >> is >>> >> > sent. >>> >> > >>> >> >> -- >>> >> >> View this message in context: >>> >> >> >>> >> >>> http://www.nabble.com/HTTP-Request-Defaults---specify-default-folder-tp25028940p25028940.html >>> >> >> Sent from the JMeter - User mailing list archive at Nabble.com. >>> >> >> >>> >> >> >>> >> >> >>> >> --------------------------------------------------------------------- >>> >> >> To unsubscribe, e-mail: >>> [email protected] >>> >> >> For additional commands, e-mail: >>> [email protected] >>> >> >> >>> >> >> >>> >> > >>> >> > >>> --------------------------------------------------------------------- >>> >> > To unsubscribe, e-mail: [email protected] >>> >> > For additional commands, e-mail: >>> [email protected] >>> >> > >>> >> > >>> >> > >>> >> >>> >> >>> >> -- >>> >> View this message in context: >>> >> >>> http://www.nabble.com/HTTP-Request-Defaults---specify-default-folder-tp25028940p25029424.html >>> >> >>> >> Sent from the JMeter - User mailing list archive at Nabble.com. >>> >> >>> >> >>> >> >>> --------------------------------------------------------------------- >>> >> To unsubscribe, e-mail: [email protected] >>> >> For additional commands, e-mail: [email protected] >>> >> >>> >> >>> > >>> > --------------------------------------------------------------------- >>> > To unsubscribe, e-mail: [email protected] >>> > For additional commands, e-mail: [email protected] >>> > >>> > >>> > >>> >>> -- >>> >>> View this message in context: >>> http://www.nabble.com/HTTP-Request-Defaults---specify-default-folder-tp25028940p25030787.html >>> >>> Sent from the JMeter - User mailing list archive at Nabble.com. >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: [email protected] >>> For additional commands, e-mail: [email protected] >>> >>> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> >> > > -- > View this message in context: > http://www.nabble.com/HTTP-Request-Defaults---specify-default-folder-tp25028940p25039276.html > Sent from the JMeter - User mailing list archive at Nabble.com. > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

