NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Reporting of Steptypes realized as Sequence Calls?

Hi,

I realized some steptypes as sequence calls and managed to set the reporttext property of the calling
step inside these sequences. The SeqeunceFailed flag is used to report an failure to the calling step.

Problem:
I disabled the record result option for the whole sequence, but looking to the report shows the sequence
call (of the steptype) without any content.
Is there any way to avoid this entry in report too ?

Regards,
Sunny
0 Kudos
Message 1 of 9
(4,061 Views)
Sunny -
I assume that you saying that you have taken the NI Sequence Call step type and have copied it to create your own version of it. I believe that you are asking whether your step type could not report the steps that were invoked and instead just show the step as a single step result.

When a step that calls a sequence completes, the following property "Step.Result.TS.SequenceCall" contains information about the called sequence including the its step results. If this property exists in the result, the report generation code knows that a sequence was called and creates the starting and ending block in the report.

To prevent the report from recognizing this property, you could add a Post Substep to your sequence call step type that uses the Active
X Adapter to call on "ThisContext", the method PropertyObject.DeleteSubProperty("Step.ResultTS.SequenceCall", 0x2 /*PropOption_DeleteIfExists*/). This would delete the property.

If you wanted to conditionally delete this property, you would have to have some additional code to a code module that determines whether to call the method.

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 2 of 9
(4,061 Views)
Hi Sunny,

The option "Disable Result Recording for All Steps" that you enabled in the sequence properties disables the result recording only for the steps contained by that sequence, while the sequence call you see belongs to the "caller" sequence and the result recording is not disabled for this sequence nor for this specific sequence call step type.

Thus, the solution is to disable the "Record Results" option from the SequenceCall step properties in the "Run Options" tab of the step properties property page.
By doing this, it's not necessary anymore to disable the record results option for the whole sequence, as no results will be recorded for the whole sequence call step at all.

Regards,
Silvius
Silvius Iancu
Message 3 of 9
(4,061 Views)
Hi Scott,

Your answer describes exactly what im looking for but i didn't manage to get the expcted result. I think i modified my steptype exactly as you proposed but there is still the following entry in my reports:


Begin Sequence: steptype name
(C:\Programme\TestStand\Components\User\StepTypes\...)

End Sequence: steptype name

Please have a look to the attached screenshot, perhaps
you can find out what i'm doing wrong.

Best Regards,
Sunny
0 Kudos
Message 4 of 9
(4,061 Views)
Hi Silvius,

Thanks for your answer, but realizing your suggestion
will produce no more entry of the excecuted steptype in the report. What i want is to see the execution of the steptype in the report including result and report text but not which sequence was called to generate these informations.

Regards,
Sunny
0 Kudos
Message 5 of 9
(4,061 Views)
Hi Sunny,

Looks like I misunderstood your problem at the begining.
However, the Scott ideea is good, but what you have to do in the PostSubstep is to delete the "TS.SequenceCall" from the "Locals.ResultList" entry. This can be achieved by setting the lookupString of the DeleteSubproperty method to the following expression:

Str(Evaluate(" GetNumElements(RunState.Sequence.Locals.ResultList) - 1"),"RunState.Sequence.Locals.ResultList[%d].TS.SequenceCall" )

An example of the step type can be found in the attached SequenceFile. The type is defined in the SequenceFile Types section and is named "MySeqCall"

Hope this helps,
Silvius
Silvius Iancu
0 Kudos
Message 6 of 9
(4,061 Views)
Sunny -
The lookup string that you used was "Step.ResultTS.SequenceCall". You need to add a "." between "Result.TS". I suspect that this will fix the problem. A way to verify that the property is removed is to break after the step and loop at Locals.ResultList[x] for the last step that was executed. You should see your result with or without the property.

Scott Richardson
Scott Richardson
https://testeract.com
0 Kudos
Message 7 of 9
(4,061 Views)
Hi Silvius,

That what i was looking for, your suggested expression for lookupstring works great.

Best regards,
Sunny
0 Kudos
Message 8 of 9
(4,061 Views)
Hi Scott,

Modifying the lookupstring in the described way produces an error ("Unknown variable or propety name TS.")
I took the proposed solution of Silvius to create the lookupstring. Now my reports have the desired format.
Thanks for your support.

Best regards,
Sunny
0 Kudos
Message 9 of 9
(4,061 Views)