Forum Discussion

didacher's avatar
didacher
Occasional Contributor
11 years ago

Ending a keyword execution at any point.

A keyword is implemented with a VBS function.  That function calls other functions which creates a stack. I am wondering if it is possible to exit a keyword at any stack level without exiting functions previously called.



keyword sendReport



Function sendReport()



     Call minimize()



End Function



Function minimize()



     ----> It is possible to terminate the keyword execution here without making first Exit Function?



End Function
  • Runner.Stop has parameter Stop Current Test Only.



    If you have your keyword tests orginized within project and you run them successively (F5 - Run Project in menu), certain keyword tests can be skipped using Runner.Stop(true) or Stop Execution keyword statement with parameter set to true.



    I don't know how to stop certain function (return to top caller?), but I think it's possible to use keyword tests as individual function wrappers and stop (skip) them instead.



    Sorry if this is not helpful for you either.
  • Runner.Stop has parameter Stop Current Test Only.



    If you have your keyword tests orginized within project and you run them successively (F5 - Run Project in menu), certain keyword tests can be skipped using Runner.Stop(true) or Stop Execution keyword statement with parameter set to true.



    I don't know how to stop certain function (return to top caller?), but I think it's possible to use keyword tests as individual function wrappers and stop (skip) them instead.



    Sorry if this is not helpful for you either.
  • didacher's avatar
    didacher
    Occasional Contributor
    Thanks, but this stops my whole test case execution. Sorry for my bad previously explanation, I only want to terminate the current keyword (or function) and proceed with the next keyword operation.