NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

"RunState.ThisContext.Step.Result.Status" can't get result status of a "NumericLimitTest"

Solved!
Go to solution

Hello:

     Thanks for your reading!

I can use "RunState.ThisContext.Step.Result.Status" to get the string result of a "NI_MultipleNumericLimitTest" normally, but when i copy the same expression to a single "NumericLimitTest", it won't work.

My application is in the post expression of step ID:"ID#:kIiJ0iOn5kasNtO30mauaD" of the attached seq. the normal expression is in the post expression of step ID: "ID#:nbqVhE500ESiRPH/yMTSRB"

Thanks for your checking!

0 Kudos
Message 1 of 4
(5,657 Views)

Hi,

 

During execution of your step the status is "running". And become passed or failed when the step finish processing.

Try to use a statement just after your step NumericLimitTest with "RunState.PreviousStep.Result.Status = ...".

 

ps: RunState.ThisContext.Step.Result.Status = Step.Result.Status

0 Kudos
Message 2 of 4
(5,600 Views)

Thanks Alepar!

So the step status in post expression of "Numeric..." and "Multi..." is different.

In "Numeric..." is "running", in "Multi.." is "passed/failed/skipped"?

0 Kudos
Message 3 of 4
(5,584 Views)
Solution
Accepted by topic author johnnnywang

I tested a MultipleNumericTest, the status in post expression return the state of the test (even if all tests are passed execpt the last test which is failed).

I can't tell you why the status in post expression of a single NumericTest don't work like the status of a MultipleNumericTest.

But, if you use a statement just after your Numeric test "RunState.PreviousState.Result.Status == "Passed" ? ... : ...), it works well.

Maybe it is not the best solution, but it works ^^

0 Kudos
Message 4 of 4
(5,579 Views)