Setting PostRun method for execution in suit Level
We have a query on how to call a function, at end of project execution/a single unit execution/set of units execution.
Basically, we need to call a generic function at end of our script execution.
Execution mode can be a single Unit/multiple Units/Project suite level.
We have tried ‘OnStopEvent’ at Unit level. But, it is getting triggered after each functions execution in that unit and not meeting our expectation, as we need this generic function call only at end of execution.
There is no such ability to execute at a "suite" level. Project suites contain projects, not code, so anything you do will have to be managed at a project level. What I would suggest is write some code that you include as a unit or units in the last project to execute in your suite and call that code at the end.
For our automation work we do here, we actually have two projects that we created whose only purpose is "initialization" and "finalization". They are generic projects that have no actual test or application interation, simply code to initialize an automation run and finalize a run. We add those to every project suite as the first and last projects to execute respectively.
This, I believe, is going to be your best answer.