At the moment I think about what is the best way to set a fail
Who can do best practice sharing with me?
I would use the following sample for better understanding.
http://ftp.ni.com/pub/devzone/epd/cvimeas.zip
It is clear for me – how to get some values from a module (called DUT = device under test) and set this value as numeric limit or string test.
But for me is not clear - what is the best way to set fail.
For example if a value cannot read from DUT
In general the error flag can be used like this
testError->errorFlag = TRUE;
testError->errorCode = error;
teststData->replaceStringFuncPtr(&testError->errorMessage, errMsg);
but make it sense to set the test to error on all fail – for example if the temperature cannot be read from DUT should we set fail or error?
On PASS/FAIL Test it is easy to set ERROR on troubles like “RS232 cannot be opened and FAIL if reading from DUT is not successful.
But on numeric limit tests or string tests it is not possible to set fail as result.
What is the best way?
- Set error with the error flag à so result will be often error – for example timeout/ack error on I2C/rs232
- Set a result which should not be happened in real like “-9999” – you have always the risk that the result of DUT will be the same
- ……..
Who can share and describe his solution and the advantages and disadvantages?
Thanks
TODA1980
.