NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to add array of container values into report text ?

Hello,

 

I have a local variable (1D array of a container with two number elements). I want to log the values of that local into report text.

I want to create a step to record the values into report text.

 

BigDrum_0-1734504248488.png

 

I created a String Value Test step that use Str(Locals.esn_ranges) as Data Source

BigDrum_3-1734505431559.png

 

BigDrum_1-1734504723632.png

but the data in the report is 

............

BigDrum_2-1734504928663.png

Question:

1. what is the correct expression of data source in this case ? Str(Locals.esn_ranges) is wrong or I have to setup in other places ?

2. Is there other type of step instead of StringValueTest which is better choice for my goal ? Now I have to force pass this step since the data source can be different string and there is no string limit can match it all the time.

 

Thank you for your help !

 

 

 

0 Kudos
Message 1 of 2
(184 Views)

@BigDrum wrote:

Hello,

 

I have a local variable (1D array of a container with two number elements). I want to log the values of that local into report text.

I want to create a step to record the values into report text.

 

BigDrum_0-1734504248488.png

 

I created a String Value Test step that use Str(Locals.esn_ranges) as Data Source

BigDrum_3-1734505431559.png

 

BigDrum_1-1734504723632.png

but the data in the report is 

............

BigDrum_2-1734504928663.png

Question:

1. what is the correct expression of data source in this case ? Str(Locals.esn_ranges) is wrong or I have to setup in other places ?

2. Is there other type of step instead of StringValueTest which is better choice for my goal ? Now I have to force pass this step since the data source can be different string and there is no string limit can match it all the time.

 

Thank you for your help !

 

 

 


To log the values of a local variable (a container with two number elements) in your test report, use Str(Join(Locals.esn_ranges, ", ")) as the data source for a StringValueTest step. For more flexibility, create a CustomStep to format and log the data as needed. Consider using a logging library like spdlog or log4cplus for structured logging.

0 Kudos
Message 2 of 2
(115 Views)