I think that you will need 2 applications.
1 application will perform the test and if successful generate the batch load process command that will load the main application.
So the first application will work the way that you envisage above. If the script marker is a "Y" then execute the batch process to load your main application (which will have no tests in it). The command will be similar to:
"C:\Program Files\QlikView\qv.exe /r C:\Path\To\Document.qvw"
Hope this helps