jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Morris <michael.mor...@optimad.com>
Subject RE: Parsing for variable
Date Tue, 26 Feb 2002 16:30:59 GMT
I shall try to explain what I am doing in more detail.

Here is the skeleton again I will label it this time:
 
           +-+ ThreadGroup
             |
             +-+ Simple controller
             | |
               +-- Web testing#1 - login
             | |
             | +-- Web Testing#2 - create record
             |  
             +-+ Modification Manager
               |
               +-- HTML Link parser
               |
               +-- Web Testing#3 - edit record
               |
               +-- Web Testing#4 - delete record

Webtesting#1 simply logs me onto the system and returns a page of
radiobuttons each of which has a value which is identical to the record's
ID.
Webtesting#2 creates a new record and updates the page which now includes a
new radiobutton representing my new record.
So far everything works fine,
Webtesting#3 is supposed to edit the new record.
Webtesting#4 is now supposed to delete that record.

Now, in order to edit and delete the record the database needs to know the
recordID I am refering to. I can only hard code this if I know the record
myself but it is generated automatically after Webtesting#2. How can I let
the modification manager know which of the radiobuttons is my record? I can
fix any of the other parameters or labels associated with the record but the
radiobutton's name is always "radiobutton" and its value is generated
automatically.

Does JMeter deal with this or am I barking up the wrong tree here.

Thanks for your time,

Michael

-----Original Message-----
From: Stover, Michael [mailto:Michael.Stover@usa.xerox.com]
Sent: 26 February 2002 15:55
To: 'JMeter Users List'
Subject: RE: Parsing for variable


The "label" of the radio button doesn't matter one bit to JMeter.  What
matters is the "name" attribute, and the "value" attribute.

A radio button: <input type="radio" name="recordID" value="233">

In JMeter, to find this value, setup an argument named "recordID", and a
value of "\d+" (matches all integers).

If you want to match "233", then your value is "233" rather than "\d+".  I
don't think I'm really understanding your question anymore, though.

-Mike

