About break conditions for Parallel TestStep

I'm a beginner with OpenTap.I have a question about basic usage.
It's about the Parallel break condition.

Will a Break only occur if all TestSteps under the Parallel have completed their processing?

For example, suppose the Parallel break condition is set to "Break on Fail" and there are two TestSteps, A and B, under the Parallel.

If TestStep A completes its processing before TestStep B and results in a Fail, is it correct to understand that the Break will not occur until TestStep B has completed its processing?

Hi @pinetail0504 and welcome to the forum.

Break conditions gets checked between the execution of test steps, since all steps in the parallel step starts concurrently, it won’t check this.

You could write some custom logic to do something like what you ask, but the other steps would have to ‘collaborate’ to be able to stop early. You can check the out code for the parallel step here: opentap/BasicSteps/ParallelStep.cs at main · opentap/opentap · GitHub.

One thing you could make is a feature to abort the child step threads that has not run to completion.

In OpenTAP there is the concept of a TapThread. TapThread.Abort signals all child threads to stop, but they have to ‘collaboratively’ check TapThread.Current.AbortToken to handle abort. For example the delay step does this by using TapThread.Sleep: opentap/BasicSteps/DelayStep.cs at main · opentap/opentap · GitHub

Thank you so much for your quick and detailed response.

I really appreciate your help with the C# issue.

I’ll take a closer look at your suggestions and try them out. Thanks again for your support.