Bug 32395 - nested constant or variable between two group variables results in constant/variable being appended
Summary: nested constant or variable between two group variables results in constant/v...
Status: RESOLVED FIXED
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: Nightly (Please specify date)
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-25 20:54 UTC by praveen kallakuri
Modified: 2004-12-04 16:35 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description praveen kallakuri 2004-11-25 20:54:59 UTC
The problem and logs described here come from 2.1.20041011, but I saw it from
earlier binary distributions too. In the regex component, if I have a
<group_variable_1><constant or variable><group_variable_2>, the result ends up
being <group_variable_1><group_variable_2><constant or variable>. 


Here's an example instance. 

HTTP Request
      Regex for editionURL
                         Reference name = editionURL
                         Regular Expression =
(action=")(.*\.gx)(.*changeEdition\/)([^"]+)
                         Template = $3$${EditionID}/$4$
                         Match No. = 1
                         Default Value = null
      Regex for EditionID
                         Reference name = EditionID
                         Regular Expression = (<option
value=")(\d+)("[^>\s]*>\w\w<\/option>)
                         Template = $2$
                         Match No. = 0
                         Default Value = null

Logs: 

2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: Pattern =
org.apache.oro.text.regex.Perl5Pattern@1c0b204
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: template = $2$
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: template split into 2 pieces, starts
with = true
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor processing result
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: Regex = (<option
value=")(\d+)("[^>\s]*>\w\w<\/option>)
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Match found!
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Match found!
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Match found!
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #0 = 2
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #1 =
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #2 =
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: Regex Extractor result = 493
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: Pattern =
org.apache.oro.text.regex.Perl5Pattern@1c0b204
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: template = $3$493$4$
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: template split into 3 pieces, starts
with = true
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor processing result
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: Regex =
(action=")(.*\.gx)(.*changeEdition\/)([^"]+)
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Match found!
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #0 = 3
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #1 =
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #2 = 4
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #3 =
493
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: RegexExtractor: Template piece #4 =
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.extractor.RegexExtractor: Regex Extractor result =
/5133460/3542940/4719119/468/1101253233790/loot/C/changeEdition/loot493/
  <=====
2004/11/23 17:40:51 [GUO Thread Group1-1] DEBUG -
jmeter.protocol.http.sampler.HTTPSampler: Start :
samplehttp://loot:8080/g-control/gocentura.gx/5133460/3542940/4719119/468/1101253233790/loot/C/changeEdition/loot493/


In the regex for editionURL, the template is $3$${EditionID}$4$.

     $3$ has been evaluated to
"5133460/3542940/4719119/468/1101253233790/loot/C/changeEdition/"
      ${EditionID} = 493
     $4$ has been evaluated to "loot"

  But ${editionURL} ends up being:
/5133460/3542940/4719119/468/1101253233790/loot/C/changeEdition/loot493/
Comment 1 Sebb 2004-11-26 03:39:21 UTC
I can confirm the bug with 2.0.2. As a possible temporary work-round, it looks
as though patterns which  start with a constant work OK.
Comment 2 Sebb 2004-12-05 01:35:03 UTC
Fix applied to CVS branch 2.0.
Comment 3 The ASF infrastructure team 2022-09-24 20:37:34 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1475