New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BSF elements do not load script files, attempt to interpret filename as script #2182
Comments
Thomas Johnson (migrated from Bugzilla): execute-filename.jmx<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.1">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
<stringProp name="TestPlan.user_define_classpath"></stringProp>
</TestPlan>
<hashTree>
<ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
<elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
<stringProp name="ThreadGroup.num_threads">1</stringProp>
<stringProp name="ThreadGroup.ramp_time">1</stringProp>
<longProp name="ThreadGroup.start_time">1229443625000</longProp>
<longProp name="ThreadGroup.end_time">1229443625000</longProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</ThreadGroup>
<hashTree>
<DebugSampler guiclass="TestBeanGUI" testclass="DebugSampler" testname="Debug Sampler" enabled="true">
<boolProp name="displayJMeterProperties">false</boolProp>
<boolProp name="displayJMeterVariables">true</boolProp>
<boolProp name="displaySystemProperties">false</boolProp>
</DebugSampler>
<hashTree>
<BSFPostProcessor guiclass="TestBeanGUI" testclass="BSFPostProcessor" testname="BSF PostProcessor" enabled="true">
<stringProp name="filename">OUT.println("--- filename ---")</stringProp>
<stringProp name="parameters"></stringProp>
<stringProp name="script">OUT.println("--- script ---")</stringProp>
<stringProp name="scriptLanguage">javascript</stringProp>
</BSFPostProcessor>
<hashTree/>
</hashTree>
</hashTree>
</hashTree>
</hashTree>
</jmeterTestPlan> |
Thomas Johnson (migrated from Bugzilla): |
Sebb (migrated from Bugzilla): The code for processing script files was completely broken - it did not bother reading the file - oops! Fixed in SVN in r728228. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thomas Johnson (Bug 46407):
When specifying a script file in the BSF post-processor, the filename is treated as a code snippet instead of being loaded, taking precedence over the regular script.
This likely also affects the BSF Preprocessor, Assertion, and Listener, as they all call the BSFTestElement.processFileOrScript(BSFManager) method. The processFileOrScript method currently takes the filename and passes it directly to the script manager for evaluation instead of loading the file and passing its contents to the script manager.
Steps to Reproduce:
Expected Results:
Actual Results:
Version: Nightly
Severity: normal
OS: Mac OS X 10.4
The text was updated successfully, but these errors were encountered: