01-08-2024 09:22 AM
Hi
When I use "CallExecutable" steps I do not want the "ExitCode" in my report.
In the first step depicted below, it is seen how "ExitCode" is include per default.
I am trying to use the Post-Expression as depicted below.
This works perfectly fine at the first "Test UUT" iteration (I am using the SequentialModel).
The sequence crashes when running the test sequence the second time. This happens because the ExitCode does not exists.
I don't understand why the ExitCode is unknown when running the test sequence the second time?
Any other good suggestions on how to get rid of ExitCode in the report? I am aware that I can insert a "statement" step after the "CallExecutable" step, but it would be so much more neat to deal with the ExitCode in the "CallExecutable" step it self.
Best regards
Jesper
Solved! Go to Solution.
01-08-2024 12:35 PM
TestStand executions reuse the same TestStand step object when you execute your sequence using TestUUTs and does not recreate any missing properties. If you want to remove "ExitCode" from the report, you can do it using the following post expression in your step - ThisContext.Step.Result.ExitCode.SetFlags("", 0, 0). Ideally only remove the "Include in Report" flag rather than set it to 0.
Regards,
Anand Jain
NI
01-08-2024 03:48 PM
Hi Anand
Thanks a lot for the very useful answer!
For reference this is how I clear only the PropFlags_IncludeInReport and keep the remaining flags.
ThisContext.Step.Result.ExitCode.SetFlags("",0,ThisContext.Step.Result.ExitCode.GetFlags("",0) & ~PropFlags_IncludeInReport )
Best regards
Jesper