NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

how to creat a summary of report with .txt

Solved!
Go to solution

Hi All,

     I want to creat a summary of report with .txt,and i have disabled the function about report generation in teststand.

     i created a complex sequence,it include some sub-sequences,example:the uut is tested on three different temperatures and four different voltages conditon.So i have creat three sub-sequences (diffrent temperatures) include four steps (different voltages),then mainsequence invoke three sub-sequences to excute test.

    i only want get the fail-step's summary with,include: fail-step's name,status 

    how to do?thanks a lot

0 Kudos
Message 1 of 5
(3,316 Views)

Take a look at the FailureHandlerExample.seq in the TestStand\Examples\Callbacks\PostStepFailureCallback folder. You can add failed step information to a text file inside of SequenceFilePostStepFailure callback.

CTA, CLA, MTFBWY
0 Kudos
Message 2 of 5
(3,301 Views)

Hi snowpunter,

    Thanks for your reply.i tried it with SequenceFilePostStepFailure callback.and when the step failed,i can get the step's name with NameOf(RunState.Caller.RunState.Sequence).

     But i want more informations inclue up-level sequence.Because i have used some "sequencecall".So user can easy to know what conditon

bring out the failure.

    How to do that?

 

BR

John

0 Kudos
Message 3 of 5
(3,295 Views)
Solution
Accepted by topic author cat099

You can use Parameters.Step.Name to get the failed step name. You can also use something like Parameters.Step.StepType.Name == "NI_MultipleNumericLimitTest" to filter different types of steps.

 

As far as finding the entire failure chain...

 

You can check RunState.CallStackDepth to see how many callers deep you are. Based on that information you can use RunState.Caller.Caller.(continued for however many callers deep you are).RunState.Step.Name or .Sequence.Name

 

So if the CallStackDepth is 1, you would only need to use one Caller. If it was 2, you would need to recursively use 1 Caller and then 2 Callers and so on.

CTA, CLA, MTFBWY
0 Kudos
Message 4 of 5
(3,283 Views)

thank you.it is done

0 Kudos
Message 5 of 5
(3,266 Views)