Hi. I have a sequence that calls a subsequence. In the subsequence, there is a loop up to, say 30 second. The loop polls hardware and checks pass or fail every 5 second. If fails, continue loop until time expires and if pass, exit loop. The issue is upon exit, if there is an initial failure and the next iteration passes, the subsequence and the calling sequence fails.
I would like the sequences to record the last result, pass or fail, rather than any failures it encounters. I am guessing there is a way to do this but I don't know how. Please advise.
Solved! Go to Solution.
Is this similar to this?
Yes, it is similar. If I want to only use the last result and ignore the previous results, how would I set the conditional under SequenceFilePostResultListEntry engine callback?
I would not use test steps inside this loop, but after it, only once. Just store the result in Locals and then use e.g. "none" adapter as a test step.
I am a bit unclear what I should do . Can you please help me with an example? I am using TS 2017
In the attachment some example. First subseq will do the job with use of loop step type. Second subseq with single step looping propertie. You need to play with it a bit 😉 Good luck.
Using Sequence_1 example, my test would have the Numeric Limit Test inside the Do While loop. So, after it polls HW, it compares the data it receives to a known set of data. So, in your example, the Number Limit Test would be inside the Do While loop and after the Poll HW statement.
My objective is to truncate the previous failure (if any) and ONLY keep the last result, regardless of pass of fail. That result would also be displayed on the MainSequence as well.
Is that doable?
Why you use the Test step type inside of loop, if you need only the last result to be in result list?
In the example you have the Action step inside the loop. Use it to get the data and then use e.g. Statement step to check the result and set condition for next loop iteration (or use Break step).
In the Statement step you can use:
String CheckLimits(Number value, Number high, Number low, String comparisonType, Boolean doNotCopyToResults = True, Number nominal = 0, String thresholdType = "PERCENTAGE")
This function evaluates whether a value is within the specified limits
Store the the result from the last step in the Locals and use Test step after the loop.
Sorry for the very late response. Had unrelated issues that prevented me from moving further. Just want to let you know that this works.