04-18-2024 05:23 AM - edited 04-18-2024 05:24 AM
Hi,
In my sequence i would like to save all the chain of which sequences have called a particular failed step. My aim is to log that value for statistical analysis of the failure between different loops of the same UUT.
How can TS have this chain when it creates the Report? i can't find the way TS creats it.
Is it possible even if On-the-fly reporting is enabled?
Is there anyone who have done that?
Thank you for the help!
Best Regards,
Zuc
04-18-2024 06:02 AM
Put differently: you want a step to log from where it was called? No just the containing sequence but the whole hierarchy?
04-18-2024 07:06 AM
exactly, and possibly the log variable have to contain the step ID of each caller in the hierarchy.
04-18-2024 07:50 AM
So... in theory you can retrieve the complete callchain via API. You can do this as a pre- or post expression as long as you don't require looping...
If you require looping, the most solid solution would be to create a special step type which allows you to doo the looping as a Pre- or Post-Step.
Once you have that call chain, you can simply add it as an additional result using step settings dialog or the API
Takes some effort though
04-18-2024 08:01 AM
Do you have a pratical example? or which API i have to use?
Unfortunatly I have a lot of For and For Each Loops since the same actions are repeted multiple times. So how can I overcome this thing?
As a start can be also good for me to print this chain on a txt, just as a start.
Best Regards,
Zuc
04-19-2024 07:24 AM
Some QnD code atached to give you a starting point.
What you are looking for is more or less in Locals.CallerString in SubSubSequence
Solution created referring to this thread
04-19-2024 09:00 AM
Hi Oli,
thank you for the help i will work on it! I have given only a glance but two questions arise in my mind:
1. Is it working also with the on the fly option enabld?
2. the fact that there is a for loop do you think that the time of execution will increase substantially for complex sequence?
Thank you for the Help!
Best Regards,
Zuc
04-22-2024 12:44 AM
Hi Zuc,
@Zuc_Lab wrote:
[...]
1. Is it working also with the on the fly option enabld?
[...]
If you add Locals.CallerString as an additional result to the respective string, it doesn't matter if you are set to OTF or regular result processing
@Zuc_Lab wrote:
[...]
2. the fact that there is a for loop do you think that the time of execution will increase substantially for complex sequence?
[...]
In the end, all extra processing/ data retrieval will cost execution time. There is no such thing as a free lunch 😉
The crucial question is: how much extra processing time does it cost and how valuable this information is for you.
If you need this additional information for process improvement in terms of stability analysis, you should be able to switch this extra recording off somewhen in the future once the root case for problems is found and removed.
Still. there are some tricks which could be used for performance improvements. Yet they may get a little complicated and difficult to maintain.
04-22-2024 02:07 AM
Hi,
thank you for the advices! The information is vital for me so i will make it activable by configuration.
I have a doubt to how it works on the sequences called in a separated thread, since i have seen from the database analysis of TS that they seems to be called in a separate way, the Step_Parents field seems to be related to the Wait Thread step respect to the Sequence called.
Thank you very much for the Help!
Best regards,
Zuc
04-22-2024 09:13 AM
From within a sequence which has been launched as a new thread, you should be able to retrieve at least launcher information via ThisContext.RunState.Caller