Package org.apache.jmeter.engine
Class StandardJMeterEngine
java.lang.Object
org.apache.jmeter.engine.StandardJMeterEngine
- All Implemented Interfaces:
Runnable,JMeterEngine
Runs JMeter tests, either directly for local GUI and non-GUI invocations,
or started by
RemoteJMeterEngineImpl when running in server mode.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClean shutdown ie, wait for end of current running samplersvoidawaitTermination(Duration duration) voidConfigure enginevoidexit()Remote exit Called by RemoteJMeterEngineImpl.rexit() and by notifyTestListenersOfEnd() iff exitAfterTest is true; in turn that is called by the run() method and the StopTest class also calledbooleanisActive()static voidvoidreset()Stop test if runningvoidrun()voidrunTest()Runs the testvoidset Properties on enginestatic voidstatic voidvoidstopTest()Stop Test NowvoidstopTest(boolean now) static booleanstopThread(String threadName) static booleanstopThreadNow(String threadName)
-
Constructor Details
-
StandardJMeterEngine
public StandardJMeterEngine() -
StandardJMeterEngine
-
-
Method Details
-
stopEngineNow
public static void stopEngineNow() -
stopEngine
public static void stopEngine() -
register
-
stopThread
-
stopThreadNow
-
configure
Description copied from interface:JMeterEngineConfigure engine- Specified by:
configurein interfaceJMeterEngine- Parameters:
testTree- the test plan
-
runTest
Description copied from interface:JMeterEngineRuns the test- Specified by:
runTestin interfaceJMeterEngine- Throws:
JMeterEngineException- if an error occurs
-
awaitTermination
@API(status=EXPERIMENTAL, since="5.6") public void awaitTermination(Duration duration) throws ExecutionException, InterruptedException, TimeoutException -
reset
public void reset()Description copied from interface:JMeterEngineStop test if running- Specified by:
resetin interfaceJMeterEngine
-
stopTest
public void stopTest()Stop Test Now- Specified by:
stopTestin interfaceJMeterEngine
-
stopTest
public void stopTest(boolean now) - Specified by:
stopTestin interfaceJMeterEngine- Parameters:
now- boolean that tell whether stop is immediate (interrupt) or not (wait for current sample end)
-
run
public void run() -
askThreadsToStop
public void askThreadsToStop()Clean shutdown ie, wait for end of current running samplers -
exit
public void exit()Remote exit Called by RemoteJMeterEngineImpl.rexit() and by notifyTestListenersOfEnd() iff exitAfterTest is true; in turn that is called by the run() method and the StopTest class also called- Specified by:
exitin interfaceJMeterEngine
-
setProperties
Description copied from interface:JMeterEngineset Properties on engine- Specified by:
setPropertiesin interfaceJMeterEngine- Parameters:
p- the properties to set
-
isActive
public boolean isActive()- Specified by:
isActivein interfaceJMeterEngine- Returns:
- boolean Flag to show whether engine is active (true when test is running). Set to false at end of test
-