public class BlazeMeterEngine extends Object implements DslJmeterEngine
DslJmeterEngine which allows running DslTestPlan in BlazeMeter.| Constructor and Description |
|---|
BlazeMeterEngine(String authToken) |
| Modifier and Type | Method and Description |
|---|---|
BlazeMeterEngine |
availableDataTimeout(Duration availableDataTimeout)
Specifies a timeout for waiting for test data (metrics) to be available in BlazeMeter.
|
BlazeMeterEngine |
holdFor(Duration holdFor)
Specifies the duration of time to keep the virtual users running, after the rampUp period.
|
BlazeMeterEngine |
iterations(int iterations)
Specifies the number of iterations each virtual user will execute.
|
BlazeMeterEngine |
projectId(long projectId)
Specifies the ID of the BlazeMeter project where to run the test.
|
BlazeMeterEngine |
rampUpFor(Duration rampUp)
Sets the duration of time taken to start the specified total users.
|
TestPlanStats |
run(DslTestPlan testPlan) |
BlazeMeterEngine |
testName(String testName)
Sets the name of the BlazeMeter test to use.
|
BlazeMeterEngine |
testTimeout(Duration testTimeout)
Specifies a timeout for the entire test execution.
|
BlazeMeterEngine |
threadsPerEngine(int threadsPerEngine)
Specifies the number of threads/virtual users to use per BlazeMeter engine (host or
container).
|
BlazeMeterEngine |
totalUsers(int totalUsers)
Specifies the number of virtual users to use when running the test.
|
public BlazeMeterEngine(String authToken)
authToken - is the authentication token to be used to access BlazeMeter API.It follows the following format: <Key ID>:<Key Secret>.
Check BlazeMeter API keys for instructions on how to generate them.
public BlazeMeterEngine testName(String testName)
projectId(long)) and if one exists, it will update it and use it to run the provided test
plan. If a test with the given name does not exist, then it will create a new one to run the
given test plan.
When not specified, the test name defaults to "jmeter-java-dsl".testName - specifies the name of the test to update or create in BlazeMeter.public BlazeMeterEngine projectId(long projectId)
projectId - is the ID of the project to be used to run the test.public BlazeMeterEngine testTimeout(Duration testTimeout)
testTimeout - to be used as time limit for test execution. If execution takes more than
this, then a TimeoutException will be thrown by the engine.public BlazeMeterEngine availableDataTimeout(Duration availableDataTimeout)
availableDataTimeout - to wait for available data after a test ends, before throwing a
TimeoutException.public BlazeMeterEngine totalUsers(int totalUsers)
totalUsers - number of virtual users to run the test with.public BlazeMeterEngine rampUpFor(Duration rampUp)
rampUp - duration that BlazeMeter will take to spin up all the virtual users.public BlazeMeterEngine iterations(int iterations)
iterations - for each virtual users to execute.public BlazeMeterEngine holdFor(Duration holdFor)
holdFor - duration to keep virtual users running after the rampUp period.public BlazeMeterEngine threadsPerEngine(int threadsPerEngine)
threadsPerEngine - the number of threads/virtual users to execute per BlazeMeter engine.public TestPlanStats run(DslTestPlan testPlan) throws IOException, InterruptedException, TimeoutException
run in interface DslJmeterEngineIOExceptionInterruptedExceptionTimeoutExceptionCopyright © 2020. All rights reserved.