NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to only include "Test" type steps in a report

Solved!
Go to solution

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?

0 Kudos
Message 1 of 10
(2,816 Views)

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

www.ni.com/support

0 Kudos
Message 2 of 10
(2,785 Views)

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.

0 Kudos
Message 3 of 10
(2,779 Views)

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?

 

0 Kudos
Message 4 of 10
(2,777 Views)

David,

 

Placing it after a Pass/Fail Test, it shows "PassFailTest".

0 Kudos
Message 5 of 10
(2,773 Views)

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. 

0 Kudos
Message 6 of 10
(2,759 Views)

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:

 

  • T1_1_PassFail
  • T1_2_Numeric
  • T1_3_Multi_Num
  • T1_4_String
Download All
0 Kudos
Message 7 of 10
(2,744 Views)
Solution
Accepted by topic author MattyTE

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.

0 Kudos
Message 8 of 10
(2,736 Views)

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?

0 Kudos
Message 9 of 10
(2,713 Views)
Solution
Accepted by topic author MattyTE

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

www.ni.com/support

0 Kudos
Message 10 of 10
(2,671 Views)