Skip to content

JSR223 - Accommodate types of bindings #11691

@jmetertea

Description

@jmetertea

I try to use JSR223 code using bindings parameters (using JMeter):

 Bindings bindings = engine.createBindings();
 final Logger logger = LoggerFactory.getLogger(JSR223_INIT_FILE);
 bindings.put("log", logger); // $NON-NLS-1$ (this name is fixed)       
 engine.eval(reader, bindings);

bindings parameters can't be used when using Scala engine (in other engines as beanshell,groovy,velocity,... it works)

I expect one of syntax to work in script

log.info("Hello Scala");
$log.info("Hello Scala");

First asked in https://stackoverflow.com/questions/57266997/scala-jsr223-script-using-jmeter-java-context

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions