NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

TestStand Failure Chain

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

0 Kudos
Message 1 of 15
(161 Views)

Put differently: you want a step to log from where it was called? No just the containing sequence but the whole hierarchy?

 

0 Kudos
Message 2 of 15
(146 Views)

exactly, and possibly the log variable have to contain the step ID of each caller in the hierarchy.

0 Kudos
Message 3 of 15
(133 Views)

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

0 Kudos
Message 4 of 15
(128 Views)

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

0 Kudos
Message 5 of 15
(124 Views)

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


Message 6 of 15
(95 Views)

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

0 Kudos
Message 7 of 15
(86 Views)

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.

 

 

 

0 Kudos
Message 8 of 15
(61 Views)

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

0 Kudos
Message 9 of 15
(53 Views)

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

0 Kudos
Message 10 of 15
(45 Views)