> -----Original Message-----
> From: Michael Morris [mailto:michael.morris@optimad.com]
> Sent: Tuesday, February 26, 2002 9:52 AM
> To: 'JMeter Users List'
> Subject: RE: Parsing for variable
> 
> 
> Mike, 
> 
> Thanks for your response.
> 
> I think you may be on to something here, I checked the HTML 
> of the previous
> request. In fact the parameter I am trying to pick up, 
> recordID say, does
> appear but only as a radiobutton value.
> 
> This leads to two problems, first how do I point JMeter to 
> the parameter if
> its name does not match the label which appears in the HTML. 
> The second
> problem is how do I point JMeter to a particular radiobutton and not a
> wildcard as per the documentation.
> 
> I hope this makes sense, my understanding is very blurred at pressent.
> 
> Michael
> 
> 
> -----Original Message-----
> From: Stover, Michael [mailto:Michael.Stover@usa.xerox.com]
> Sent: 26 February 2002 14:00
> To: 'JMeter Users List'
> Subject: RE: Parsing for variable
> 
> 
> This looks like just what the Modification Manager was meant 
> to do, and your
> test skeleton looks correct, but, often with the Mod Man, the 
> devil is in
> the details.  
> 
> One thing to look for is whether your edit record test sample 
> might be a
> "POST" when it should be "GET, or vice-versa.  It depends on the HTML
> returned from you "create record" element.
> 
> What exactly is it doing?  Have you examined the HTML 
> returned from the
> "create record" element and verified that what you thought 
> you were looking
> for is actually there?
> 
> -Mike
> 
> > -----Original Message-----
> > From: Michael Morris [mailto:michael.morris@optimad.com]
> > Sent: Tuesday, February 26, 2002 8:11 AM
> > To: 'JMeter Users List'
> > Subject: RE: Parsing for variable
> > 
> > 
> > Hi,
> > 
> > I was directed to this message by Timothy Reaves.
> > 
> > I have been trying to work though the documentation and am 
> > sure that either
> > the Modefication Manager is not designed to do what I want or 
> > (more likely)
> > I do not understand how to use it.
> > 
> > I am trying to use JMeter to create a database record and 
> > then to pick up
> > its id and feed it back in order to edit it. Here is what I 
> have built
> > 
> > +
> >           |
> >           +-+ ThreadGroup
> >             |
> >             +-+ Simple controller
> >             | |
> >               +-- Web testing - login
> >             | |
> >             | +-- Web Testing - create record
> >             |  
> >             +-+ Modification Manager
> >               |
> >               +-- HTML Link parser
> >               |
> >               +-- Web Testing - edit record
> > 
> > I have tried it on the latest 1.7 release (25th Feb 2002)
> > 
> > Does anyone know what I am doing wrong.
> > 
> > Michael         
> >  
> > -----Original Message-----
> > From: Stover, Michael [mailto:Michael.Stover@usa.xerox.com]
> > Sent: 20 February 2002 14:41
> > To: 'JMeter Users List'
> > Subject: RE: Parsing for variable
> > 
> > 
> > Yes, you can do this.  
> > 
> > Firstly, read
> > 
> http://jakarta.apache.org/jmeter/user_manual/modification_manager.html
> > 
> > Hopefully, that page will explain what you need to do.  If 
> > you have further
> > questions, let me know.  I will say that, in the latest 
> > build, it works
> > quite well.  However, it is very exacting, and I usually have 
> > to do some
> > work to figure out how to make it work.  The errors are 
> generally mine
> > though.  
> > 
> > -Mike
> > 
> > > -----Original Message-----
> > > From: TimothyReaves@westfieldgrp.com
> > > [mailto:TimothyReaves@westfieldgrp.com]
> > > Sent: Wednesday, February 20, 2002 8:12 AM
> > > To: jmeter-user@jakarta.apache.org
> > > Subject: Parsing for variable
> > > 
> > > 
> > >      Hello all.  The latest nightly build seems to work very 
> > > well, fixing
> > > several issues that had been preventing me from using it.  
> > > Now I can use it
> > > to record scripts, and play them back.  But I have a question.
> > > 
> > >      In the application I'm wanting to test (JSP based), at 
> > > one point in
> > > the process an ID number is created, and added to the data 
> > going from
> > > client to server.  It then is part of the further requests.  
> > > The problem
> > > is, every time I play the script back, a new ID is generated 
> > > (as should
> > > be), but the recorded script uses the old value in subsequent 
> > > requests.  So
> > > the question is: how do I scrape that value and replace it in 
> > > the later
> > > requests?
> > > 
> > >      Is there some mechanism for something like variable 
> > > substitution?  In
> > > the product we currently use, after recording the script, you 
> > > can go in and
> > > edit it to scrape a value returned by the web server and 
> > place it in a
> > > variable.  Then anywhere else in the script you want to use 
> > > that variable,
> > > you delete what is there (the old value) and put the variable 
> > > name there.
> > > This way, each run of the script uses the ID created for that run.
> > > 
> > >      Anyone?
> > > 
> > > 
> > > --
> > > To unsubscribe, e-mail:   
> > > <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail: 
> > > <mailto:jmeter-user-help@jakarta.apache.org>
> > > 
> > 
> > --
> > To unsubscribe, e-mail:
> > <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:jmeter-user-help@jakarta.apache.org>
> > 
> > --
> > To unsubscribe, e-mail:   
> > <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: 
> > <mailto:jmeter-user-help@jakarta.apache.org>
> > 
> 
> --
> To unsubscribe, e-mail:
> <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:jmeter-user-help@jakarta.apache.org>
> 
> --
> To unsubscribe, e-mail:   
> <mailto:jmeter-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: 
> <mailto:jmeter-user-help@jakarta.apache.org>
> 

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

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


Mime
View raw message