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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Clean shutdown ie, wait for end of current running samplersvoid
awaitTermination
(Duration duration) void
Configure enginevoid
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 calledboolean
isActive()
static void
void
reset()
Stop test if runningvoid
run()
void
runTest()
Runs the testvoid
set Properties on enginestatic void
static void
void
stopTest()
Stop Test Nowvoid
stopTest
(boolean now) static boolean
stopThread
(String threadName) static boolean
stopThreadNow
(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:JMeterEngine
Configure engine- Specified by:
configure
in interfaceJMeterEngine
- Parameters:
testTree
- the test plan
-
runTest
Description copied from interface:JMeterEngine
Runs the test- Specified by:
runTest
in 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:JMeterEngine
Stop test if running- Specified by:
reset
in interfaceJMeterEngine
-
stopTest
public void stopTest()Stop Test Now- Specified by:
stopTest
in interfaceJMeterEngine
-
stopTest
public void stopTest(boolean now) - Specified by:
stopTest
in 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:
exit
in interfaceJMeterEngine
-
setProperties
Description copied from interface:JMeterEngine
set Properties on engine- Specified by:
setProperties
in interfaceJMeterEngine
- Parameters:
p
- the properties to set
-
isActive
public boolean isActive()- Specified by:
isActive
in interfaceJMeterEngine
- Returns:
- boolean Flag to show whether engine is active (true when test is running). Set to false at end of test
-