polarnik commented on a change in pull request #679:
URL: https://github.com/apache/jmeter/pull/679#discussion_r775267335
##########
File path:
src/components/src/main/java/org/apache/jmeter/control/IncludeController.java
##########
@@ -92,6 +94,32 @@ public String getIncludePath() {
return this.getPropertyAsString(INCLUDE_PATH);
}
+ /**
+ * return the JMX file path with function support.
+ * @return the JMX file path with function support
+ */
+ public String getIncludePathAsFunction()
+ {
+ String jmxfile = this.getPropertyAsString(INCLUDE_PATH);
+ CompoundVariable masterFunction = new CompoundVariable();
+ try{
+ log.debug("Trying to evaluate 'Include Path' as an expression:
{}", jmxfile);
+ masterFunction.setParameters(jmxfile);
+ if(masterFunction.hasFunction()) {
+ String jmxfileCompile = masterFunction.getFunction().execute();
+ log.debug("The value of 'Include Path' is computed as: {}",
jmxfileCompile);
+ return jmxfileCompile;
+ }
+ } catch (InvalidVariableException e)
+ {
+ log.warn("Invalid variable in 'Include Path' {}. See log for
details", jmxfile);
+ log.warn("Invalid variable in 'Include Path':", e);
+ }
+
+ log.debug("The value of 'Include Path' is simple string: {}", jmxfile);
+ return jmxfile;
+ }
Review comment:
if apply `includePath.setRunningVersion(true)`
and set includePath like `${__P(somePropName, 'defaultValue')}`
and open JMX File in GUI Mode
then includePath view like value of `somePropName` or `'defaultValue'`, but
not view as `${__P(somePropName, 'defaultValue')}`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]