Blazemeter / CorrelationRecorder

A repository for the Auto Correlation Recorder Plugin for JMeter
https://blazemeter.github.io/CorrelationRecorder/
Apache License 2.0
26 stars 14 forks source link

User variable not resolved #25

Open plo750 opened 2 years ago

plo750 commented 2 years ago

I have defined a user variable PROJECT_HOME in the "User Defined Variables" element.

The PROJECT_HOME variable contains this code:

${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)}

After that, I reuse it in the "CSV Data Set Config" element, in the filename as follow:

${__env(DATA_CONFIG,,${__eval(${PROJECT_HOME})})}/Credentials.csv

With the "HTTP(S) Test Script Recorder" the resolution of the variable PROJETC_HOME is resolved correctly, as follow: 2021-12-07 10:20:39,175 INFO o.a.j.s.FileServer: Close: D:\Projets\Load-Tests\Auto-Correlation/Credentials.csv

But with this plugin I have the following issue: 2021-12-07 10:09:08,562 INFO o.a.j.s.FileServer: Stored: ${PROJECT_HOME}/Credentials.csv

Environment

Windows 10

Step to Reproduce

  1. Define the PROJECT_HOMEvariable as ${__BeanShell(import org.apache.jmeter.services.FileServer; FileServer.getFileServer().getBaseDir();)} in the config element "User Defined Variable".
  2. In the config element "CSV Data Set Config" set the "Filename" as ${__env(DATA_CONFIG,,${__eval(${PROJECT_HOME})})}/Credentials.csv
  3. Define a simple scenario
  4. Click on Start

Expected behaviour

I expected that the ${PROJECT_HOME} is resolved as D:\Projets\Load-Tests\Auto-Correlation instead of remaining as ${PROJECT_HOME}

Complementary information

none

Additional context

none

RicardoPoleo commented 2 years ago

Hello @plo750,

This is pretty strange, I reproduce it and just added it to our backlog.

We will be tackling this in the future and, whenever a release is ready with the fixes, I'll let you know.

Thanks for taking the time to report this behaviour, we really appreciate it.

Happy Hacking!