I have many tests that require certain preconditions to be met before continuing and thought I could write a simple function like:
Function FailIfNot(condition, error_message)
If Not condition Then
WriteToALM FAILURE, error_message 'convenience function
ExitScript
End If
End Function
I've searched online, but can't figure out which Exit*
function I should use. Each test case consists of a single action which covers a particular interaction with the application and once developed is run in "batch mode" with all the other test cases by ALM (in development I execute it as a temporary run). Ideally the function should go in a library that is shared with other test scripts, which seems to further complicate it.
Hope I'm not reinventing the wheel here.