From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

(TestStand 3.5) how to get failed step data for a message creation ?

Hi all,

I'm working with TestStand 3.5 and LabVIEW 8.5 and my problem is the following:

I execute a TS sequence containing pass/fail tests, numeric limit tests and so on and at the end of the sequence I want to show a "failed tests list" containing the following data for every step that failed:

subsequence name, step name, output value/string/boolean, limit/limits or desired string or desired boolean state.

 

I think the sequence could be general (usable for every kind of TS sequence) and could be a SequenceFilePostResultListEntry callback that generates a string containing the above data regarding the step executed, then all the strings could be concatenated at the and of the sequence.....this is what I think

 

My question is....does anybody have a sequence for this purpose ?   Or where could I find an example/demo/sequence that could help me ?

 

Thanks for your help !

 

0 Kudos
Message 1 of 9
(4,595 Views)

Hey,

 

You can suppress Passed/Done/Skipped steps from not showing in the report by going to Configure>>Report Options and on the Contents tab choose either ASCII Text or HTML Document for the Report Format.  Then check the Include Step Results and change the Result Filtering Expression to Exclude Passed/Done/Skipped.  Then the report will only show failed steps. 

 

 

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 9
(4,592 Views)

Hi, thanks for your answer but you didn't understand exactly what I need:

I don't need to obtain a report (I already configured a report) but really I need to print a label containing the failed steps data I already wrote in the first message.

Then I need a string containing the failed steps names, values, limits and so on.  So, I need a sequence/callback that in case of a failed step gives me his name, the limits and the result value in any case: string, number or boolean result; value of the limits; the kind of comparison.

 

Can you help me ?

 

Thanks in advance

0 Kudos
Message 3 of 9
(4,589 Views)

Have you tried the SequenceFilePostStepFailure or ProcessModelPostStepFailure Engine Callbacks?

 

See page 10-6 (171) of the TestStand Reference Manual.

Josh W.
Certified TestStand Architect
Formerly blue
Message 4 of 9
(4,582 Views)

Yes, this is another idea....but anyway I should develop all the steps inside the callback.

Perhaps I'm looking for a too easier solution: a sequence already developed for this purpose, or just an example or a sequence similar to what I need.

Is there someone that already developed something useful for my problem ?

 

Thanks

0 Kudos
Message 5 of 9
(4,577 Views)
This is not very common.  Most times results are logged to a database and then post execution applications will handle this sort of thing.  The simplest way for you, assuming nobody ponies up a free example, is to use the SequenceFilePostStepFailure as Josh mentioned.  The hard part for you is going to be getting the exact info you want.  Because at that point in the callback some of it does not exist in a dynamic option because the step has not completely finished executing.  The SequenceFilePostStepFailure is action 18 of a step execution according to the 3.5 reference manual.  So you will most likely have to build some sort of array or something that tracks which steps failed and then at the end of execution (maybe the PostUUT callback) get the needed info.
jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 6 of 9
(4,573 Views)
Yes, I think this is the only solution. I must investigate the results array dinamically created during the test in order to find the failed steps and in this case take the data I need. I can't for example save a TXT report and then open it looking for the data because I need the data before the end of the sequence and then before the report creation. I'll try to work myself in order to create a callback. Thanks to all for the support !
0 Kudos
Message 7 of 9
(4,555 Views)

You do have access to the report before your sequence finishes as a big string.  Basically in the ModifyReportHeader Callback you can access the report body by using RunState.Caller.Locals.ReportBody.  This returns a giant string with the report body.  That would be kind of a pain to parse though. 

 

Let me know if you have any questions as this could be a tricky one.  I don't promise all the answers just the ones I know or have time to look up. 🙂

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 8 of 9
(4,553 Views)

Wow !   This is a very interesting "TestStand secret" that could help me !

I'll try to read the report data and if possible I could parse it by LabVIEW (I'm much more skilled with LV than TS): this is good also because at the end of the failed steps data string creation I have to print a label using a LV vi.

Thanks a lot !

0 Kudos
Message 9 of 9
(4,539 Views)