NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

NI_CustomResult Examples

Solved!
Go to solution

Anyone have examples of using NI_CustomResult?

 

Also, any links to docs would be appreciated.  Could not find anything that explains in detail on all related properties and how to setup.

 

Thanks

0 Kudos
Message 1 of 6
(1,238 Views)
Solution
Accepted by topic author testergi

What are you specifically trying to do with it?

 

NI_CustomResult is a datatype used by any step type to log additional results.  Because it is part of the TS property (or rather an array of them are part of the TS property) it will get automatically injected into the resultlist and passed to each of the plugins.  The plugins will then process them and put them on the report.

 

If you go to Configure>>Station Options and on the Preferences tab check the show hidden properties box then click OK you'll be able to see the TS property for each step.

 

Throw down a step in TS and go to the additional results category.  Add a result and set it up how you want.  Then on the Property Browser category you can look inside the TS property at the CustomResults array.  Expand it and you'll se how NI_CustomResult is being used.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 6
(1,232 Views)
Spoiler
@jiggawax thanks for the info.  I noticed what you explained on adding an Additional Results and how it shows up in CustomResults (and vice versa).

"What are you specifically trying to do with it?"
Mainly just trying to learn more about it and some of the basics.  For example, what does the CheckedState and Conditions do?  This is probably one of those areas I just need have patience and tinker with to see what to add and how the steps/reports respond.

Thread was created to see if there were some more detailed examples/docs.  Looks like you have a pretty good understanding, so I may ping back with some other questions as I review the feature(s).  As always, thanks for your knowledge 🙂





0 Kudos
Message 3 of 6
(1,229 Views)

Hi @jiggawax.

 

So I mentioned I may come back with more questions 🙂

 

I need to add complex types to the CustomResults where they have a mixture of basic types (number, string, etc.), array of types (strings, containers, etc.), and other custom data types.

 

One problem I'm having now is when trying to add elements within the arrays (whether it is basic or complex types).  It appears to throw errors when trying to add elements manually even when changing the type to NI_CustomResultElement.

 

For example and to make it simple, let's say I have a data type that includes one Array of Strings property.

 

testergi_0-1648389350190.png

 

When I add to the step, it doesn't add the 3 string properties under the MyString array.

testergi_1-1648389390822.png

 

I can add the data in the Value to Log (like below), but not sure how to add for complex data types in arrays that could vary in elements.

testergi_2-1648390118442.png

 

I guess I might could create Local variables and those in the Value to Log, but I'm more wanting the ability to manage/view within the tree UI of results as I'm setting up data to be displayed for selected steps in sequence and data varies between them.

 

So my current question is how do I add the elements under the array to be displayed.  Eventually, these will be more complex, but trying to keep simple with just strings to understand how TestStand works in UI and APIs.

 

Thanks again for the help.

 

 

 

0 Kudos
Message 4 of 6
(1,141 Views)

So when you make a datatype like you've done in the first image you need to create instances of it before you can put it in the result list.

 

If you don't want the instances to reside in Locals or FileGlobals then you can actually add an attribute to each step and define it there.

 

Create your type

jiggawax_0-1649448521685.png

 

Add an instance by adding an attribute to the step:

jiggawax_1-1649448545244.png

 

jiggawax_2-1649448554494.png

 

Then you can add that instance to the additional results:

jiggawax_3-1649448576486.png

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 5 of 6
(1,092 Views)

@jigg.

 

"you can actually add an attribute to each step and define it there"

 

That's exactly what I ended up doing.  Works great!  Thanks again.

0 Kudos
Message 6 of 6
(1,084 Views)