Summary: | Introduce groovy.init.file to allow calling a groovy script on JMeter startup | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Philippe Mouawad <p.mouawad> |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | CC: | p.mouawad |
Priority: | P2 | ||
Version: | 4.0 | ||
Target Milestone: | JMETER_5.0 | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
Make init file more generic
Make init file more generic |
Description
Philippe Mouawad
2018-09-09 12:50:32 UTC
Author: pmouawad Date: Sun Sep 9 13:09:21 2018 New Revision: 1840406 URL: http://svn.apache.org/viewvc?rev=1840406&view=rev Log: Bug 62700 - Introduce groovy.init.file to allow calling a groovy script on JMeter startup Bugzilla Id: 62700 Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/core/org/apache/jmeter/JMeter.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/properties_reference.xml Created attachment 36141 [details]
Make init file more generic
Try to find the correct script engine by looking at the extension of the init file (change the property name to jsr223.init.file at the same time)
(In reply to Felix Schumacher from comment #2) > Created attachment 36141 [details] > Make init file more generic > > Try to find the correct script engine by looking at the extension of the > init file (change the property name to jsr223.init.file at the same time) Thanks for patch. What do you think of defaulting to Groovy if engine is not found and logging a warn message saying "We'll interpret your file as groovy ..." (In reply to UbikLoadPack support from comment #3) > (In reply to Felix Schumacher from comment #2) > > Created attachment 36141 [details] > > Make init file more generic > > > > Try to find the correct script engine by looking at the extension of the > > init file (change the property name to jsr223.init.file at the same time) > > Thanks for patch. > > What do you think of defaulting to Groovy if engine is not found and logging > a warn message saying "We'll interpret your file as groovy ..." As groovy interprets quite a lot of java, groovy (and probably a bit of javascript) and it is our favourite scripting language, that might be a good idea. Created attachment 36142 [details]
Make init file more generic
Use Philippe's remark to make the init file setup more robust.
Date: Thu Sep 13 18:36:46 2018 New Revision: 1840847 URL: http://svn.apache.org/viewvc?rev=1840847&view=rev Log: Allow full JSR-223 for init scripts in JMeter startup Use jsr223.init.file to allow calling a JSR-223 script on JMeter startup instead of the envisioned groovy.init.file property. The engine to use for the init script will be determined by the extension of the filename. If the filename has no extension or if no engine can be found for that extension, Groovy will be tried. Bugzilla Id: 62700 Modified: jmeter/trunk/bin/jmeter.properties jmeter/trunk/src/core/org/apache/jmeter/JMeter.java jmeter/trunk/xdocs/changes.xml jmeter/trunk/xdocs/usermanual/properties_reference.xml This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4858 |