What do you understand by Unit testing?

In programming, a unit test is a way to test the correct functioning of a code module. This is to ensure that each of the modules functions properly separately. Then, with the Integration Tests, it will be possible to ensure the correct operation of the system or subsystem in question. The idea is to write test cases for each nontrivial function or method in the module so that each case is independent of the rest.

For a unit test to be good , the following requirements must be met:

  • Automated : Manual intervention should not be required. This is especially useful for continuous integration.
  • Complete : Must cover the largest amount of code.
  • Repeatable or Reusable : Do not create tests that can only be executed once. It is also useful for continuous integration .
  • Independent : The execution of one test should not affect the execution of another.
  • Professionals : The tests should be considered the same as the code, with the same professionalism, documentation, etc.


Comments

Contact Form

Send