From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem modifying result list.

I want to achieve that a rerun teststep in a sequence overwrites the result of the previous execution.
So I created a SequenceFilePostResultEntry callback which does
- If there is a step in the resultlist which has the same StepID as the last Step copy the result list entry of the latest step over that step
-remove result list entry for latest step.
Unfortunately the statement for copying the result:
 
Runstate.Caller.Locals.Resultlist[Locals.Index] = Runstate.Caller.Locals.Resultlist[Locals.LastIndex]
 
creates a runtime error saying that subproperty TS being not of same type.
Indeed the TS structure of Runstate.Caller.Locals.Resultlist[Locals.LastIndex]  is missing the fields
SequenceFilePostResultListEntry and ProcessmodelPostResultListEntry which are available for any older Resultlist entry.
Is there a workaround for that ?
 
 
 
 
 
 
 
0 Kudos
Message 1 of 4
(2,998 Views)

I use an older version of teststand 2.0.1f

In SequenceFilePostStepFailure

I have to look at Parameters.Step.TS.StepFCSeqF
I set Step Fail Causes Seq Fail to false on my calling steps otherwise I always get a fail even retesting the step.

if !Parameters.Step.TS.StepFCSeqF then :-

Reduce the result list size by 1, then

RunState.Caller.RunState.NextStepIndex = RunState.Caller.RunState.StepIndex

Message Edited by Rupert Hewitt on 07-10-2006 09:13 AM

0 Kudos
Message 2 of 4
(2,988 Views)

Hi,

Why dont you just set the Parameters.DiscardResult = True.

Regards

Ray Farmer

Regards
Ray Farmer
0 Kudos
Message 3 of 4
(2,980 Views)
Hallo Ray,
I thought that Parameters.DiscardResult = True discards the result of the step which triggered the callback.  But I want to overwrite/discard the the result of a previous execution of the same step. I haven't found a DiscardResult flag in the properties of that previous step.
Just to remove the entry of the previous execution from the Resultlist Array with RemoveElements() seems to work but that will change the order of steps in the report.
 
0 Kudos
Message 4 of 4
(2,966 Views)