NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

How to change the step resutl afterl the step is deone?

Hi,
 
I have a situation where, when a step fails I run it again later in the sequence (using precondition) 
If the second step passes I would like to either
   a.  Change the status of the first step from fail to pass (and change the red step result to green), or,
   b.  Leave this step result color red but tell the sequence that this step passes so that the end result of the test will be pass.
 
I'm not sure which one is preferable?  What do you think?
I tend to prefer option a.
 
Thanks
Rafi
TS3.5+CVI8.0+NI provided User Interface
0 Kudos
Message 1 of 4
(3,447 Views)

Hi,

I prefer neither.

options a) means have to trawl through the resultlist to find and modify that result.

options b) this means have explaining to someone , such as QA, that the failure is not really a failure.

Why not have your first step as record only and then make the decisions on your second step based on the results of both. You can expand the reason for the failure by use of the report text comment on the second step. That way, in your results any failures will mean failure and passes will mean passes.

Regards
Ray Farmer
Regards
Ray Farmer
Message 2 of 4
(3,446 Views)
Hi Ray and thanks for your response,
 
My second test will run (as it is setup now) only upon the condition that the first test fails. (it is a repetition of the same step....).
so, in order to implement your advice, I guess I should do the following (please correct me if I'm wrong..)
 
1. In the first step, in the 'Run Option', I"ll remove the checkmark for 'Step failure Causes Sequence failurebut I'll leave  the 'Record Result' checked.
 
2. The second step (repetion of the first step), I'll leave the condition to run it only upon failure of the first step.  If if fails, then, it will fail the sequence, if it pass, then, the sequence will pass.   I assume I'll still see the red result for the first step, correct?  I will add a message in the report explaining that this step is a repetition of the first step, therefor the sequence PASS the test.
 
3. I see no reason to evaluate the result of the two tests since the second one will run only if the first one fails.  However, I'll apriciate if you could show where in the context you can see the result of previous tests.  I could not find it.
 
Thanks you very much
Rafi 
0 Kudos
Message 3 of 4
(3,422 Views)
Another solution would be to have a custom loop on the step that there must be at least 1 pass out of X, to be a Pass otherwise it is a Fail.  This can be found the Loop Options Tab.  Uncheck the box to "Record Result of Each Iteration" and only record only the final result(In the Run Options Tab).  X can be a Fileglobal called MaxRetries that you can arbitrarily set for all steps .
 
 
For Example:
 
Loop_While Expression:
RunState.LoopIndex < FileGlobals.MaxRetries && RunState.LoopNumPassed < 1
 
LoopStatus Expression
RunState.LoopNumPassed >= 1 ? "Passed" : "Failed"
 
Mike
0 Kudos
Message 4 of 4
(3,355 Views)