apache / apache/jmeter

Values of declared variables within the same User Defined Variables element are not evaluated

Open
#5,487 3 comments 0 reactions 0 assignees View on GitHub
os: All P2
Dominant language
Java
Stars
9.5k
Forks
2.3k
Avg merge
1d 22h
Merged PRs (30d)
5

Description

**eR@SeR** ([Bug 65072](https://bz.apache.org/bugzilla//show_bug.cgi?id=65072&redirect=false)):
Hello,

Values of declared variables within same User Defined Variables element are not evaluated in declared variables that are in rows below. Run provided jmx file and check the Sampler's name in VRT listener.

In results, variables var2 and var4 have values ${var1} and ${var3}, instead "doesn't work in var2, works in var7" and "works in var6 but doesn't work in var4 and var8" respectively.

As a workaround, Groovy function is used, so var6 properly generates assigned value within same UDV element.

Jmeter 5.4.1 7acd031
Microsoft Windows 10 Enterprise 64-bit
java version "14.0.1" 2020-04-14

Created attachment [UDVIssue.jmx](https://apache.github.io/jmeter-bugzilla-attachments/72/65072/37699/UDVIssue.jmx): UDVIssue
UDVIssue.jmx

````xml




false
true
false









var1
doesn't work in var2, works in var7
=


var2
${var1}
=


var3
${__groovy("works in var6 but doesn't work in var4 and var8",var5)}
=


var4
${var3}
=


var6
${var5}
=







var7
${var1}
=


var8
${var4}
=





continue

false
1

1
1
false


true



false

saveConfig


true
true
true
true
true
true
true
true
false
true
true
false
false
false
true
false
false
false
true
0
true
true
true
true
true
true






true


true
groovy



true


true
groovy



true


true
groovy



true


true
groovy



true


true
groovy



true


true
groovy



true


true
groovy



true


true
groovy




````

Version: Nightly
Severity: normal
OS: All

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.