NI TestStand

Showing results for 
Search instead for 
Did you mean: 

Write a custom message on report file

Go to solution



How can I write a specific message on report file  ? 


For exemple, How can I write this "Hello World"


Thank you 

0 Kudos
Message 1 of 2
Accepted by topic author Chakib11

In order to understand this you must first understand the 2 phases of report generation: Result Collection and Result Processing.


Result Collection

Basically every sequence has a container called Locals.ResultList.  As your sequences execute they are putting step result information into that container (essentially it is an array of containers).  When MainSequence completes execution it passes that container back to the process model.  The process model then takes that and passes it off to the Result Processing Plugins which brings us to the second phase of report generation:


Result Processing

The Plugin will take that array of results from MainSequence and recurses through it and reformats it into a report or push it to a database.  Depending on which plugins you have turned on depends on which report gets generated.



So the key is getting "Hello World" into that result collection.  There are many many ways in which you can do this.  The most common way is to assign a step's report text property: Step.Result.ReportText = "Hello World"  somewhere within the step (most likely a pre or post expression).  


Or you can simply use the none adapter and put down an action step.  Then name the step "Hello World".  That will also show in the report.


Another option is to use the Additional Result of any step or the Additional Result step (which is just a none adapter action step with special editing).  You can add a string value item and set the value to "Hello World"


Another option is to edit a plugin and make the output simply put "Hello World" on the report.  I don't recommend this unless you know what you are doing and you feel comfortable managing plugins.


TestStand is a very powerful Test Executive and because it is built to handle basically anything thrown its way, it isn't always straight forward but it has the flexibility to do anything.


Hope this helps,


~Will work for kudos and/or BBQ~
Message 2 of 2