Mariusz Postol

Mariusz Postol

  • 440
  • 3.6k
  • 33.9k

Unit test result evaluation

Feb 19 2024 2:14 PM

Unit test is recognized as a very efficient approach to validating computer program behavior. Unit testing allows developers to detect errors promptly, especially regression errors, which result from changes to the program code. As a result, unit tests are ideal to help identify local errors in the code rapidly during the development phase for new features and code adaptations.

Usually, the results returned by the test are:

  • red - test failed
  • green - test passed
  • yellow - inconclusive

The question is: how does the test evaluate the outcome that it wants to assert and expose to the developer?

My point is that the developer must be aware of how the test evaluates the outcome to detect error if any and undertake appropriate program fixes.

The second complex question is What is an error? Is it possible to misinterpret the test result, for example, red in case there are no errors at all, or green in case the program under test is wrong?

 


Answers (2)