jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Deepak Shetty <shet...@gmail.com>
Subject Re: Wait for Text to show up before moving on
Date Wed, 12 Aug 2009 21:22:45 GMT
oh ok i get it now..

On Wed, Aug 12, 2009 at 2:10 PM, sebb <sebbaz@gmail.com> wrote:

> On 12/08/2009, Deepak Shetty <shettyd@gmail.com> wrote:
> > yes but theres no way to do that in this case other than checking that
> the
> >  value doesn't begin with a '$' right? (because undefined variables would
> >  resolve as ${var} ) , in which case the condition doesnt read well...
>
> ${var}
>
> works fine as a While Condition, so long as it eventually becomes "false".
>
> >  so
> >  while
> >    ${__javaScript("${match}".substring(0,1) =="$" ||
> >  "${match}"=="wait_spin.gif")}
> >  Is there any other way?
>
> Yes, use the condition
>
> ${var}
>
> and set up the Regex PostProcessor to return "false" when the wait is over.
>
> >  I prefer the readability of an explicit initialisation
>
> It will need to be reset if the loop is to be repeated.
>
> >  regards
>
> > deepak
> >
> >
> >
> >  On Wed, Aug 12, 2009 at 11:15 AM, sebb <sebbaz@gmail.com> wrote:
> >
> >  > On 12/08/2009, Deepak Shetty <shettyd@gmail.com> wrote:
> >  > > also I suppose you need to initalise the value of ${match}
> >  >
> >  > Not necessary, so long as it is not "false".
> >  >
> >  > >  OR have your condition as
> >  > >  ${__javaScript("${match}" != "wait_spin.gif")}
> >  > >  so that the initial value is irrelevant
> >  > >
> >  > >  One question.. how does the browser do this ? does it continuously
> >  > refresh
> >  > >  (in which case your test is correct) or does it wait for the
> response of
> >  > an
> >  > >  AJAX call (in which case you probably shouldnt implement your test
> in
> >  > this
> >  > >  way)
> >  > >
> >  > >  regards
> >  > >
> >  > > deepak
> >  > >
> >  > >
> >  > >  On Wed, Aug 12, 2009 at 10:31 AM, sebb <sebbaz@gmail.com> wrote:
> >  > >
> >  > >  > On 12/08/2009, hoffm11 <hoffm11@gmail.com> wrote:
> >  > >  > >
> >  > >  > >
> >  > >  > >  ok.  I have a page that has wait_spin.gif in the body.  Once
> the
> >  > page is
> >  > >  > >  done processing, wait_spin.gif goes away and the result set
is
> >  > returned.
> >  > >  > >
> >  > >  > >  In my while loop, I have
> >  > >  > >
> >  > >  > >  While (condition:  ${match})
> >  > >  > >  - HTTP Request
> >  > >  > >  -- RegEx Extractor
> >  > >  > >  ----reference name:  match
> >  > >  > >  ----reg Ex:  (wait_spin\.gif)
> >  > >  > >
> >  > >  > > ----Template:  $1$
> >  > >  > >  ----Match No. 1
> >  > >  > >
> >  > >  > > ----default value:  NO VALUE
> >  > >  > >
> >  > >  > >  Evethough wait_spin.gif doesn't show up it still stays in
the
> while
> >  > >  > loop.
> >  > >  > >
> >  > >  > >  What the heck am I not doing right?
> >  > >  > >
> >  > >  >
> >  > >  > As I wrote already, the While Controller condition needs to
> evaluate
> >  > >  > to "false" in order to exit the loop.
> >  > >  >
> >  > >  > As far as I can tell, ${match} will be equal to "NO VALUE" or
> >  > >  > "wait_spin.gif".
> >  > >  >
> >  > >  > Neither of these is the same as "false".
> >  > >  >
> >  > >  > >
> >  > >  > >
> >  > >  > > sebb-2-2 wrote:
> >  > >  > >  >
> >  > >  > >  > On 12/08/2009, hoffm11 <hoffm11@gmail.com> wrote:
> >  > >  > >  >>
> >  > >  > >  >>  Um, I am confused why this isn't valid?  I thought
you can
> just
> >  > >  > specify
> >  > >  > >  >> the
> >  > >  > >  >>  variable in the condition?
> >  > >  > >  >
> >  > >  > >  > Of course, but the condition has to evaluate to "false"
in
> order
> >  > to
> >  > >  > >  > exit the loop.
> >  > >  > >  > See the documentation.
> >  > >  > >  >
> >  > >  > >  >>  I expect it to exit the while loop once the text
"Total
> Number
> >  > >  > Returned"
> >  > >  > >  >> is
> >  > >  > >  >>  return and then continue on with the rest of the
script.
>  The
> >  > >  > >  >> application
> >  > >  > >  >>  uses a lot of ajax stuff and this is the only why
I can
> get
> >  > this to
> >  > >  > >  >> work.
> >  > >  > >  >>
> >  > >  > >  >>  Can you give me an example on how this can be done
and
> what I
> >  > am
> >  > >  > doing
> >  > >  > >  >>  incorrect?
> >  > >  > >  >>
> >  > >  > >  >>
> >  > >  > >  >>
> >  > >  > >  >>
> >  > >  > >  >>  sebb-2-2 wrote:
> >  > >  > >  >>  >
> >  > >  > >  >>  > On 12/08/2009, hoffm11 <hoffm11@gmail.com>
wrote:
> >  > >  > >  >>  >>
> >  > >  > >  >>  >>  Alright here is what I have.
> >  > >  > >  >>  >>
> >  > >  > >  >>  >>  While Controller  (Condition..  ${match}
> >  > >  > >  >>  >
> >  > >  > >  >>  > That is not a valid condition, see:
> >  > >  > >  >>  >
> >  > >  > >  >>  >
> >  > >  > >  >>
> >  > >  >
> >  >
> http://jakarta.apache.org/jmeter/usermanual/component_reference.html#While_Controller
> >  > >  > >  >>  >
> >  > >  > >  >>  >>  - Regex Expression
> >  > >  > >  >>  >>   -  Ref Name:  match
> >  > >  > >  >>  >>   -  Reg Ex:  Total Number Returned
> >  > >  > >  >>  >>   - Template:  $1$
> >  > >  > >  >>  >>   -  Match No.  1
> >  > >  > >  >>  >>   -  Default value:  NO VALUE
> >  > >  > >  >>  >>
> >  > >  > >  >>  >>  - HTTP Request (this page will have a
hourglass and
> then
> >  > post
> >  > >  > "Total
> >  > >  > >  >>  >> Number
> >  > >  > >  >>  >>  Returned" when done)
> >  > >  > >  >>  >>   -  show.page
> >  > >  > >  >>  >>
> >  > >  > >  >>  >>  This does not work for me.
> >  > >  > >  >>  >>
> >  > >  > >  >>  >
> >  > >  > >  >>  > In what way does it not work?
> >  > >  > >  >>  > What happens?
> >  > >  > >  >>  > What did you expect to happen?
> >  > >  > >  >>  >
> >  > >  > >  >>  >>
> >  > >  > >  >>  >>  sebb-2-2 wrote:
> >  > >  > >  >>  >>  >
> >  > >  > >  >>  >>  > On 12/08/2009, hoffm11 <hoffm11@gmail.com>
wrote:
> >  > >  > >  >>  >>  >>
> >  > >  > >  >>  >>  >>  Is there a way in jmeter to
say..
> >  > >  > >  >>  >>  >>
> >  > >  > >  >>  >>  >>  Wait for Assertion X to display
on the screen
> before
> >  > moving
> >  > >  > to
> >  > >  > >  >> the
> >  > >  > >  >>  >> next
> >  > >  > >  >>  >>  >>  request in the script?
> >  > >  > >  >>  >>  >
> >  > >  > >  >>  >>  > How does a browser do this?
> >  > >  > >  >>  >>  >
> >  > >  > >  >>  >>  > You need to create a While loop
with the appropriate
> >  > sampler
> >  > >  > and
> >  > >  > >  >>  >>  > Post-Processor.
> >  > >  > >  >>  >>  >
> >  > >  > >  >>  >>  >> --
> >  > >  > >  >>  >>  >>  View this message in context:
> >  > >  > >  >>  >>  >>
> >  > >  > >  >>  >>
> >  > >  > >  >>
> >  > >  >
> >  >
> http://www.nabble.com/Wait-for-Text-to-show-up-before-moving-on-tp24935961p24935961.html
> >  > >  > >  >>  >>  >>  Sent from the JMeter - User
mailing list archive
> at
> >  > >  > Nabble.com.
> >  > >  > >  >>  >>  >>
> >  > >  > >  >>  >>  >>
> >  > >  > >  >>  >>  >>
> >  > >  > >  >>  >>
> >  > >  >
> ---------------------------------------------------------------------
> >  > >  > >  >>  >>  >>  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
> >  > >  > >  >>  >>  >
> >  > >  > >  >>  >>  >
> >  > >  > >  >>  >>  >
> >  > >  > >  >>  >>
> >  > >  > >  >>  >>
> >  > >  > >  >>  >> --
> >  > >  > >  >>  >>  View this message in context:
> >  > >  > >  >>  >>
> >  > >  > >  >>
> >  > >  >
> >  >
> http://www.nabble.com/Wait-for-Text-to-show-up-before-moving-on-tp24935961p24938085.html
> >  > >  > >  >>  >>
> >  > >  > >  >>  >> Sent from the JMeter - User mailing list
archive at
> >  > Nabble.com.
> >  > >  > >  >>  >>
> >  > >  > >  >>  >>
> >  > >  > >  >>  >>
> >  > >  > >  >>
> >  > ---------------------------------------------------------------------
> >  > >  > >  >>  >>  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
> >  > >  > >  >>  >
> >  > >  > >  >>  >
> >  > >  > >  >>  >
> >  > >  > >  >>
> >  > >  > >  >>  --
> >  > >  > >  >>
> >  > >  > >  >> View this message in context:
> >  > >  > >  >>
> >  > >  >
> >  >
> http://www.nabble.com/Wait-for-Text-to-show-up-before-moving-on-tp24935961p24939302.html
> >  > >  > >  >>
> >  > >  > >  >> Sent from the JMeter - User mailing list archive
at
> Nabble.com.
> >  > >  > >  >>
> >  > >  > >  >>
> >  > >  > >  >>
> >  > >  >
>  ---------------------------------------------------------------------
> >  > >  > >  >>  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
> >  > >  > >  >
> >  > >  > >  >
> >  > >  > >  >
> >  > >  > >
> >  > >  > >
> >  > >  > >
> >  > >  > >  --
> >  > >  > >
> >  > >  > > View this message in context:
> >  > >  >
> >  >
> http://www.nabble.com/Wait-for-Text-to-show-up-before-moving-on-tp24935961p24941184.html
> >  > >  > >
> >  > >  > > Sent from the JMeter - User mailing list archive at Nabble.com.
> >  > >  > >
> >  > >  > >
> >  > >  > >
> >  >  ---------------------------------------------------------------------
> >  > >  > >  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
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message