# Setting Verdict.Aborted does not stop the Execution

**URL:** <https://forum.opentap.io/t/setting-verdict-aborted-does-not-stop-the-execution/2431>\
**Category:** Technical\
**Tags:** plugin\
**Created:** [April 15, 2025, 3:37am UTC](https://forum.opentap.io/t/setting-verdict-aborted-does-not-stop-the-execution/2431 "2025-04-15T03:37:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajanbabu033](https://avatars.discourse-cdn.com/v4/letter/r/90ced4/32.png) [@rajanbabu033](https://forum.opentap.io/u/rajanbabu033)\
**Post date:** [April 15, 2025, 3:37am UTC](https://forum.opentap.io/t/setting-verdict-aborted-does-not-stop-the-execution/2431/1 "2025-04-15T03:37:07Z")

</div>

Hi,  
We are using Keysight 9.26.1 developer version.  
When TestStep set the Teststep verdict as Verdict.Aborted, It does not stop the Test step execution. It continue to execute the remaining test steps. But setting Verdict.Error stop the Test execution.

In order to stop the Test execution after setting verdict as Aborted, need to throw OperationCanceledException(). But this change verdict from Aborted(Set By TestStep) to Error.

1. How to stop the execution after setting verdict as Aborted without throwing OperationCanceledException.
2. If above is limitation, Is there anyway, throwing OperationCanceledException should not change previously set verdict?

---

<div class="post-metadata">

**Author:** ![rolf\_madsen](https://avatars.discourse-cdn.com/v4/letter/r/43a26b/32.png) [@rolf\_madsen](https://forum.opentap.io/u/rolf_madsen)\
**Post date:** [May 12, 2025, 6:18am UTC](https://forum.opentap.io/t/setting-verdict-aborted-does-not-stop-the-execution/2431/2 "2025-05-12T06:18:42Z")

</div>

Hi @rajanbabu033,

If you want to end test plan execution, you can abort the test plan main thread. This behaves the same as clicking the stop button in the UI.

```cs
step.PlanRun.MainThread.Abort();

```

Note, that this is not as flexible as throwing an exception. It cannot be handled or undone by e.g a parent step.
