Forum Discussion

Vaisag's avatar
Vaisag
New Contributor
5 years ago

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. ...
  • tristaanogre's avatar
    5 years ago

    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.