NI TestStand

cancel
Showing results for 
Search instead for 
Did you mean: 

sending a return value without pass/fail message

Solved!
Go to solution

Hi,

 

I'm using the COM adapter to talk TestComplete application.

 

I have a string value test step to evaluate a return value and determine if it's pass or fail (e.g. return 0 = pass, return 1 = fail).  This works perfectly.

 

However, I have added another return value (e.g. return 2), the code executed fine, but it keeps displaying that step as "Failed", which is annoying.  Is there a way to suppress this failed message?

 

Basically, here's what I need to do, return 0= display pass, return 1 = display fail, return 2 = display no message or just display done.

 

Thanks so much!

0 Kudos
Message 1 of 4
(3,316 Views)

The String Value Test step type only evaluates to Passed or Failed.  It does not do a tristate.  In fact any of the step types in the Tests (Pass/Fail Test, Numeric Limit Test, Multiple Numeric Limit Test, String Value Test) will always be pass or fail.  They never evaluate to just done.

 

The Status Expression is what makes a step Pass or Fail.  Unfortunately with the default steps you cannot change the Status Expression.  You have to create a custom step type to do that.

 

What are you setting your Step.Result.String to?  Or did you change the Data Source?

 

Here are 3 options:

 

1- Create a custom step based on the String Value Limit test and change the Status Expression such that you get your desired behavior

 

2- Use and Action step and change the Status Expression such that you get your desired behavior.

 

3- Continue using the step you are using but in the Post-Expression place some logic which turns off the Step.StepFailCausesSequenceFail if you are in return 2 state

 

http://zone.ni.com/devzone/cda/tut/p/id/4302

 

Hope this helps

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 2 of 4
(3,307 Views)

Just came accross this as a 4th option.  I did not know about this: http://digital.ni.com/public.nsf/allkb/E3355265AB4DE465862573F1005C0568

 

I know it's fore a Pass/Fail step type but the concept will work for a String Value Test.

 

It is actually the best option.

jigg
CTA, CLA
testeract.com
~Will work for kudos and/or BBQ~
0 Kudos
Message 3 of 4
(3,306 Views)
Solution
Accepted by topic author ph2

Thanks Jigg,

 

Yes, this worked well.  I had two returned value set to passed, and one to failed.  Which is good enough for now. I'll try to change one of the "passed" to "Done" later.

 

Thanks again!

0 Kudos
Message 4 of 4
(3,295 Views)