-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JMeter Function ${__base64Encode} Not Executing Correctly in JMeter DSL When Loading .jmx File #290
Comments
There is currently no support for usign jmeter-plugins-functions, and the problem is caused by jmeter configuration don't having such jar in the search path for libraries. You can use a groovy lambda instead of using such function like private static class MyEnv extends JmeterEnvironment {
public MyEnv() throws IOException {
}
public void updateSearchPath(HashTree tree) {
super.updateSearchPath(tree);
Properties props = JMeterUtils.getJMeterProperties();
String searchPathsPropName = "search_paths";
String prevPath = props.getProperty(searchPathsPropName);
String functionJarPath = new File(Base64Encoder.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getPath()
props.setProperty(searchPathsPropName,prevPath + ";" + functionJarPath);
}
} Another alternative might be to contribute some improvement to JMeter DSL general logic for solving the search path from a test plan so it not only includes test elements classes in the search but also function classes, but I guess this might be tricky. A simpler contribution could be to add a method to |
Hello, have you tried the previously mentioned workaround? |
Yes , thanks
…On Mon, 27 Jan 2025, 5:45 pm rabelenda, ***@***.***> wrote:
Hello, have you tried the previously mentioned workaround?
—
Reply to this email directly, view it on GitHub
<#290 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALFZ524CMGXRAFJ3CIF7ID32MZICDAVCNFSM6AAAAABUHB3NGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDMMJWGEYTINJYGA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
what I Expected that
the ${__base64Encode(Username,)} function should encode the Username value to Base64.
but the Actual Behavior when run the script was
the ${__base64Encode(Username,)} function is treated as a plain string and does not perform the Base64 encoding.
also i have included the following dependencies in my project:
org.apache.jmeter ApacheJMeter_functions ${jmeter.version}kg.apc
jmeter-plugins-functions
2.2
The text was updated successfully, but these errors were encountered: