public class DslJsr223Sampler extends DslJsr223TestElement<DslJsr223Sampler,DslJsr223Sampler.SamplerVars> implements DslSampler
This is a very powerful component, but using it makes code harder to maintain. When there is another sampler available that satisfy your needs use it instead of this one.
By default, provided script will be interpreted as groovy script, which is the default setting
for JMeter. If you need, you can use any of JMeter provided scripting languages (beanshell,
javascript, jexl, etc.) by setting the DslJsr223TestElement.language(String) property.
| Modifier and Type | Class and Description |
|---|---|
static class |
DslJsr223Sampler.CodeBuilder |
static class |
DslJsr223Sampler.DslLambdaSampler |
static interface |
DslJsr223Sampler.SamplerScript
Allows to use any java code as script.
|
static class |
DslJsr223Sampler.SamplerVars |
DslJsr223TestElement.Jsr223DslLambdaTestElement<V extends DslJsr223TestElement.Jsr223ScriptVars>, DslJsr223TestElement.Jsr223Script<V extends DslJsr223TestElement.Jsr223ScriptVars>, DslJsr223TestElement.Jsr223ScriptVars, DslJsr223TestElement.Jsr223TestElementCallBuilder<T extends org.apache.jmeter.testelement.TestElement>| Modifier and Type | Field and Description |
|---|---|
protected List<BaseSampler.SamplerChild> |
children |
DEFAULT_LANGUAGE, language, script, scriptClass, scriptStringguiClass, name| Constructor and Description |
|---|
DslJsr223Sampler(String name,
Class<? extends DslJsr223Sampler.SamplerScript> scriptClass) |
DslJsr223Sampler(String name,
DslJsr223Sampler.SamplerScript script) |
DslJsr223Sampler(String name,
String script) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.jmeter.util.JSR223TestElement |
buildJsr223TestElement() |
protected DslJsr223Sampler.DslLambdaSampler |
buildLambdaTestElement() |
org.apache.jorphan.collections.HashTree |
buildTreeUnder(org.apache.jorphan.collections.HashTree parent,
BuildTreeContext context)
Builds the JMeter HashTree for this TestElement under the provided tree node.
|
DslJsr223Sampler |
children(BaseSampler.SamplerChild... children)
Allows specifying children test elements for the sampler, which allows for example extracting
information from response, assert response contents, etc.
|
buildTestElement, languagebuildConfiguredTestElement, buildTestElementGui, configureTestElement, durationToSeconds, loadBeanProperties, showAndWaitFrameWith, showFrameWith, showInGui, showTestElementGuiclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitshowInGuiprotected final List<BaseSampler.SamplerChild> children
public DslJsr223Sampler(String name, DslJsr223Sampler.SamplerScript script)
public DslJsr223Sampler(String name, Class<? extends DslJsr223Sampler.SamplerScript> scriptClass)
public DslJsr223Sampler children(BaseSampler.SamplerChild... children)
children - list of test elements to add as children of this sampler.protected org.apache.jmeter.util.JSR223TestElement buildJsr223TestElement()
buildJsr223TestElement in class DslJsr223TestElement<DslJsr223Sampler,DslJsr223Sampler.SamplerVars>protected DslJsr223Sampler.DslLambdaSampler buildLambdaTestElement()
buildLambdaTestElement in class DslJsr223TestElement<DslJsr223Sampler,DslJsr223Sampler.SamplerVars>public org.apache.jorphan.collections.HashTree buildTreeUnder(org.apache.jorphan.collections.HashTree parent,
BuildTreeContext context)
DslTestElementbuildTreeUnder in interface DslTestElementbuildTreeUnder in class BaseTestElementparent - the node which will be the parent for the created tree.context - context information which contains information shared by elements while building
the test plan tree (eg: adding additional items to test plan when a particular protocol element
is added).Copyright © 2024. All rights reserved.