Introduction
Often some of the actions you run will fail due to a variety of reasons. Maybe the Test application cannot handle the load or it is not configured properly or there are some sporadic networking issues and etc.
The important question here is whether failing actions should result in failing the whole queue which will mark the test as failed, or maybe a certain amount of failed actions is not a big deal.
As there are different opinions, we provide a way to configure when a queue will fail based on the amount of failed action executions.
Specify queue pass rate
By default, the actions queue will be marked as failed when there is even one failed action.
Let's have a look at the following partial example:
// create one of the supported threading patterns ThreadingPattern pattern = new AllAtOncePattern( 100, true, 10, 0 ); // specify the queue pass rate in % pattern.setQueuePassRate( 90 );
As you can see, we set a queue pass rate which is in percent. In this example the queue will pass if at least 90% of the iterations pass otherwise, the queue will be marked as failed and so will the test case.
In Test Explorer this threading pattern will be described as All at once - 100 threads, 10 continuous iterations, pass if 90.0% of the iterations pass. As we have 1000 iterations(100 threads with 10 iterations each) this means the queue will pass if at least 900 iterations pass.
Back to parent page
Go to Table of Contents