NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

OutputMessage printed to Report

Hello,

 

I'm looking to output the OutputMessage to the Test Stand Report by modifying the sequential process model. I know that the outputMessages were not intended to be used in this way, but it is the most efficient solution of resolving my current dilemma.  Or else i would have to modify a large number of scripts that calls Output Message and this is not desireable.

 

 

So far, I've identified that I will be overriding the ProcessModelPostStep callback.  I need to know:

 

  1. What is the command in TestStand 4.2.1 to get the last OutputMessage?
  2. How do i insert this into the Test Stand Report?

Thanks,

 

Daniel

[DL]
0 Kudos
Message 1 of 6
(3,243 Views)

Yeah, you're definitely correct in that this isn't how TestStand was meant to be used. This would be the flow of data:

 

Step generates OutputMessage

Sequence Editor receives and displays OutputMessage

Sequence Editor sends OutputMessage data back to Execution which then dumps the data to the report

 

There's gotta be an easier way of doing this. Why can't your steps log the data that they're sending to a variable or straight to the report? Can you post an example of how the steps are currently sending data via OutputMessage so we can find a better way of doing this?

CTA, CLA, MTFBWY
0 Kudos
Message 2 of 6
(3,240 Views)

We are trying to use TestStand with as little customization as possible.  So, custom reporting and such are not being implemented.  Right now, certain steps use the OutputMessage() to display pertinant test data to the operator.  The data displayed here is sufficient for a summary level test report. The information sent to OutputMessage() is more concise and provides a more functional representation of the data instead of printing limit pass/fails (as in the report). 

 

Typically, if we want to output a message, the post-expression will contain OutputMessage(" desired message here" ).  We just want to collect all these messages as they get generated and output them to a file.  We know that hte OutputMessage window has a 10,000 line buffer limit and begins to recycle messages once the limit is reached.  Unfortunately, some of our test executions run over 10k lines of output messages.

[DL]
0 Kudos
Message 3 of 6
(3,238 Views)

In the same Post Expression you could store the data in a variable, e.g. FileGlobals.OutputData += Step.<data>, and then write that variable to file at the end of your test, or just log that variable to the default TestStand report.

CTA, CLA, MTFBWY
0 Kudos
Message 4 of 6
(3,236 Views)

Correct, I could do that, however that would require touching all scripts that call outputmessage().  This is less desireable.  Ideally, i'd override the ProcessModelPostStep callback and have it pull the last outputmessage, then insert it into the report.

[DL]
0 Kudos
Message 5 of 6
(3,232 Views)

You can do the same in the callback as it has a reference to the Step. So whatever data was being sent to the OutputMessage can be stored in a variable.

CTA, CLA, MTFBWY
0 Kudos
Message 6 of 6
(3,230 Views)