05-22-2019 12:17 PM
I want to modify result processing based on the step type (this is done in Configure->Result Processing->Report Options). There is the option for a “Result Filtering Expression” to control what steps are included in the final report from a test. There is the option to exclude Flow Control steps using the following expression: Left(Result.TS.StepType, 7) != "NI_Flow"
The above expression excludes flow control steps. I would like to ONLY INCLUDE test steps in the report (Pass/Fail Test, Numeric Limit Test, Multiple Numeric Limit Test, String Value Test). I thought I would be able to do it using the following expression:
Right(Result.TS.StepType, 4) == "Test"
However, this does not appear to work. Maybe I have the amount of characters incorrect, but I can not be sure because I cannot find out where I evaluate and see the value of Result.TS.StepType.
Is there an expression that I can use to only record "Test" steps?
Solved! Go to Solution.
05-23-2019 12:04 PM
Hi MattyTE,
That expression worked for me. Could you explain what behavior you are seeing?
You can evaluate the Result.TS.StepType by looking in the result for that step in Locals.ResultList.
Thanks,
David F.
Technical Support Engineer
National Instruments
05-23-2019 12:08 PM
Hi David,
When I use:
Right(Result.TS.StepType, 4) == "Test"
My report doesn't have any test results. I take that as nothing is satisfying this expression.
05-23-2019 01:06 PM
Hi MattyTE,
What do you see when you place RunState.PreviousStep.StepType.Name in a Message Popup after a Test Step in a new sequence file?
05-23-2019 01:14 PM
David,
Placing it after a Pass/Fail Test, it shows "PassFailTest".
05-23-2019 01:42 PM
MattyTE,
Could you provide a screenshot of your Report Options?
The expression, Right(Result.TS.StepType,4) == "Test", should pull the last four characters and compare it to "Test" which in this case would be true. I believe the Results Filtering Expression pulls from the Locals.ResultList. You can do a second check by placing #NoValidation(Locals.ResultList[0].TS.StepType) in a Message Popup after a Test step in an otherwise empty sequence file. You should get the same string in the popup though.
05-23-2019 02:26 PM
You are correct about #NoValidation(Locals.ResultList[0].TS.StepType) I do get the correct value from this expression. Attached are my report options. Also attached is my report. It displays T1_Tests which is a sequence call. I have 4 tests that aren't being displayed:
05-23-2019 03:10 PM - edited 05-23-2019 03:11 PM
Thanks for providing these screenshots. I getting the same behavior when I place the tests in a sequence call with the same Report Options as well. The issue is a combination of the fact that you are using ATML and a sequence call. It seems like TestStand won't record any of the steps under a sequence call that doesn't pass the Results Filtering Expression when using the ATML Report Format. If you want to record the steps under the sequence call then I would set the Results Filtering to (Right(Result.TS.StepType, 4) == "Test") || (Result.TS.StepType == "SequenceCall"). This will still log the sequence call itself which may not be desirable, but it isn't too verbose.
05-24-2019 06:11 AM
David,
I actually have this sequence call set to "Result Recording: Enabled - Override Sequence Setting" and it still does not work. Shouldn't this accomplish the same thing if what you are saying is true?
05-29-2019 07:51 PM - edited 05-29-2019 07:55 PM
Hi MattyTE,
It will not accomplish the same thing. The step result recording option you mentioned is meant to override the Sequence setting located in Edit>>Sequence Properties. The behavior is detailed in TestStand Report Generation and Customization under Configuring When Results are Collected. The filtering is a separate step.
I did notice that there was different behavior with the ATML report format from the HTML and ASCII formats when using the Right(Result.TS.StepType, 4) == "Test" filter. I think the behavior should be the same, so I filed a CAR with R&D to have the behavior looked at. Will the expression I suggested work for you or are you looking for something different?
Best,
David F.
Technical Support Engineer
National Instruments