05-01-2023 02:20 PM
I need to log the failing step, which I have been doing by running the following code in SequenceFilePostStepFailure:
RunState.Root.Locals.UUT.additionalData.failure_parameter = Parameters.Step.Name
This was working for a while, but the problem is that we call the same sub-sequence several times within the code.
"Vss" is no longer good enough since there are 5 Vss measurements; I need to report something like:
MainSequence -> SequenceA -> SequenceB -> Vss
Or better yet: SequenceA.SequenceB.Vss
I am not adept at accessing and figuring out the call stack, and when I run this and try to use the Watch View with a breakpoint, I don't see the actual step names in the parameters (even though they work), but the names of the model steps, so it's been difficult to
05-02-2023 04:20 AM - edited 05-02-2023 04:21 AM
Hi Jed,
I recommend you to modify your step name from Vss to MSeq.SeqA.SeqB.Vss, so you can pretty stragforward to see where to have error. There is nothing existing parameters you want, means you need to write the code to combine different parameters.
Like Parameters.Step.Name, RunState.Main.Step.TS.SData.SeqName. Based on this condition, I will choose first one as solution.
Ricky
05-02-2023 12:41 PM
Hi,
I think you can use Thread.GetSequenceContext to get the sequenceContext for each callstackIndex and from the sequenceContext get the Step->Name for each caller. Using the step name you can build your custom name that you want to want.
Hope this helps,
Regards
Anand Jain
NI