Bug 63484 - Add apache velocity as JSR223 script language
Summary: Add apache velocity as JSR223 script language
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Keywords: FixedInTrunk
Depends on:
Reported: 2019-06-05 11:28 UTC by orimarko
Modified: 2019-06-17 16:24 UTC (History)
2 users (show)

Add velocity JSR223 language docs comment (1.73 KB, patch)
2019-06-10 05:58 UTC, orimarko
Details | Diff
velocity as JSR223 script language (1.89 KB, patch)
2019-06-10 10:56 UTC, orimarko
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description orimarko 2019-06-05 11:28:08 UTC
Apache velocity is under Apache License Version 2.0.
Latest velocity support JSR223 scripting

Velocity script can be executed, although there's an issue of using JMeter environment/variables:
Comment 1 orimarko 2019-06-06 08:17:27 UTC
When using Velocity user need to add $ in front of JMeter predefined variables, e.g:

$log.debug( "Hello " + $vars.get("a"));
Comment 2 Philippe Mouawad 2019-06-08 12:55:59 UTC
(In reply to orimarko from comment #1)
> When using Velocity user need to add $ in front of JMeter predefined
> variables, e.g:
> $log.debug( "Hello " + $vars.get("a"));

Hello orimarko,
Thanks for analysis.

What can we do about it though except document ?

Would you contribute a patch amending documentation ? unless you have a better idea ?
Comment 3 orimarko 2019-06-08 14:55:22 UTC
We can add velocity core and scripting jars and support velocity by default in JSR223
Comment 4 Felix Schumacher 2019-06-09 09:21:18 UTC
What is the use case for adding velocity to our runtime dependencies? At the moment velocity is a dependency for the generation of our docs, only. Is the updated version compatible with the docs generation?

Apart from that, a note about different conventions for variable syntax in script languages would be helpful in our documentation.
Comment 5 orimarko 2019-06-10 05:58:13 UTC
Created attachment 36616 [details]
Add velocity JSR223 language docs comment
Comment 6 Felix Schumacher 2019-06-10 09:34:16 UTC
Thanks for the patch.

You have patched the changes.html instead of the correct source changes.xml.
Comment 7 orimarko 2019-06-10 10:56:18 UTC
Created attachment 36621 [details]
velocity as JSR223 script language

update patch
Comment 8 orimarko 2019-06-10 10:56:36 UTC
updated patch
Comment 9 Felix Schumacher 2019-06-17 16:24:50 UTC
Thanks for the updated patch.

The documentation will be visible with the next version of JMeter (probably 5.2)

commit 7bbd39b026c3b638e07ca09d842f4134f902cf7a
AuthorDate: Mon Jun 17 18:20:08 2019 +0200

    Add notes to use Apache Velocity as JSR223 script language
    Based on a patch by Ori Marko (orimarko at gmail.com)
    Bugzilla Id: 63484
 xdocs/changes.xml                        | 1 +
 xdocs/usermanual/component_reference.xml | 4 +++-
 2 files changed, 4 insertions(+), 1 deletion(-)
Comment 10 The ASF infrastructure team 2022-09-24 20:38:17 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5096