NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

PostResultListEntry & Record Result

Hi, I use the SequenceFilePostResultListEntry callback in order to create a parallel report customized for a client.

This callback is enabled if the step has marked the flag Run Option --> Record Result = True.

 

When the step is called in a subSequence the callback should be enabled only the both the step AND the subSequence has marked the flag Run Option --> Record Result = True, instead, it depends only of the step setting and not of the subSquence.

 

I guessed that the steps inherited the property Run Option --> Record Result from the subsequence they belong.

 

How can force this Run Option --> Record Result of a sequence to all its steps?

 

Thanks.

0 Kudos
Message 1 of 10
(4,652 Views)

Usually you would leave all the steps to recordresult = True.  Then when you don't want all the steps for that subsequence to record you would right click on the sequence and select Sequence Properties...  Then you can check the box Disable Result Recording for All Steps. 

 

To fix your current issue just select all the steps in the sequence and then on the Run Options property tab select Record Result.

 

Hope this helps,

 

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

The way result collection in TestStand works is that if a step is recording results, those results are recorded to Locals.ResultList even if the calling sequence call step is not configured to record results. When the flow of execution returns back to the calling step, if that step isn't recording results, then the results recorded for the called sequence are discarded.

 

One thing you could do to get the behavior you want is follow the chain of callers in the Sequence context (follow all of the Caller properties recursively on the sequence context) and see if all of the calling steps are configured to record results or not, and if any are not, do nothing. This will likely have some small performance hit depending on the depth of your call stack though.

 

-Doug

0 Kudos
Message 3 of 10
(4,634 Views)

This is not exactly what I need.

 

All the steps or subsequence called by a sequence inherit the "Record Result" property. This works, and it can be checked into the TestStand report file.

 

My issue is that the SequenceFilePostResultListEntry does not iherit the same property.

 

Is there any variable, property or method that indicates if the "Record Result" is active or not? Now I am reading the Parameters.Step.RecordResult but it is related to the step in execution.

 

Hope I explain better.

0 Kudos
Message 4 of 10
(4,631 Views)

dug9000, I answered to jigg before reading your post.

 

What you suggest can be not very easy. But can be more complicated when a sequence is called with the loop property --> Record Result Of Each Iteration = False.

 

I should keep the count.

 

Thanks. 

0 Kudos
Message 5 of 10
(4,626 Views)

@logatto wrote:

This is not exactly what I need.

 

All the steps or subsequence called by a sequence inherit the "Record Result" property. This works, and it can be checked into the TestStand report file.

 

My issue is that the SequenceFilePostResultListEntry does not iherit the same property.

 

Is there any variable, property or method that indicates if the "Record Result" is active or not? Now I am reading the Parameters.Step.RecordResult but it is related to the step in execution.

 

Hope I explain better.


I'm not sure I understand what you mean in the above description. Steps in a sequence do not inherit the "Record Result" property of a sequence call, rather, if the sequence call does not record results, then results from the subsequence are discarded after that subsequence returns. The way the builtin reporting works is that it either doesn't look at any of the results for the sequences at all until the end of the main sequence (results from subsequences where the sequence call doesn't record results would already be discarded by this point), or, in the case of on-the-fly reporting, I think it does actually generate a report for the subsequence, but then eventually discards it once the sequence call finishes executing. Perhaps you could do something similar to on-the-fly. I think it does this by looking at an id in the result to match it up with it's sequence call. I'm not the expert on on-the-fly reporting though, so I might be mistaken on the exact mechanism. Perhaps someone who knows the details of how on-the-fly reporting works can add more to this discussion.

 

-Doug

0 Kudos
Message 6 of 10
(4,611 Views)

HI

 

You said: " ....create a parallel report customized for a client."

 

If parallel means 2 reports, default and coustomized:  

I would override the TestReportCallback. I the callback you have the ResultList over all steps where Record Result=True.

you just have to iterate through the container and to create the default report only call the TestReportSequence from the ProcessModell with RunState.Caller.

 

If parallel means on-the-fly reporting:

forget my upper idea, sorry i have no one

 

Regards

Juergen

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
0 Kudos
Message 7 of 10
(4,599 Views)

Yes, parallel means 2 reports, default and coustomized. Yes, parallel means on-the-fly reporting. Because the Human Machine Interface shows during the execution a list of test with Name, measure, limits,....

 

The customized report must be equal the one showed on the HMI.

 

I did it using three callback:

SequenceFilePreStep.seq

SequenceFilePostResultListEntry

SequenceFilePostStep.seq

 

Into the SequenceFilePreStep.seq I check if the step is a sequence AND if the record results is not marked. In this case I set a global variable RecordResusActive = False and save the name of the sequence.

 

Into the SequenceFilePostResultListEntry I add on-the-fly every new test if the RecordResusActive = True.

 

Into the SequenceFilePostStep.seq I check the end of the sequence. If the sequence is the same of the one stored into the SequenceFilePreStep.seq means that the sequence is finished then I can set RecordResusActive = True (only in case it was false).

 

I know it is not very clear and elegant. Any case i will check better TestReportSequence.

 

Thanks

0 Kudos
Message 8 of 10
(4,596 Views)

Hi,

 

Just try this simple Example

Maybe it will fit your task. It records all steps (Here: only Status) of a sequence, if result recording of the sequencecall step is enabled.

It only uses the SequenceFilePostStep-Callback

 

Regards

Juergen

 

 

 

--Signature--
Sessions NI-Week 2017 2016
Feedback or kudos are welcome
Download All
0 Kudos
Message 9 of 10
(4,580 Views)

Hi, you example probably reduce the number of callback. Even if, as is, does not work if I have a nested sub-sequence (see attchment).

 

Probably I should follow the chain of callers. But I guess it is more complicated than my method.

 

Thanks a lot.

0 Kudos
Message 10 of 10
(4,559 Views)