You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by umesh prajapati <pr...@gmail.com> on 2013/06/24 23:45:32 UTC

RegExp Extractor

Hi,

I would like to extract a word that contains both letters and number from a
url. How can I achieve this.

For example:
URL is: https://abc.com/defgh/chela/fff12deg21f/classes?includeDeleted=false

If I would like to extract "fff12deg21f" from the above URL and use this on
the other http request. How can I do this?

I added Regular Express Extractor to my Http Reques Sampler
In RegExp Extractor GUI
Apply to: main sampley only
Response Field to check: URL
Reference Name:stud
Regular Expression: */chela/(.+?)/*
Template:
Match No. (0 for Random):
Default Value:

Modules in JMeter - Part 2

Posted by Wanjun Wang <wa...@us.ibm.com>.
I've recorded several tests to use as modules and created a test plan using
Include/Module controllers.  I don't want to make any assumption on what
the next module may be, so I saved the main response as a reference through
Regular Expression Extractor.  Now for the next module, how can I retrieve
the reference and extract a specific link?  Also, at which level should I
specify Cookie/Cache Manager, in individual module or parent test plan?

Thanks much.

Regards, Wanjun Wang

Re: RegExp Extractor

Posted by Deepak Shetty <sh...@gmail.com>.
if you are running a test for a single user - then save the entire response
- till you are sure your script is correct.

note that if your page has a single dynamic value (like a timestamp or
session id) then your test will always fail ..

Also please raise separate questions for separate problems since this has
nothing to do with your regex problem..



On Mon, Jun 24, 2013 at 3:13 PM, umesh prajapati <pr...@gmail.com>wrote:

> I am saving the responses as hash because I am trying to perform load test.
> I am thinking to run 2 test. First test, run with 5 seconds delay per
> request and save the responses and run the load test again with the same
> user and asser that the response I get during load test exactly matches the
> responses I got form the first test.
>
> To achieve this, I had to save the responses as hash and assert the hashes
> matches during the load test. But Now, the problem I am getting is that
> when it gives error during load test, I am not being able to find out what
> the error means.
>
>
> On Mon, Jun 24, 2013 at 3:06 PM, Deepak Shetty <sh...@gmail.com> wrote:
>
> >
> >
> http://jmeter.apache.org/usermanual/component_reference.html#Regular_Expression_Extractor
> >
> > >And is there any way I can decrypyt the MD5 Hash value
> > Hashes by nature are usually one way - if you want the response , then
> you
> > save the response, not the hash - listeners allow you to do this on error
> > only
> >
> >
> > On Mon, Jun 24, 2013 at 2:59 PM, umesh prajapati <praumesh86@gmail.com
> > >wrote:
> >
> > > Thank you for the response...what do I mention in Template, Match No:
> and
> > > default Value field.
> > > And is there any way I can decrypyt the MD5 Hash value because I am
> > saving
> > > my response as MD5 Hash and when I get error I would like to know what
> my
> > > error is actually saying. So it would be nice if i can decrypt the Hash
> > > value
> > >
> > >
> > > On Mon, Jun 24, 2013 at 2:51 PM, Deepak Shetty <sh...@gmail.com>
> > wrote:
> > >
> > > > /chela/([^/]+)/
> > > >
> > > > Note the way you are using * is incorrect for a regex
> > > >
> > > >
> > > > On Mon, Jun 24, 2013 at 2:45 PM, umesh prajapati <
> praumesh86@gmail.com
> > > > >wrote:
> > > >
> > > > > Hi,
> > > > >
> > > > > I would like to extract a word that contains both letters and
> number
> > > > from a
> > > > > url. How can I achieve this.
> > > > >
> > > > > For example:
> > > > > URL is:
> > > > >
> https://abc.com/defgh/chela/fff12deg21f/classes?includeDeleted=false
> > > > >
> > > > > If I would like to extract "fff12deg21f" from the above URL and use
> > > this
> > > > on
> > > > > the other http request. How can I do this?
> > > > >
> > > > > I added Regular Express Extractor to my Http Reques Sampler
> > > > > In RegExp Extractor GUI
> > > > > Apply to: main sampley only
> > > > > Response Field to check: URL
> > > > > Reference Name:stud
> > > > > Regular Expression: */chela/(.+?)/*
> > > > > Template:
> > > > > Match No. (0 for Random):
> > > > > Default Value:
> > > > >
> > > >
> > >
> >
>

Re: RegExp Extractor

Posted by umesh prajapati <pr...@gmail.com>.
I am saving the responses as hash because I am trying to perform load test.
I am thinking to run 2 test. First test, run with 5 seconds delay per
request and save the responses and run the load test again with the same
user and asser that the response I get during load test exactly matches the
responses I got form the first test.

To achieve this, I had to save the responses as hash and assert the hashes
matches during the load test. But Now, the problem I am getting is that
when it gives error during load test, I am not being able to find out what
the error means.


On Mon, Jun 24, 2013 at 3:06 PM, Deepak Shetty <sh...@gmail.com> wrote:

>
> http://jmeter.apache.org/usermanual/component_reference.html#Regular_Expression_Extractor
>
> >And is there any way I can decrypyt the MD5 Hash value
> Hashes by nature are usually one way - if you want the response , then you
> save the response, not the hash - listeners allow you to do this on error
> only
>
>
> On Mon, Jun 24, 2013 at 2:59 PM, umesh prajapati <praumesh86@gmail.com
> >wrote:
>
> > Thank you for the response...what do I mention in Template, Match No: and
> > default Value field.
> > And is there any way I can decrypyt the MD5 Hash value because I am
> saving
> > my response as MD5 Hash and when I get error I would like to know what my
> > error is actually saying. So it would be nice if i can decrypt the Hash
> > value
> >
> >
> > On Mon, Jun 24, 2013 at 2:51 PM, Deepak Shetty <sh...@gmail.com>
> wrote:
> >
> > > /chela/([^/]+)/
> > >
> > > Note the way you are using * is incorrect for a regex
> > >
> > >
> > > On Mon, Jun 24, 2013 at 2:45 PM, umesh prajapati <praumesh86@gmail.com
> > > >wrote:
> > >
> > > > Hi,
> > > >
> > > > I would like to extract a word that contains both letters and number
> > > from a
> > > > url. How can I achieve this.
> > > >
> > > > For example:
> > > > URL is:
> > > > https://abc.com/defgh/chela/fff12deg21f/classes?includeDeleted=false
> > > >
> > > > If I would like to extract "fff12deg21f" from the above URL and use
> > this
> > > on
> > > > the other http request. How can I do this?
> > > >
> > > > I added Regular Express Extractor to my Http Reques Sampler
> > > > In RegExp Extractor GUI
> > > > Apply to: main sampley only
> > > > Response Field to check: URL
> > > > Reference Name:stud
> > > > Regular Expression: */chela/(.+?)/*
> > > > Template:
> > > > Match No. (0 for Random):
> > > > Default Value:
> > > >
> > >
> >
>

Re: RegExp Extractor

Posted by Deepak Shetty <sh...@gmail.com>.
http://jmeter.apache.org/usermanual/component_reference.html#Regular_Expression_Extractor

>And is there any way I can decrypyt the MD5 Hash value
Hashes by nature are usually one way - if you want the response , then you
save the response, not the hash - listeners allow you to do this on error
only


On Mon, Jun 24, 2013 at 2:59 PM, umesh prajapati <pr...@gmail.com>wrote:

> Thank you for the response...what do I mention in Template, Match No: and
> default Value field.
> And is there any way I can decrypyt the MD5 Hash value because I am saving
> my response as MD5 Hash and when I get error I would like to know what my
> error is actually saying. So it would be nice if i can decrypt the Hash
> value
>
>
> On Mon, Jun 24, 2013 at 2:51 PM, Deepak Shetty <sh...@gmail.com> wrote:
>
> > /chela/([^/]+)/
> >
> > Note the way you are using * is incorrect for a regex
> >
> >
> > On Mon, Jun 24, 2013 at 2:45 PM, umesh prajapati <praumesh86@gmail.com
> > >wrote:
> >
> > > Hi,
> > >
> > > I would like to extract a word that contains both letters and number
> > from a
> > > url. How can I achieve this.
> > >
> > > For example:
> > > URL is:
> > > https://abc.com/defgh/chela/fff12deg21f/classes?includeDeleted=false
> > >
> > > If I would like to extract "fff12deg21f" from the above URL and use
> this
> > on
> > > the other http request. How can I do this?
> > >
> > > I added Regular Express Extractor to my Http Reques Sampler
> > > In RegExp Extractor GUI
> > > Apply to: main sampley only
> > > Response Field to check: URL
> > > Reference Name:stud
> > > Regular Expression: */chela/(.+?)/*
> > > Template:
> > > Match No. (0 for Random):
> > > Default Value:
> > >
> >
>

Re: RegExp Extractor

Posted by umesh prajapati <pr...@gmail.com>.
Thank you for the response...what do I mention in Template, Match No: and
default Value field.
And is there any way I can decrypyt the MD5 Hash value because I am saving
my response as MD5 Hash and when I get error I would like to know what my
error is actually saying. So it would be nice if i can decrypt the Hash
value


On Mon, Jun 24, 2013 at 2:51 PM, Deepak Shetty <sh...@gmail.com> wrote:

> /chela/([^/]+)/
>
> Note the way you are using * is incorrect for a regex
>
>
> On Mon, Jun 24, 2013 at 2:45 PM, umesh prajapati <praumesh86@gmail.com
> >wrote:
>
> > Hi,
> >
> > I would like to extract a word that contains both letters and number
> from a
> > url. How can I achieve this.
> >
> > For example:
> > URL is:
> > https://abc.com/defgh/chela/fff12deg21f/classes?includeDeleted=false
> >
> > If I would like to extract "fff12deg21f" from the above URL and use this
> on
> > the other http request. How can I do this?
> >
> > I added Regular Express Extractor to my Http Reques Sampler
> > In RegExp Extractor GUI
> > Apply to: main sampley only
> > Response Field to check: URL
> > Reference Name:stud
> > Regular Expression: */chela/(.+?)/*
> > Template:
> > Match No. (0 for Random):
> > Default Value:
> >
>

Re: RegExp Extractor

Posted by Deepak Shetty <sh...@gmail.com>.
/chela/([^/]+)/

Note the way you are using * is incorrect for a regex


On Mon, Jun 24, 2013 at 2:45 PM, umesh prajapati <pr...@gmail.com>wrote:

> Hi,
>
> I would like to extract a word that contains both letters and number from a
> url. How can I achieve this.
>
> For example:
> URL is:
> https://abc.com/defgh/chela/fff12deg21f/classes?includeDeleted=false
>
> If I would like to extract "fff12deg21f" from the above URL and use this on
> the other http request. How can I do this?
>
> I added Regular Express Extractor to my Http Reques Sampler
> In RegExp Extractor GUI
> Apply to: main sampley only
> Response Field to check: URL
> Reference Name:stud
> Regular Expression: */chela/(.+?)/*
> Template:
> Match No. (0 for Random):
> Default Value:
>