Provide a way to check inside the script if stop button was pressed or loadtest has ended
Currently it is possible only to end the script at the moment the loadtest has ended or to finish the whole transaction. If some parts of the transaction should not be interrupted, but the whole transaction might take a long time to complete, we have to wait for the whole transaction to complete at the end of the test.
As an example - we have a loop inside the transaction that will go to the next iteration based on some probability, so while the mean number of repetitions is low, it might climb even to several hours. We can not disrupt the script in the middle of iteration, but if we would be able to find out that the test has ended, we could end the transaction sooner by not proceeding to the next iteration of the loop.
Philip Lonsing commented
There exists a not very well known concept called "Checkpoint" in Silk Performer (details see online doc - API call "Checkpoint").
Maybe the "Checkpoint" concept can be combined with this requirement. There may be an option which says "continue until next checkpoint for stopped virtual users". If it is enabled the stopped virtual user continues running until the next checkpoint or the end of the transaction is reached.