public class ExecutableScript
extends java.lang.Object
This class handles the execution of a completely generated execution script.
| Constructor and Description |
|---|
ExecutableScript(int neededThreadQty,
org.threadly.load.ExecutableScript.ExecutionItem startExecutionItem)
Constructs a new
ExecutableScript. |
| Modifier and Type | Method and Description |
|---|---|
int |
getThreadQtyNeeded()
Returns how many threads will be started when the script is executed.
|
java.util.List<org.threadly.concurrent.future.ListenableFuture<StepResult>> |
startScript()
Starts the execution of the script.
|
public ExecutableScript(int neededThreadQty,
org.threadly.load.ExecutableScript.ExecutionItem startExecutionItem)
ExecutableScript. If the minimum threads needed don't match the
execution graph provided, it may restrict load, or never complete.
Execution will not proceed to the next step until the previous step has fully completed.neededThreadQty - Minimum number of threads to execute provided stepsstartExecutionItem - Execution item which represents the scriptpublic int getThreadQtyNeeded()
public java.util.List<org.threadly.concurrent.future.ListenableFuture<StepResult>> startScript()
StepResult. That StepResult will indicate either a successful or
failure in execution. If a failure does occur then future test steps will NOT be executed.
If a step was never executed due to a failure, those futures will be resolved in an error
(thus calls to Future.get() will throw a
ExecutionException). You can use
StepResultCollectionUtils.getFailedResult(java.util.Collection) to see if any steps failed.
This will block till all steps have completed (or a failed test step occurred). If
StepResultCollectionUtils.getFailedResult(java.util.Collection) returns null, then the test
completed without error.