Discussion:
Modify step record result dynamically
(too old to reply)
baloss
2008-06-10 07:10:11 UTC
Permalink
Hello!
I'm building a sequence for a test equipment. The device under test has different options, so I have more steps with preconditions to test them.
Actually my report display "skipped" on steps that does not fullfill the preconditions (i.e for an option not related to the DUT).
I would like to modify the Record Result of the step dynamically, to have a report with only the used options.
 
I tryed to modify in the Pre-Expresion the "Step.RecordResult" (tried also "RunState.Step.RecordResult") property, but without success.
 
Can anyone help me?
 
Thanks a lot
My NI
2008-06-10 08:10:12 UTC
Permalink
Hello Baloss, to filter results for your sequence you can call the ReportOptions CallBack, in which you add a statement step with following expression:Parameters.ReportOptions.ResultFilterExpression = "(Result.TS.StepType == \"yourStepName\" && Result.Status == \"StepResultStatus\")"The report will then only show specified StepName and StepResultStatus.Hope this can help you.
baloss
2008-06-10 08:40:13 UTC
Permalink
Hello MY,
thank you for your suggestion.
I just tried this, but it seems a little bit complicated: I need to specify in the callback all the test names I want to add. There is also the risk that modifying the name in the sequence and not in the report callback the report is not updated as required.
What I'm looking for is a property that can be placed directly in the step.
 
Regards
Baloss
 
 
baloss
2008-06-10 09:40:11 UTC
Permalink
Hello,
I solved my problem adding a statement after each step which should be removed from report.
The statement expression is:
( RunState. PreviousStep. Result. Status == "Skipped")?(Locals. ResultList. DeleteElements( GetNumElements( Locals. ResultList)-1 , 1 , 0 )):(1 )
Bye
Baloss
 
Mathieu Steiner
2008-06-12 16:10:13 UTC
Permalink
Hi, If you go to Configure >> Station Options, in the Preferences tab, you have a Show hidden properties option.This one makes available a property for each step named No result (stored in the Step.TS container) that implies the copy (or not) of the Step container to the ResultList at the end of the Step execution)That could be another way to make it... At least worth giving it a try :smileyhappy:Regards.
Erik Crank
2008-06-13 14:10:13 UTC
Permalink
Setting the Step.RecordResult property in the Pre-Expression does not affect results because TestStand gets that property value before it evaluates the Pre-Expression. Probably the simplest way to omit a result while you are executing a step is to set the Step.LastStepResult property to Nothing in a Pre- or Post-Expression.
Mathieu Steiner
2008-06-14 13:10:08 UTC
Permalink
You're right Erik, This coul be done is some well chosen engine callbacks :smileyhappy:Regards.
Loading...