Unit Testing Group

cancel
Showing results for 
Search instead for 
Did you mean: 

User Defined Test - why is the default to pass?

Hello all,

 

We have noticed that if you create a user defined test, and then connect nothing to it, the default behaviour upon running the test is a pass. This seems counter intuitive. I would expect that a test should pass only if all test criteria are met, and it would be better that no test criteria at all (ie just the results cluster remaining) should be treated as a fail, since this allows us to run all unit tests overnight and address any issues (ie failed tests) in the morning.

 

Has anyone else had problems with this behaviour, (and even better) has anyone found a way to change this default behaviour such that the tests will fail?

 

Adam. 

Message 1 of 2
(2,872 Views)

Hello Adam,

 

I'm afraid I don't have any answers for you as I don't use UTF. This is actually the default mode across all unit test frameworks I have used, in LabVIEW and Javscript - They will pass unless there is an assertion to fail.

 

I guess the question is what would be the cases where you would create a test case and not add anything to it? Really you should aim to make all tests pass before you commit them to the repository so the overnight test doesn't fail.

 

Cheers,

James

James Mc
========
CLA and cRIO Fanatic
My writings on LabVIEW Development are at devs.wiresmithtech.com
0 Kudos
Message 2 of 2
(2,844 Views)