You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The case:
I use in jmx files - groovy scripts located at: ex. src/test/jmeter/scripts/example.groovy
The jmx is in src/test/jmeter/example.jmx and the script is refenced by path scripts/example.groovy
All folders/files are copied during execution to target/jmeter/testFiles.
But the script execution fails due to exception. Jmeter is looking for script at target/<uniq_id>/jmetre/bin : 2022-03-22 16:12:08,304 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in JSR223 script Load Properties, message: javax.script.ScriptException: Script file 'C:\Users\*\IdeaProjects\performance_test\target\5009dd86-c21d-4a89-9293-1fad1ba2a7eb\jmeter\bin\..\scripts\example.groovy' does not exist or is unreadable for element:Load Properties javax.script.ScriptException: Script file 'C:\Users\*\IdeaProjects\performance_test\target\5009dd86-c21d-4a89-9293-1fad1ba2a7eb\jmeter\bin\..\scripts\example.groovy' does not exist or is unreadable for element:Load Properties at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:200) ~[ApacheJMeter_core-5.4.3.jar:5.4.3] at org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sampler.java:72) [ApacheJMeter_java-5.4.3.jar:5.4.3] at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638) [ApacheJMeter_core-5.4.3.jar:5.4.3] at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) [ApacheJMeter_core-5.4.3.jar:5.4.3] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core-5.4.3.jar:5.4.3] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core-5.4.3.jar:5.4.3] at java.lang.Thread.run(Thread.java:750) [?:1.8.0_321]
It's expected to handle all references to scripts from testFiles folder.
The text was updated successfully, but these errors were encountered:
By default JMeter uses the bin directory as its current working directory, changing that has repercussions and would probably cause more problems in the long run.
The most sensible fix would be to provide a test file directory property, so that you can refer to the test file directory in your scripts.
Config:
Java - 8.321
JMeter - 5.4.3
Maven - 3.6.3
JMeter-Maven-Plugin - 3.5.0
The case:
I use in jmx files - groovy scripts located at: ex. src/test/jmeter/scripts/example.groovy
The jmx is in src/test/jmeter/example.jmx and the script is refenced by path scripts/example.groovy
All folders/files are copied during execution to target/jmeter/testFiles.
But the script execution fails due to exception. Jmeter is looking for script at target/<uniq_id>/jmetre/bin :
2022-03-22 16:12:08,304 ERROR o.a.j.p.j.s.JSR223Sampler: Problem in JSR223 script Load Properties, message: javax.script.ScriptException: Script file 'C:\Users\*\IdeaProjects\performance_test\target\5009dd86-c21d-4a89-9293-1fad1ba2a7eb\jmeter\bin\..\scripts\example.groovy' does not exist or is unreadable for element:Load Properties javax.script.ScriptException: Script file 'C:\Users\*\IdeaProjects\performance_test\target\5009dd86-c21d-4a89-9293-1fad1ba2a7eb\jmeter\bin\..\scripts\example.groovy' does not exist or is unreadable for element:Load Properties at org.apache.jmeter.util.JSR223TestElement.processFileOrScript(JSR223TestElement.java:200) ~[ApacheJMeter_core-5.4.3.jar:5.4.3] at org.apache.jmeter.protocol.java.sampler.JSR223Sampler.sample(JSR223Sampler.java:72) [ApacheJMeter_java-5.4.3.jar:5.4.3] at org.apache.jmeter.threads.JMeterThread.doSampling(JMeterThread.java:638) [ApacheJMeter_core-5.4.3.jar:5.4.3] at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:558) [ApacheJMeter_core-5.4.3.jar:5.4.3] at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:489) [ApacheJMeter_core-5.4.3.jar:5.4.3] at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:256) [ApacheJMeter_core-5.4.3.jar:5.4.3] at java.lang.Thread.run(Thread.java:750) [?:1.8.0_321]
It's expected to handle all references to scripts from testFiles folder.
The text was updated successfully, but these errors were encountered: