Summary: | JMETER function __machineName do not work | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Michael Kless <michael.kless> |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P3 | ||
Version: | 2.3.1 | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Windows XP |
Description
Michael Kless
2007-12-27 02:24:03 UTC
How does the function call look in the test plan? I've found that ${__machineName} causes the problem, but ${__machineName()} and ${__machineName(var)} work fine. Obviously the NPE needs to be fixed, but hopefully you will find that one of the alternatives works for you. The __machineName function parameter is currently required, so ${__machineName} is not valid syntax - but it should not generate an NPE. ${__machineName()} is currently parsed as if there was one parameter - the empty string - which is why that syntax works OK. I'll probably make the parameter optional. (In reply to comment #2) > The __machineName function parameter is currently required, so > ${__machineName} is not valid syntax - but it should not generate an NPE. > ${__machineName()} is currently parsed as if there was one parameter - the > empty string - which is why that syntax works OK. > I'll probably make the parameter optional. Thank you, these hint solves our problem: ${__machineName()} works fine. My recommendation: Just correct the documentation of Functions and Variables (chapter 19 in ..\jakarta-jmeter-2.3.1\docs\usermanual\functions.html) rather than make the parameter optional. Kind regards, Michael. Thanks for confirming that the problem is resolved. Re-opening as the NPE is not yet fixed. Note that the documentation *IS* currently correct - it states that the parameter is required. I think it still make sense to make the variable name optional. This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2057 |