Skip to main content

Unit Test

Manual vs. automated unit testing

Developers can perform unit tests manually or automatically. Those employing a manual method may have an instinctual document made detailing each step in the process; however, automated testing is the more common method for unit testing. Automated approaches commonly use a testing framework to develop test cases. These frameworks are also set to flag and report any failed test cases while also providing a summary of test cases.

Unit testing advantages

  • The earlier a problem is identified, the fewer compound errors occur.
  • Fixing problems early is usually cheaper than fixing them later in development.
  • Easier debugging processes.
  • Developers can quickly make changes to the codebase.
  • Developers can reuse code and migrate it to new projects.

Unit testing disadvantages

  • More lines of test code may need to be written to test one line of code
  • Unit tests only test sets of data and its functionality
  • Developers may have to learn new skills to implement unit testing correctly

Reference

https://www.techtarget.com/searchsoftwarequality/definition/unit-testing