NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Previous Step ResultRecording Option

Can I run this property from the Step to that previous step results are not in the Test Report? Or does doing this effect subsequent repeated this Runtime test & Test Reports.

 

RunState.PreviousStep.ResultRecordingOption

0 Kudos
Message 1 of 3
(1,673 Views)

There are 3 states for a sequence file to be in: disk copy, edit time copy, run time copy.

 

When you call RunState.PreviousStep.ResultRecordingOption it applies to the run time copy and edit time copy.  However, in the case of the run time copy it is too late to matter because most likely the step has already injected it's results into the result list.  Any subsequent execution of that step, without reloading from disk, will not inject results into the result list.

 

If you don't want the previous steps results in the result list you can just remove them and not touch the step properties.

RemoveElements(Locals.ResultList, "[" + Str(Locals.ResultList.GetNumElements() - 2) + "]", 1) //something like this depending on where you have the expression.

 

Hope this helps,

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
Message 2 of 3
(1,606 Views)

Thanks for the response.

I was able to use a pop-up after the test step and the option to RemoveElement in the Post Expression - 


//If repeat measurment, remove last test step result
Step.Result.ButtonHit==1 ? "" : RemoveElements(Locals.ResultList,"["+Str( GetNumElements(Locals.ResultList)-1)+"]",1)

 

Looks like you posted the same, and that hint came from the following post.

 

https://forums.ni.com/t5/NI-TestStand/repeat-a-test/m-p/952408?profile.language=en 

0 Kudos
Message 3 of 3
(1,592 Views)