02-15-2019 02:00 PM
Hi, I have a test sequence (lets call it TOP LEVEL) that runs and calls a new thread and keeps running in parallel with the new thread. While the TOP LEVEL test sequence is running and the new thread sequence is running in parallel, I'd like the new thread sequence to be able to know what the current step name that is being run in the TOP LEVEL test sequence.
Is there a way to do this? Thanks!
02-16-2019 09:55 AM
In the past, I have made StationGlobals.CurrentStepName and that's defined in the Pre-Expression for a step that's in "TOP LEVEL". A more flexible way might be to use the callback SequenceFilePreStep, which would define "CurrentStepName" before every step. You could add a precondition such as NameOf(RunState.Caller.RunState.Sequence) == "TOP LEVEL" to make sure you only track your top level steps.
02-18-2019 09:31 AM
In your new thread call: RunState.Caller.Step.Name
Caller will return the sequence context of whatever sequence called you.
Hope this helps,