I too have had problems with the regular expression not picking up
matches.  I have closely inspected the response page and it should have
picked it up.  Though I have not logged it out to a file to see exactly
what it is picking up. (Will do that today)

Another piece of information is that the regular expression seems to not
match correctly at a higher rate when I have a single thread that is
looping, opposed to multiple threads not looping.

Furthermore I have 4 thread groups each running a regular expression...

Example
Thread Grp 1: NumofThreads=1, Loop=10
Thread Grp 2: NumofThreads=1, Loop=10
Thread Grp 3: NumofThreads=1, Loop=10
Thread Grp 4: NumofThreads=1, Loop=10

Results in the regular expression not matching anything, more than the
following scenario

Thread Grp 1: NumofThreads=10, Loop=1
Thread Grp 2: NumofThreads=10, Loop=1
Thread Grp 3: NumofThreads=10, Loop=1
Thread Grp 4: NumofThreads=10, Loop=1

....  writing this email just made me think of something...
Each regular expression is saving its result to a variable defined in
the 'User Parameters'  is this parameter shared between all the
threads??  There for the expression is just over writing the other
threads value??


-shawn

-----Original Message-----
From: Craig Palmer [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, February 04, 2004 11:47 AM
To: JMeter Users List
Subject: Re: JMeter from time to time doesn't calculate regular
expressions for some threads

It is very difficult to diagnose what appears to be a transient issue, 
let alone fix it. I think I can guarantee that Jmeter does NOT have a 
setting/configuration that introduces random problems to occur at 
random times.

In every case that I have found the regular expression not working, I 
have looked carefully at the content and found my mistake every time. 
I would bet that it isnt finding a match because there is no match.

What you need to do is put a 'View Results Tree' on the http sampler 
that you want to match the regular expression and run the test cycle. 
When the "mis-match" occurs (the listener will keep a full history of 
all the pages fetched"), copy the Result Data to a file and then run 
the exact same regular expression over it using Perl 5.003. The same 
thing should happen.

If the regular expression works in Perl, then there is cause to 
investigate to the next level. If it doesnt, then either the page 
content is not what you are expecting, or you need to revise your 
regular expression.

BTW, I say Perl 5.003 becuase this is the equivalent regular 
expression engine that Jmeter uses. If you are not too familiar with 
Perl, then here is an example program to give you a jump start 
assuming that you saved the page content as "page.html":

#!/usr/bin/perl

# open file for reading
open(IN, "page.html") || die "unable to open file";

# Run through each line looking to match the regular expression
# Note that if you use brackets (), the the results will be found
# in $1, $2 etc. E.g. $Line =~ /contentId=(\d+)/ then you could
# write in the if statement $contentId = $1;
while($Line = <IN>) {
   if($Line =~ /<reg exp here>/) {
     print "Found Match!";
}

close(IN);



Vladimir Tsygankov wrote:
> Hello, friends!
> We noticed that JMeter from time to time doesn't calculate regular
> expressions in requests for some threads (our test has 20 threads). 
> As a result we receive Exceptions from the server instead of correct
> responses. We tried almost everything: increasing of Ramp-Up period,
> time delay between requests, priority of java etc. It doesn't help.
> We'd like to have a guarantee that a regular expression has been
> calculated before a request is sent.
>  Is there any settings for JMeter or for script to fix the problem?
> Thanks in advance,
> Vladimir
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
Craig Palmer                    Mobile NZ: +64 21 755 254
Peace Software                  URL: http://www.peace.com
                                 Email: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to