Hi all,
I'm trying to allow a user to retry a step when failed. Here's my approach:
- A step that uses a labview adaptor fails (step.result.passfail)
- Using the call back "SequenceFilePositStepFailure" I perform a message popup that asks the user if they want to retry the step. On the post-Expression for the popup i do the following:
step.Result.ButtonHit == 1 ? (RunState.Caller.NextStepIndex = RunState.Caller.StepIndex) : (RunState.Caller.NextStepIndex = RunState.Caller.NextStepIndex), step.Result.ButtonHit == 1 ? (FileGlobals.Retry = True) : ( FileGlobals.Retry = False)
- Using the call back "SequenceFilePostResultListEntry" I do two steps that do the following in their Post-Expression:
Parameters.DiscardResult = (Parameters.Result.Status == "Failed" && FileGlobals.Retry == True)
FileGlobals.Retry = False
The above works absolutely fine if I use a step with no adaptor, but as soon as I use a labivew adaptor I get errors saying that the Step ID cannot be found. On investigation, the step ID doesn't exist anywhere in my sequence.
Where am I going wrong, how can I repeat a failed test using a labview adaptor without it appearing in my report that it failed if it passes on the retry?