You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by "Oliphant, Erich (Contr) (Mission Systems)" <Er...@ngc.com> on 2006/09/19 19:52:30 UTC

HTTP URL rewriting modifier

Hi I am trying to use the http url rewriting modifier in a load
scenario.  The "Session Argument Name" is returned by my application's
pages in  a hidden form variable.  However the modifier doesn't seem to
'see' it, it appends a blank session variable to the URL's even after
the pages with the session var are received.  The docs are a little
light about the specifics/limitations of this modifier.  Should it work
under these circumstances ?

My test has everythign directly under the thread group.  The URL
Rewriting Example in 6.1 of the manual shows the modifier under a Simple
Controller.  Is this required/necessary?

Thanks in advance

Re: Reconnect a closed TCP connection

Posted by sebb <se...@gmail.com>.
Not at present. I suggest you fill in a Bugzilla enhancement request.

On 27/09/06, Marc Anthony Winoto <ma...@netregistry.com.au> wrote:
> I am testing a custom server using a TCP connection and sending commands to it. After processing
> each command, the connection is closed by the server.
>
> At the moment I have 1 thread, and the test running twice. In the 2nd run of the test, the
> thread does not try to reconnect to the server. It does try to send the command though. Is there
> a way to get the TCP Sampler to attempt a reconnect every time?
>
> Marc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Reconnect a closed TCP connection

Posted by Marc Anthony Winoto <ma...@netregistry.com.au>.
I am testing a custom server using a TCP connection and sending commands to it. After processing 
each command, the connection is closed by the server.

At the moment I have 1 thread, and the test running twice. In the 2nd run of the test, the 
thread does not try to reconnect to the server. It does try to send the command though. Is there 
a way to get the TCP Sampler to attempt a reconnect every time?

Marc

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: HTTP URL rewriting modifier

Posted by "Oliphant, Erich (Contr) (Mission Systems)" <Er...@ngc.com>.
Ok will try to extract this case as well as maybe creating a simple page
where it should work 

-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Thursday, September 21, 2006 6:32 PM
To: JMeter Users List
Subject: Re: HTTP URL rewriting modifier

On 21/09/06, sebb <se...@gmail.com> wrote:
> On 20/09/06, Oliphant, Erich (Contr) (Mission Systems) 
> <Er...@ngc.com> wrote:
> > Hi,
> > Here are a few examples from the first page that contains the 
> > session
> > id:
> > --
> > nav_openWindow(url + '?vsess=bkhdbkHfllasinma',windowname, wwidth, 
> > wheight, fs);
>
> It won't find that one.
>
> > window.location="/cgi-bin/wspd_cgi.sh/WService=dts_DEVL11_ws_lrobert
> > s/do 
> > cprep/nu-cleanup.w/vsess=bkhdbkHfllasinma&calledby=nu-navigation";
>
> Nor that.
>
> > <input type="HIDDEN" name="vsess"      value="bkhdbkHfllasinma">
>
> It should find that; I'll double-check that later.

It does find definitions of that format, so I don't know what the
problem is.

