NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Disable Logging of Failed Tests by Individual Step

Hello All,

 

  I have an experimental version of a test sequence that will loop through and attempt several different sets of input parameters until it obtains the desired outcome.  When it does obtain the desired outcome, I then log/report the set of input parameters that were used, and disregard all others. The issue I am having is that I do not know how to disable logging of the step iterations that failed (the ones I want to disregard).  I can disable reporting of failed tests for the entire sequence, but I do not know how to do limit it so specific tests/steps.  I've tried a few ideas related to deleting the current element from the report, but that doesn't seem to work correctly for my application.  Please advise.  

 

Thanks in advance,

 

GSinMN 

0 Kudos
Message 1 of 8
(5,506 Views)

GSinMN,

 

if you talk about looping a single step, you cann configure looping in the step settings. Have you tried if unchecking "Record Result of Each Iteration" does what you are looking for?

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 8
(5,500 Views)

Hello Norbert,

 

  Thanks for the quick response. I do see how that would likely work in some situations, but I am actually looping several steps in order to re-calculate the input parameter set for each iteration.  The actual "testing" step is at the end.  Not sure I could compress all of the parameter setting steps into the looping expressions for the actual test step.  Would have to set up parallel loops that share a loop index.  A little more involved than I want to get for an experimental build.  Any other ideas?  

 

Thanks again,

 

GSinMN 

0 Kudos
Message 3 of 8
(5,497 Views)

There is sure another way to solve it. How about looking into the "Step Execution" topic in the TestStand help?

You can see that as "Action Number" 18 (21/24 when looping) is evaluation of the Status. In Action Number 29, the Post Action is performed.

You can call a Sequence when the step result is passed or failed (independently).

The idea is to call a subsequence passing the Step reference and enter the results into the ResultList in there. The calling step(s) would not record their results.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 8
(5,493 Views)

Maybe I can get some help with the option I was trying.

 

In the step immediately after the test, I inserted an expression with the precondition "RunState.PreviousStep.Result.Status == "Failed"". The expression itself reads " RemoveElements(Locals.ResultList,"["+ Str(Locals.nIndex) + "]",1) ". 

 

Any flaws in this?  Thanks.

 

GSinMN

0 Kudos
Message 5 of 8
(5,492 Views)

GSinMN,

 

if you are going down that road, you should better use callbacks. There is the option to add the "SequenceFilePostResultListEntry" callback to the sequence file.

Looking at the parameters, you can Discard the step result from the ResultList. You have to implement a custom "filter" to set this parameter to true.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 6 of 8
(5,487 Views)

Hello Norbert,

 

  Not alot of experience with callbacks.  Will need to do a little reviewing to make sure I understand how it all works.  Might take awhile.

 

Thanks for all of you assistance.

 

GSinMN  

0 Kudos
Message 7 of 8
(5,483 Views)

Hello Norbert,

 

  Did some research, and tried a few more experiments, and finally figured out what was happening.  My sequence was doing evryhting right to remove the element from the result list, but it was still getting attached to the report because On-The-Fly reporting was enabled.  With it disabled, the sequence removed the failed steps as required.  However, I would prefer to have On-The-Fly reporting enabled for the rest of the sequence, and still be able to remove an element from the report in this section.  So, from what I can tell, I either need to enable/disable on-the-fly reporting in the middle of the sequence for this one section, or I need to find another way to remove an element from an On-The-Fly report.  Any suggestions would be appreciated. Thanks.

 

GSinMN   

0 Kudos
Message 8 of 8
(5,414 Views)