https://issues.apache.org/bugzilla/show_bug.cgi?id=46359
Summary: BSF JavaScript Preprocessor cannot access sampler variable on first interation Product: JMeter Version: 2.3.2 Platform: PC OS/Version: Mac OS X 10.4 Status: NEW Severity: normal Priority: P2 Component: Main AssignedTo: jmeter-dev@jakarta.apache.org ReportedBy: [EMAIL PROTECTED] Created an attachment (id=22999) --> (https://issues.apache.org/bugzilla/attachment.cgi?id=22999) Test Case illustrating issue The BSF JavaScript Preprocessor is unable to access the Sampler variable in the first iteration, citing the following exception: org.apache.bsf.BSFException: JavaScript Error: Internal Error: org.mozilla.javascript.EcmaError: ReferenceError: "sampler" is not defined. Steps to Reproduce: 1-Create a Thread Group set to run for two or more iterations 2-Add a Sampler to the Thread Group (tested with an HTTP Sampler) 3-Add a BSF PreProcessor to the Sampler 4-Use javascript as the BSF Language 5-Enter a simple script that references the "sampler" variable. Tested with OUT.println("hello"); OUT.println(sampler); 6-Run Expected Results: - All iterations produce console output "hello\n[sampler information]" Actual Results: - First Iteration, only "hello" is output to console. - Log Output: 2008/12/07 12:21:51 WARN - jmeter.modifiers.BSFPreProcessor: Problem in BSF script org.apache.bsf.BSFException: JavaScr ipt Error: Internal Error: org.mozilla.javascript.EcmaError: ReferenceError: "sampler" is not defined. - Second and further iterations "hello\n[sampler information]" Affects Versions: - Trunk revision 722843 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=722843 ) - Release 2.3.2 -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]