Perhaps you can create a Bugzilla issue, and then attach a simple test
plan + jmeter.log.
[You can't attach files until the issue has been created]

> > --
> > The HTML and js on these pages is a little tortured, as you can see 
> > the vsess is defined in serveral places.  Now I also noticed a few 
> > lines like this:
> > --
> > function printDefault(vsess, vchnum ) {
> >
> > var cURL = 'nu-ch-print.w?vsess=' + escape(vsess) + '&p_vchnum=' +
> > escape(vchnum) + '&atime=' + atime.getTime()
> >
> > y.name = "vsess";
> >
> > --
> >
> > Is is possible that one of these is confusing the regexes ?
>
> See above - the extractor only looks for certain kinds of session 
> definition; it definitely does not interpret javascript, so it won't 
> pick up session ids that are generated locally.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: HTTP URL rewriting modifier

Posted by sebb <se...@gmail.com>.
On 21/09/06, sebb <se...@gmail.com> wrote:
> On 20/09/06, Oliphant, Erich (Contr) (Mission Systems)
> <Er...@ngc.com> wrote:
> > Hi,
> > Here are a few examples from the first page that contains the session
> > id:
> > --
> > nav_openWindow(url + '?vsess=bkhdbkHfllasinma',windowname, wwidth,
> > wheight, fs);
>
> It won't find that one.
>
> > window.location="/cgi-bin/wspd_cgi.sh/WService=dts_DEVL11_ws_lroberts/do
> > cprep/nu-cleanup.w/vsess=bkhdbkHfllasinma&calledby=nu-navigation";
>
> Nor that.
>
> > <input type="HIDDEN" name="vsess"      value="bkhdbkHfllasinma">
>
> It should find that; I'll double-check that later.

It does find definitions of that format, so I don't know what the problem is.

Perhaps you can create a Bugzilla issue, and then attach a simple test
plan + jmeter.log.
[You can't attach files until the issue has been created]

> > --
> > The HTML and js on these pages is a little tortured, as you can see the
> > vsess is defined in serveral places.  Now I also noticed a few lines
> > like this:
> > --
> > function printDefault(vsess, vchnum ) {
> >
> > var cURL = 'nu-ch-print.w?vsess=' + escape(vsess) + '&p_vchnum=' +
> > escape(vchnum) + '&atime=' + atime.getTime()
> >
> > y.name = "vsess";
> >
> > --
> >
> > Is is possible that one of these is confusing the regexes ?
>
> See above - the extractor only looks for certain kinds of session
> definition; it definitely does not interpret javascript, so it won't
> pick up session ids that are generated locally.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: HTTP URL rewriting modifier

Posted by "Oliphant, Erich (Contr) (Mission Systems)" <Er...@ngc.com>.
Hi,
In the meantime I've been able to use a regex extractor to get the
session data out of the page.  Of course, I need it in subsequest
requests.  Is there a 'Generic' rewriting modifier or something that
would allow me to easily add the extracted var to all requests ? 

-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Thursday, September 21, 2006 5:48 AM
To: JMeter Users List
Subject: Re: HTTP URL rewriting modifier

On 20/09/06, Oliphant, Erich (Contr) (Mission Systems)
<Er...@ngc.com> wrote:
> Hi,
> Here are a few examples from the first page that contains the session
> id:
> --
> nav_openWindow(url + '?vsess=bkhdbkHfllasinma',windowname, wwidth, 
> wheight, fs);

It won't find that one.

> window.location="/cgi-bin/wspd_cgi.sh/WService=dts_DEVL11_ws_lroberts/
> do cprep/nu-cleanup.w/vsess=bkhdbkHfllasinma&calledby=nu-navigation";

Nor that.

> <input type="HIDDEN" name="vsess"      value="bkhdbkHfllasinma">

It should find that; I'll double-check that later.

> --
> The HTML and js on these pages is a little tortured, as you can see 
> the vsess is defined in serveral places.  Now I also noticed a few 
> lines like this:
> --
> function printDefault(vsess, vchnum ) {
>
> var cURL = 'nu-ch-print.w?vsess=' + escape(vsess) + '&p_vchnum=' +
> escape(vchnum) + '&atime=' + atime.getTime()
>
> y.name = "vsess";
>
> --
>
> Is is possible that one of these is confusing the regexes ?

See above - the extractor only looks for certain kinds of session
definition; it definitely does not interpret javascript, so it won't
pick up session ids that are generated locally.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: HTTP URL rewriting modifier

Posted by sebb <se...@gmail.com>.
On 20/09/06, Oliphant, Erich (Contr) (Mission Systems)
<Er...@ngc.com> wrote:
> Hi,
> Here are a few examples from the first page that contains the session
> id:
> --
> nav_openWindow(url + '?vsess=bkhdbkHfllasinma',windowname, wwidth,
> wheight, fs);

It won't find that one.

> window.location="/cgi-bin/wspd_cgi.sh/WService=dts_DEVL11_ws_lroberts/do
> cprep/nu-cleanup.w/vsess=bkhdbkHfllasinma&calledby=nu-navigation";

Nor that.

> <input type="HIDDEN" name="vsess"      value="bkhdbkHfllasinma">

It should find that; I'll double-check that later.

> --
> The HTML and js on these pages is a little tortured, as you can see the
> vsess is defined in serveral places.  Now I also noticed a few lines
> like this:
> --
> function printDefault(vsess, vchnum ) {
>
> var cURL = 'nu-ch-print.w?vsess=' + escape(vsess) + '&p_vchnum=' +
> escape(vchnum) + '&atime=' + atime.getTime()
>
> y.name = "vsess";
>
> --
>
> Is is possible that one of these is confusing the regexes ?

See above - the extractor only looks for certain kinds of session
definition; it definitely does not interpret javascript, so it won't
pick up session ids that are generated locally.

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


RE: HTTP URL rewriting modifier

Posted by "Oliphant, Erich (Contr) (Mission Systems)" <Er...@ngc.com>.
Hi,
Here are a few examples from the first page that contains the session
id:
--
nav_openWindow(url + '?vsess=bkhdbkHfllasinma',windowname, wwidth,
wheight, fs);

window.location="/cgi-bin/wspd_cgi.sh/WService=dts_DEVL11_ws_lroberts/do
cprep/nu-cleanup.w/vsess=bkhdbkHfllasinma&calledby=nu-navigation";

<input type="HIDDEN" name="vsess"      value="bkhdbkHfllasinma">
--
The HTML and js on these pages is a little tortured, as you can see the
vsess is defined in serveral places.  Now I also noticed a few lines
like this:
--
function printDefault(vsess, vchnum ) {

var cURL = 'nu-ch-print.w?vsess=' + escape(vsess) + '&p_vchnum=' +
escape(vchnum) + '&atime=' + atime.getTime()

y.name = "vsess";

--

Is is possible that one of these is confusing the regexes ?

Thanks!

  

-----Original Message-----
From: sebb [mailto:sebbaz@gmail.com] 
Sent: Wednesday, September 20, 2006 1:37 PM
To: JMeter Users List
Subject: Re: HTTP URL rewriting modifier

On 19/09/06, Oliphant, Erich (Contr) (Mission Systems)
<Er...@ngc.com> wrote:
> Hi I am trying to use the http url rewriting modifier in a load 
> scenario.  The "Session Argument Name" is returned by my application's

> pages in  a hidden form variable.  However the modifier doesn't seem 
> to 'see' it, it appends a blank session variable to the URL's even 
> after the pages with the session var are received.  The docs are a 
> little light about the specifics/limitations of this modifier.  Should

> it work under these circumstances ?

It uses regexes to find the session variable, and perhaps there is a
syntax that has not been allowed for.

Can you provide an example of the HTML that defines the session id?
Not the whole page, just a small chunk that includes the id, e.g.
something like:

<input name='sid' value='myId'>

> My test has everythign directly under the thread group.  The URL 
> Rewriting Example in 6.1 of the manual shows the modifier under a 
> Simple Controller.  Is this required/necessary?
>

No, it's not necessary.

In fact the description is wrong, because the modifier is *not* attached
to the Thread Group. In this case the modifier will only apply to the
samplers under the Simple Controller, i.e. not to the top-level Index
page.
[I'll fix the docs]

See
http://jakarta.apache.org/jmeter/usermanual/build-test-plan.html#scoping
_rules

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Re: HTTP URL rewriting modifier

Posted by sebb <se...@gmail.com>.
On 19/09/06, Oliphant, Erich (Contr) (Mission Systems)
<Er...@ngc.com> wrote:
> Hi I am trying to use the http url rewriting modifier in a load
> scenario.  The "Session Argument Name" is returned by my application's
> pages in  a hidden form variable.  However the modifier doesn't seem to
> 'see' it, it appends a blank session variable to the URL's even after
> the pages with the session var are received.  The docs are a little
> light about the specifics/limitations of this modifier.  Should it work
> under these circumstances ?

It uses regexes to find the session variable, and perhaps there is a
syntax that has not been allowed for.

Can you provide an example of the HTML that defines the session id?
Not the whole page, just a small chunk that includes the id, e.g.
something like:

<input name='sid' value='myId'>

> My test has everythign directly under the thread group.  The URL
> Rewriting Example in 6.1 of the manual shows the modifier under a Simple
> Controller.  Is this required/necessary?
>

No, it's not necessary.

In fact the description is wrong, because the modifier is *not*
attached to the Thread Group. In this case the modifier will only
apply to the samplers under the Simple Controller, i.e. not to the
top-level Index page.
[I'll fix the docs]

See http://jakarta.apache.org/jmeter/usermanual/build-test-plan.html#scoping_rules

---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org