NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the result status "Failed" after the test to "Passed"

Solved!
Go to solution

We make a picture of a LCD screen and look if its all working. Sometimes the LCD screen is working propper but the Step Failed. In case automatic LCD test fails we show the picture from the camera to the user and he can decide if the LCD screen passed or failed. So when the user decide that the screen is working propper we should overwrite the status of the automatic test that in the report and database shows lcd screen test passed. I tried with 

 

RunState.SequenceFile.Data.Seq["Check_LCD_V3-0"].Main["154 Execute - All Horizontal Segments On"].Result.Status="Passed",
RunState.SequenceFile.Data.Seq["Check_LCD_V3-0"].Main["154 Execute - All Horizontal Segments On"].Result.PassFail="True",

 

But in the database the Status of this step is still "Failed"

 

 

What i do wrong?

 

Thanks

0 Kudos
Message 1 of 6
(6,332 Views)

Is this one of the last step of the sequence execution?

Or is it "within" the step which is going to fail due to image issues?

 

I think your issue is that the result is already in the ResultList which is the container for the data used in reporting. So modifying results from individual steps of the execution (like you do) does not effect the data which is already stored in the ResultList.

 

Also, it is very likely that you have to rewoke the "sequence fail" status.

 

Norbert

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

The automatic  LCD test is somewhere in the middle of the sequence. And i think you are right with the result list container. Now i need to know how to find out the array index of my specific step (to know witch one i have to change)  and how to change the status there (of the specific step)? I never tried something with this result list. And how i can rework the sequence fail status? Because also there i guess you are wright that will be my next problem.

 

Thanks for the fast answer

 

0 Kudos
Message 3 of 6
(6,323 Views)

The sequence fail status is important if you have a subsequence containing the failing step and "correction" is done within the subsequence itself.

Key here is the setting "step failure causes sequence failure" for the step. If it is set, the sequence call step will receive a sequence fail and hence flag the call step as fail as well.

 

If the corrective action is performed in the end (sequence call also failed), you have to address several steps in the ResultList in order to rewoke the fail status of the DUT (and all connected steps!).

 

I think that the only viable solution is to parse the complete ResultList and rewoke all "Failed" states if appropriate. So i would adopt reporting/database logging for feature like this as this is the best option to modify the report/database entries directly.

On the other hand, it is quite an effort to include this as you want to filter only specific situations of "Failed".

This is the disadvantage if "Failed" cannot be addressed directly once it is occuring.

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 4 of 6
(6,309 Views)
Solution
Accepted by topic author Alteschwed

@Alteschwed wrote:

We make a picture of a LCD screen and look if its all working. Sometimes the LCD screen is working propper but the Step Failed. In case automatic LCD test fails we show the picture from the camera to the user and he can decide if the LCD screen passed or failed. So when the user decide that the screen is working propper we should overwrite the status of the automatic test that in the report and database shows lcd screen test passed. I tried with 

 

RunState.SequenceFile.Data.Seq["Check_LCD_V3-0"].Main["154 Execute - All Horizontal Segments On"].Result.Status="Passed",
RunState.SequenceFile.Data.Seq["Check_LCD_V3-0"].Main["154 Execute - All Horizontal Segments On"].Result.PassFail="True",

 

But in the database the Status of this step is still "Failed"

 

 

What i do wrong?

 

Thanks


 

I recommend the following:

 

1) Make the automated LCD test an Action step rather than a Pass/Fail step and instead set a local variable to whether the automatic LCD test failed (e.g. Locals.AutomatedLCDFailed).

 

2) Create a new Pass/Fail test (using the none adapter) that takes both the local variable and the user's input into account to determine it's pass/fail status (e.g. Set the step's data source to an expression like: !(Locals.AutomatedLCDTestFailed && Locals.UserLCDTestFailed)

 

As an alternative to making 1) an Action step you could leave it a pass/fail step and uncheck the step setting on it for "Step failure causes sequence failure". Then you could use the status of that step instead of Locals.AutomatedLCDTestFailed. The one difference is that the automated test will still show up as failed in your report even though the sequence can still be passed. It's somewhat a matter of preference.

 

Hope this helps,

-Doug

Message 5 of 6
(6,300 Views)

I just want to add that you can find the last result a step generated with the Step.LastStepResult property.

0 Kudos
Message 6 of 6
(6,200 Views)