You need to:
* download beanshell from www.beanshell.org and put it in the lib directory
* use the BeanShell sampler, not the BSF Sampler.
S
On 30/03/06, Simon <[EMAIL PROTECTED]> wrote:
> hi .. i don´t understand how to use the BSF sampler .. i think it should be
> very easy .. but i can´t make it work ...
>
> i made a BSF sampler with the following entries:
>
> Language: javascript
> Script to run: exec("C:\Apps\Tomcat5\jakarta-tomcat-5.5.9\bin\catalina run")
>
> here is the jmeter.log
>
> 2006/03/30 12:06:45 INFO - jmeter.engine.StandardJMeterEngine: Running the
> test!
> 2006/03/30 12:06:45 INFO - jmeter.gui.util.JMeterMenuBar:
> setRunning(true,local)
> 2006/03/30 12:06:46 INFO - jmeter.engine.StandardJMeterEngine: Starting 1
> threads for group Grupo de Hilos. Ramp up = 1.
> 2006/03/30 12:06:46 INFO - jmeter.engine.StandardJMeterEngine: Continue on
> error
> 2006/03/30 12:06:46 INFO - jmeter.threads.JMeterThread: Thread Grupo de
> Hilos 1-1 started
> 2006/03/30 12:06:46 INFO - jmeter.protocol.java.sampler.BSFSampler:
> Muestreador BSF
> 2006/03/30 12:06:46 ERROR - jmeter.threads.JMeterThread: Test failed!
> java.lang.NoSuchMethodError:
> org.mozilla.javascript.Context.getDebuggableEngine
> ()Lorg/mozilla/javascript/debug/DebuggableEngine;
> at org.apache.bsf.engines.javascript.JavaScriptEngine.eval(Unknown
> Source)
> at org.apache.jmeter.protocol.java.sampler.BSFSampler.sample(
> BSFSampler.java:120)
> at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:247)
> at java.lang.Thread.run(Unknown Source)
>
> 2006/03/30 12:06:46 INFO - jmeter.threads.JMeterThread: Thread Grupo de
> Hilos 1-1 is done
> 2006/03/30 12:06:46 INFO - jmeter.engine.StandardJMeterEngine: Ending
> thread 0
> 2006/03/30 12:06:46 INFO - jmeter.engine.StandardJMeterEngine: Stopping
> test
> 2006/03/30 12:06:46 INFO - jmeter.engine.StandardJMeterEngine: Notifying
> test listeners of end of test
> 2006/03/30 12:06:46 INFO - jmeter.gui.util.JMeterMenuBar:
> setRunning(false,local)
> 2006/03/30 12:06:46 INFO - jmeter.engine.StandardJMeterEngine: Test has
> ended
>
> i looked at the BSF page, but it doesn´t explain very well how to use the
> framework.
> thanks for help
>
> simon
>
>
> 2006/3/30, sebb <[EMAIL PROTECTED]>:
> >
> > Good point, I'd overlooked that.
> >
> > But it does require a bit of "code" ... I guess with more code, one
> > could probably redirect the output into the sample response.
> >
> > S.
> > On 30/03/06, Eddie O'Sullivan <[EMAIL PROTECTED]> wrote:
> > >
> > >
> > >
> > >
> > >
> > > If you use a BeanShell and the command exec("LocationOfBatchFile.bat")
> > this
> > > will run a batch file for you and any output will go to the batch file
> > that
> > > launched JMeter,
> > >
> > > Eddie
> > >
> > >
> > >
> > > Eddie
> > O'Sullivan (Embedded
> > image
> > > Application
> > Performance moved to file:
> > > Group
> > pic17219.gif)
> > >
> > > QAD Ireland Ltd. [EMAIL PROTECTED]
> > > Hamilton House Tel: +353 61 213616
> > > National Technological Park
> > > Limerick, Ireland
> > > http://www.qad.com/
> > >
> > >
> > > A Passion for Manufacturing
> > >
> > >
> > > This e-mail may contain QAD
> > > proprietary information and
> > > should be treated as
> > > confidential.
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > sebb
> > > <[EMAIL PROTECTED]
> > >
> > > To
> > > "JMeter Users List"
> > > 28/03/2006 23:40 <[email protected]>
> >
> > > cc
> > >
> > > Please respond to
> > Subject
> > > "JMeter Users Re: Running batch files
> > > List"
> > > <[EMAIL PROTECTED]
> > > rta.apache.org>
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > JMeter can't run arbitrary batch scripts.
> > >
> > > But you can run JMeter from a batch file - read up about non-GUI mode.
> > >
> > > In windows, you can drop a JMX file onto jmeter-n.bat and it will
> > > automatically run the script in non-GUI mode.
> > >
> > > And you can write your own batch script to run jmeter in non-GUI mode.
> > >
> > > S.
> > > On 28/03/06, Derek Bradley <[EMAIL PROTECTED]> wrote:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > > Is there a (simple) way of launching batch file scripts
> > > > from Jmeter?
> > > >
> > > > ie. Instead of hitting a URL, is it possible to launch a command
> > > > line batch file instead? I'm not too worried about waiting for
> > > > control to return, as I can record the execution times of those
> > > > batch files in the batch files themselves.
> > > >
> > > > Regards,
> > > > Derek
> > > >
> > > >
> > > >
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > >
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]