If I understand correctly, you start the application clicking on the "Run" arrow each time you want your test program done.
Indeed the Top Level VI runs by default when opening in an application so you can't control the first run. This can't be avoided. Even if you change the setting of the VI in the Application builder to not run when opened, this setting is overridden for Top Level VIs.
You have to rework your user interface a little. Put all your code in a while loop with a stop boolean button wired to the loop terminal. Add another boolean "TEST" and a case statement that will execute the test code when the user clicks on "TEST". In the loop add a small wait of 100-250ms to avoid that the loop runs wild polling the booleans when it is idle.
That is not the usual way to Run an application using the Run button. Usually the application enters in a loop until the user put it to stop with a stop button on the front panel. Then the application terminates and closes its window. That is what the user expects from the standard user interface.