All Downloads are FREE. Search and download functionalities are using the official Maven repository.

us.abstracta.jmeter.javadsl.codegeneration.SingleGuiClassCallBuilder Maven / Gradle / Ivy

Go to download

Simple API to run JMeter performance tests in an VCS and programmers friendly way.

There is a newer version: 028
Show newest version
package us.abstracta.jmeter.javadsl.codegeneration;

import java.lang.reflect.Method;
import java.util.List;
import org.apache.jmeter.gui.JMeterGUIComponent;
import org.apache.jmeter.testelement.TestElement;

/**
 * Abstracts common logic for usual scenario where MethodCallBuilders apply to test elements
 * associated to certain JMeter Gui component.
 * 

* In most of the cases a {@link MethodCallBuilder} can simply extend this or {@link * SingleTestElementCallBuilder} class. Scenarios where these classes would not be used are complex * ones which cover several test elements. Eg: * {@link us.abstracta.jmeter.javadsl.core.threadgroups.DslDefaultThreadGroup} * handles both JMeter default thread groups but also ultimate thread groups. *

* This class abstracts logic of checking if a test element MethodCall should be generated by this * builder or not, just comparing if the test element associated JMeter GUI component is of the type * associated to the MethodCallBuilder instance. * * @since 0.52 */ public abstract class SingleGuiClassCallBuilder extends MethodCallBuilder { protected final Class guiClass; protected SingleGuiClassCallBuilder(Class guiClass, List builderMethods) { super(builderMethods); this.guiClass = guiClass; } @Override public boolean matches(MethodCallContext context) { return guiClass.getName() .equals(context.getTestElement().getPropertyAsString(TestElement.GUI_CLASS)); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy