You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Dominik Karall <do...@gmail.com> on 2007/08/09 15:37:39 UTC

empty variables in some cases

hi,
I'm using jmeter to test some servlets on our webapplication server.
The servlets respond with xml code and I extract variables from that
by XPath. The problem is, that in some cases the variables are empty
when I use them in some request situation.
The following structure works:
Thread Group
 - Create Reseller
   - create request
   - xpath -> rorgid
   - Loop (Create Provider)
     - create request (with rorgid var)
     - xpath -> porgid
   - create service request (with rorgid var)
   - request with porgid

But when I move "create service request" up before loop, then the
provider create request doesn't get the rorgid value any more. The
same happens when I move "create service request" after the "xpath ->
porgid" element, the "request with porgid" gets an empty variable.

I'm using svn version 556204 from nightly builds.

cheers,
dominik

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


Re: empty variables in some cases

Posted by sebb <se...@gmail.com>.
Post-Processors are run after every sampler in scope, so unless you
add them as a child, they may be applied to more samples than you
want.

On 10/08/07, Dominik Karall <do...@gmail.com> wrote:
> hi sebb,
> thanks for your help! It works now :)
> The mistake was, that we used the XPath extractor directly after the
> request. After a few tests, we find out that the XPath extractor must
> be used as child of the request, otherwise the results gets lost when
> used once. (I'm not sure if that is a bug or expected?)
>
> cheers,
> dominik
>
>
> 2007/8/9, sebb <se...@gmail.com>:
> > The test plan is not entirely clear to me, but it sounds like it
> > should work. I suggest you:
> >
> > 1) Check the JMeter log file for any errors
> >
> > 2) Ensure that you use a default value to catch any XPath match
> > failures - the variable should then be set, even if it is to the wrong
> > value. If not, investigate further.
> >
> > 3) Try adding a Java Request sampler to display the value of the
> > variable at various points,
> >
> >
> > On 09/08/07, Dominik Karall <do...@gmail.com> wrote:
> > > hi,
> > > I'm using jmeter to test some servlets on our webapplication server.
> > > The servlets respond with xml code and I extract variables from that
> > > by XPath. The problem is, that in some cases the variables are empty
> > > when I use them in some request situation.
> > > The following structure works:
> > > Thread Group
> > >  - Create Reseller
> > >   - create request
> > >   - xpath -> rorgid
> > >   - Loop (Create Provider)
> > >     - create request (with rorgid var)
> > >     - xpath -> porgid
> > >   - create service request (with rorgid var)
> > >   - request with porgid
> > >
> > > But when I move "create service request" up before loop, then the
> > > provider create request doesn't get the rorgid value any more. The
> > > same happens when I move "create service request" after the "xpath ->
> > > porgid" element, the "request with porgid" gets an empty variable.
> > >
> > > I'm using svn version 556204 from nightly builds.
> > >
> > > cheers,
> > > dominik
> > >
> > > ---------------------------------------------------------------------
> > > 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
> >
> >
>
> ---------------------------------------------------------------------
> 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: empty variables in some cases

Posted by Dominik Karall <do...@gmail.com>.
hi sebb,
thanks for your help! It works now :)
The mistake was, that we used the XPath extractor directly after the
request. After a few tests, we find out that the XPath extractor must
be used as child of the request, otherwise the results gets lost when
used once. (I'm not sure if that is a bug or expected?)

cheers,
dominik


2007/8/9, sebb <se...@gmail.com>:
> The test plan is not entirely clear to me, but it sounds like it
> should work. I suggest you:
>
> 1) Check the JMeter log file for any errors
>
> 2) Ensure that you use a default value to catch any XPath match
> failures - the variable should then be set, even if it is to the wrong
> value. If not, investigate further.
>
> 3) Try adding a Java Request sampler to display the value of the
> variable at various points,
>
>
> On 09/08/07, Dominik Karall <do...@gmail.com> wrote:
> > hi,
> > I'm using jmeter to test some servlets on our webapplication server.
> > The servlets respond with xml code and I extract variables from that
> > by XPath. The problem is, that in some cases the variables are empty
> > when I use them in some request situation.
> > The following structure works:
> > Thread Group
> >  - Create Reseller
> >   - create request
> >   - xpath -> rorgid
> >   - Loop (Create Provider)
> >     - create request (with rorgid var)
> >     - xpath -> porgid
> >   - create service request (with rorgid var)
> >   - request with porgid
> >
> > But when I move "create service request" up before loop, then the
> > provider create request doesn't get the rorgid value any more. The
> > same happens when I move "create service request" after the "xpath ->
> > porgid" element, the "request with porgid" gets an empty variable.
> >
> > I'm using svn version 556204 from nightly builds.
> >
> > cheers,
> > dominik
> >
> > ---------------------------------------------------------------------
> > 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
>
>

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


Re: empty variables in some cases

Posted by sebb <se...@gmail.com>.
The test plan is not entirely clear to me, but it sounds like it
should work. I suggest you:

1) Check the JMeter log file for any errors

2) Ensure that you use a default value to catch any XPath match
failures - the variable should then be set, even if it is to the wrong
value. If not, investigate further.

3) Try adding a Java Request sampler to display the value of the
variable at various points,


On 09/08/07, Dominik Karall <do...@gmail.com> wrote:
> hi,
> I'm using jmeter to test some servlets on our webapplication server.
> The servlets respond with xml code and I extract variables from that
> by XPath. The problem is, that in some cases the variables are empty
> when I use them in some request situation.
> The following structure works:
> Thread Group
>  - Create Reseller
>   - create request
>   - xpath -> rorgid
>   - Loop (Create Provider)
>     - create request (with rorgid var)
>     - xpath -> porgid
>   - create service request (with rorgid var)
>   - request with porgid
>
> But when I move "create service request" up before loop, then the
> provider create request doesn't get the rorgid value any more. The
> same happens when I move "create service request" after the "xpath ->
> porgid" element, the "request with porgid" gets an empty variable.
>
> I'm using svn version 556204 from nightly builds.
>
> cheers,
> dominik
>
> ---------------------------------------------------------------------
> 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