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:

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!

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