# Pre Plan Run Event

**URL:** <https://forum.opentap.io/t/pre-plan-run-event/1008>\
**Category:** General\
**Created:** [January 28, 2023, 3:11pm UTC](https://forum.opentap.io/t/pre-plan-run-event/1008 "2023-01-28T15:11:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![btyilmaz](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@btyilmaz](https://forum.opentap.io/u/btyilmaz)\
**Post date:** [January 28, 2023, 3:11pm UTC](https://forum.opentap.io/t/pre-plan-run-event/1008/1 "2023-01-28T15:11:54Z")

</div>

Hello everyone,

I want to show settings window in a single pop-up window prior to test plan run. I know there is a settings panel for custom settings and others, but what i want to do is that operator should set these settings after pressing the Run button by popping up a window.

I can show the window if there is an event that is fired up before test plan starts to run. Is there any event like that or any other way to do it?

---

<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:** [January 29, 2023, 5:21pm UTC](https://forum.opentap.io/t/pre-plan-run-event/1008/2 "2023-01-29T17:21:55Z")

</div>

Hi @btyilmaz.

You can look into ITestPlanRunMonitor.

```cs
     // This must be implemented by something inheriting from ComponentSettings
    [Browsable(false)]
    public class MyTPRM : ComponentSettings<MyTPRM>, ITestPlanRunMonitor
    {

        // happens very early during the test plan run
        public void EnterTestPlanRun(TestPlanRun plan)
        {
            
        }
        
        // happens very late during the test plan run
        public void ExitTestPlanRun(TestPlanRun plan)
        {
            
        }
    }

```

Extra tip: For popping up the window I suggest you use UserInput.Request.

---

<div class="post-metadata">

**Author:** ![alexander.larsen](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@alexander.larsen](https://forum.opentap.io/u/alexander.larsen)\
**Post date:** [January 30, 2023, 11:20am UTC](https://forum.opentap.io/t/pre-plan-run-event/1008/3 "2023-01-30T11:20:58Z")

</div>

I second what @rolf_madsen said!

Though I would like to add that `ComponentSettings<MyTPRM>` is not optional. If you don’t inherit from this type, then it won’t work.

---

<div class="post-metadata">

**Author:** ![btyilmaz](https://avatars.discourse-cdn.com/v4/letter/b/a3d4f5/32.png) [@btyilmaz](https://forum.opentap.io/u/btyilmaz)\
**Post date:** [January 30, 2023, 11:24am UTC](https://forum.opentap.io/t/pre-plan-run-event/1008/4 "2023-01-30T11:24:50Z")

</div>

Thanks!, I achieved exactly what I wanted this way.
