public abstract class BaseTestElement extends Object implements DslTestElement
DslTestElement
.
In particular, it currently allows to set the name of the TestElement and abstracts building of the tree only requiring, from subclasses, to implement the logic to build the JMeter TestElement. The test element name is particularly useful for later reporting and statistics collection to differentiate metrics for each test element.
Subclasses may overwrite buildTreeUnder(org.apache.jorphan.collections.HashTree, us.abstracta.jmeter.javadsl.core.BuildTreeContext)
if they need additional logic (e.g: TestElementContainer
).
Modifier and Type | Field and Description |
---|---|
protected Class<? extends org.apache.jmeter.gui.JMeterGUIComponent> |
guiClass |
protected String |
name |
Modifier | Constructor and Description |
---|---|
protected |
BaseTestElement(String name,
Class<? extends org.apache.jmeter.gui.JMeterGUIComponent> guiClass) |
Modifier and Type | Method and Description |
---|---|
protected org.apache.jmeter.testelement.TestElement |
buildConfiguredTestElement() |
protected abstract org.apache.jmeter.testelement.TestElement |
buildTestElement() |
protected Component |
buildTestElementGui(org.apache.jmeter.testelement.TestElement testElement) |
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.
|
protected static org.apache.jmeter.testelement.TestElement |
configureTestElement(org.apache.jmeter.testelement.TestElement ret,
String name,
Class<? extends org.apache.jmeter.gui.JMeterGUIComponent> guiClass) |
protected static long |
durationToSeconds(Duration duration) |
static void |
loadBeanProperties(org.apache.jmeter.testelement.TestElement bean) |
protected void |
showAndWaitFrameWith(Component content,
String title,
int width,
int height) |
protected void |
showFrameWith(Component content,
String title,
int width,
int height,
Runnable closeListener) |
void |
showInGui()
Shows the test element in it's defined GUI in a popup window.
|
void |
showTestElementGui(Component guiComponent,
Runnable closeListener) |
protected String name
protected Class<? extends org.apache.jmeter.gui.JMeterGUIComponent> guiClass
public org.apache.jorphan.collections.HashTree buildTreeUnder(org.apache.jorphan.collections.HashTree parent, BuildTreeContext context)
DslTestElement
buildTreeUnder
in interface DslTestElement
parent
- 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).protected org.apache.jmeter.testelement.TestElement buildConfiguredTestElement()
protected static org.apache.jmeter.testelement.TestElement configureTestElement(org.apache.jmeter.testelement.TestElement ret, String name, Class<? extends org.apache.jmeter.gui.JMeterGUIComponent> guiClass)
protected abstract org.apache.jmeter.testelement.TestElement buildTestElement()
public static void loadBeanProperties(org.apache.jmeter.testelement.TestElement bean)
public void showInGui()
DslTestElement
showInGui
in interface DslTestElement
protected Component buildTestElementGui(org.apache.jmeter.testelement.TestElement testElement)
protected void showFrameWith(Component content, String title, int width, int height, Runnable closeListener)
protected void showAndWaitFrameWith(Component content, String title, int width, int height)
protected static long durationToSeconds(Duration duration)
Copyright © 2024. All rights reserved.