Unit tests

Unit tests are piece of code that runs to verify the functionality of the main code is correct. Unit tests have values that are submitted to the function, and it has a value that is expected to be returned by that function. If the return value of that function is different from the value that is expected, then it is an indication of that function had been implemented improperly, or that expected value is incorrect.

It is a good practice to tie release of code, when unit tests pass, meaning that this software is coded properly. Along with expected value of unit tests, another value to look at is test coverage. High test coverage means that majority of the code is being tested.

Unit tests is a good indication of that the code had been written properly.

Comments

Popular posts from this blog

Absolute and relative path in HTML pages

Errors

goto PHP operator