jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Janne.Matt...@keypartners.fi
Subject RE: Dynamic HTTP parameters
Date Thu, 02 Oct 2003 06:53:26 GMT

Thanks a bunch!

Maybe I was a bit unclear about the second case. Basically I was asking
whether it is possible to create random parameters. Assume there are
records with RECORD_IDs from 1 to 100. Can I make JMeter pick one ID
randomly, and use it as a request parameter?

- - -
Janne Mattila
Järjestelmäsuunnittelija

Key Partners Oy
Polttimonkatu 4, 33210 Tampere
Puh. + 358 20 551 6188
Gsm + 358 40 849 1074
Fax + 358 20 551 6200
www.keypartners.fi



|---------+----------------------------->
|         |           "Tolley Shorn"    |
|         |           <Shorn.Tolley@nrm.|
|         |           qld.gov.au>       |
|         |                             |
|         |           02.10.2003 09:44  |
|         |           Please respond to |
|         |           "JMeter Users     |
|         |           List"             |
|         |                             |
|---------+----------------------------->
  >------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                      
                                       |
  |       To:       "JMeter Users List" <jmeter-user@jakarta.apache.org>           
                                             |
  |       cc:       (bcc: Janne Mattila/FI/TJG)                                          
                                       |
  |       Subject:  RE: Dynamic HTTP parameters                                          
                                       |
  >------------------------------------------------------------------------------------------------------------------------------|




I do the first bit for my application load test, not sure what you're
asking in the second point.
This is how to do what I think you're asking for in your first question:

When a user clicks the "create entity" button in our app, the result page
displays something along the lines of "entity created with id: X".

The ID displayed on the create entity result page is actually a business
ID, not the surrogate key, but by a quirk of our system, that's exactly
what we need to pass as the identifying information to the other pages in
our system (don't ask).

We extract the entity id with a regex extractor with approximately the
following settings:
Name: entity ID extractor
Reference name: UV.entity.id
Regular expression: (entity created with id: )([0-9]+)
Template: $2$
Match No.: 1

"UV.entity.id" is the name of the variable that JMeter will stick the
extracted id into (the UV prefix is part of our JMeter variable naming
standard, supposed to stand for UserVariable).

Then for example, when we want to navigate to the view page for that
entity, we create a HTTP sampler with the path field looking something like
"<app context>/jsp/EntityView.jsp?entity_key=${UV.entity.id}"

Note that if the result page doesn't display the key you need in order to
navigate to the view page (and why should it?), then you'll have to alter
your app to stick it in a HTML comment or something.

Cheers,
Shorn.

> -----Original Message-----
> From: Janne.Mattila@keypartners.fi
> [mailto:Janne.Mattila@keypartners.fi]
> Sent: Thursday, 2 October 2003 4:24 PM
> To: JMeter Users List
> Subject: Dynamic HTTP parameters
>
>
>
> Hi,
>
> is it possible to create a web test plan with "dynamic"
> parameters, as in
>
> - web application where you can manage records. First request goes to
> "addRecord.jsp", which creates a new record. JMeter reads
> RECORD_ID from
> response. Next it calls "deleteRecord.jsp" with the obtained RECORD_ID
>
> - RECORD_ID is selected randomly, request is made to
> "someAction.jsp" with
> the obtained RECORD_ID?
>
> If this can be done, what are the effects on test performance?
>
> - - -
> Janne Mattila
> Järjestelmäsuunnittelija
>
> Key Partners Oy
> Polttimonkatu 4, 33210 Tampere
> Puh. + 358 20 551 6188
> Gsm + 358 40 849 1074
> Fax + 358 20 551 6200
> www.keypartners.fi
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>


************************************************************************
The information in this e-mail together with any attachments is
intended only for the person or entity to which it is addressed
and may contain confidential and/or privileged material.
Any form of review, disclosure, modification, distribution
and/or publication of this e-mail message is prohibited.
If you have received this message in error, you are asked to
inform the sender as quickly as possible and delete this message
and any copies of this message from your computer and/or your
computer system network.
************************************************************************


---------------------------------------------------------------------
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
View raw message