Differences between revisions 1 and 2
Revision 1 as of 2005-03-22 05:37:03
Size: 3779
Editor: anonymous
Comment: missing edit-log entry for this revision
Revision 2 as of 2009-09-20 21:56:27
Size: 3785
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
'''Navigation trail:''' ["JMeterProjectPages"] - ["JMeterDevelopment"] - ["JMeterDevelopment"]/LongTerm '''Navigation trail:''' [[JMeterProjectPages]] - [[JMeterDevelopment]] - [[JMeterDevelopment]]/LongTerm
Line 9: Line 9:
 1. After reading some of the enhancements below, I think any element could be given a ["ScriptedXXXXX"] version. ScriptedController, ScriptedAssertion, etc. GUI-wise, I'm envisioning just a big TextArea to allow testers to write scripts into. This isn't really a new point, just generalizing the previous one really.  1. After reading some of the enhancements below, I think any element could be given a [[ScriptedXXXXX]] version. ScriptedController, ScriptedAssertion, etc. GUI-wise, I'm envisioning just a big TextArea to allow testers to write scripts into. This isn't really a new point, just generalizing the previous one really.
Line 11: Line 11:
Can now use [http://www.beanshell.org/ BeanShell] in a sampler; this provides general Java scripting. (sebb - 2003-11-16) Can now use [[http://www.beanshell.org/|BeanShell]] in a sampler; this provides general Java scripting. (sebb - 2003-11-16)
Line 32: Line 32:
Have you seen what we do with JMeter's jmx files in Maven? They get converted to [http://jakarta.apache.org/commons/latka/index.html Latka's] testing format, which is inherently a [http://jakarta.apache.org/commons/sandbox/jelly/index.html Jelly] script! Have you seen what we do with JMeter's jmx files in Maven? They get converted to [[http://jakarta.apache.org/commons/latka/index.html|Latka's]] testing format, which is inherently a [[http://jakarta.apache.org/commons/sandbox/jelly/index.html|Jelly]] script!

Navigation trail: JMeterProjectPages - JMeterDevelopment - JMeterDevelopment/LongTerm


This page is devoted to discussion of the implications/developments necessary to implement scriptable components: scriptable logic controllers, samplers, assertions, extractors, etc...

There are two issues here.

  1. The .jmx file could be formatted better to make direct modification easier. My own opinion on this is that it's a low priority thing. I think the file should remain in a declarative syntax, in any case.
  2. The Sampler interface currently only allows a Sampler to return a single SampleResult. If instead, Samplers could deliver SampleResults and also continue with whatever, sending out any number of SampleResults, then developers would have a lot more freedom in developing very customized Samplers for their own needs. Furthermore, if ScriptedSampler could be developed that allowed anyone to write some python, or BeanShell, ECMAScript, etc in a GUI textbox that JMeter would then execute as a normal Sampler, but turning over processing control to the script. Testers could then write scripts on the fly that solved their particular needs. This is, IMO, much more useful than the former, more powerful, and takes advantage of everything else JMeter offers at the same time.

  3. After reading some of the enhancements below, I think any element could be given a ScriptedXXXXX version. ScriptedController, ScriptedAssertion, etc. GUI-wise, I'm envisioning just a big TextArea to allow testers to write scripts into. This isn't really a new point, just generalizing the previous one really.

Can now use BeanShell in a sampler; this provides general Java scripting. (sebb - 2003-11-16)


The following enhancements would contribute towards more script like behaviour in JMeter:

  • conditional controllers - "if" statements (basic IF controller has been added; needs extending to provide else and/or case statement)
  • Named callable controllers (not executed unless called) & Calling controller (used to execute a named controller)

    • Support for a list of named parameters with defaults would provide a basic subroutine mechanism (together these provide subroutine functionality)
  • named assertions (perhaps also need the ability to conditionally apply an assertion)
  • ability to use variables in assertions (done)
  • ability to do math operations on variables
  • ability to set and get loop counters using variables (now done)

Note that these have not yet been raised as enhancement requests in bugzilla.

-- ScottEade 2003-01-08


By adding scripting functionality to JMeter we should keep in mind that by providing a generic scripting facility sooner or later we'll also have to provide a way to debug these scripts in case they are not doing what the user expected. -- OliverRossmueller

I would like to also point out that any behavior you can think up beforehand should still be given a non-scripted component to allow non-developers to do it. Ie, conditional controllers. Let's not say to JMeter users - "yeah, you can do that, you just have to write a script". I like the idea of scripts, but I also want common actions to be available to non-scripters. - MikeStover


Have you seen what we do with JMeter's jmx files in Maven? They get converted to Latka's testing format, which is inherently a Jelly script!

  • Latka and Jelly are interesting stuff, one possible option might be to use { { { Latka/Jelly } } } as our test engine and to use the JMeter GUI as one way to edit and run the Latka files. -- OliverRossmueller

JMeterDevelopment/ScriptingSupportInJMeter (last edited 2009-09-20 21:56:27 by localhost)