Repository navigation
Devise and implement unit tests
“In computer programming, unit testing is a software testing method by which individual units of source code, sets of one or more computer program modules together with associated control data, usage procedures, and operating procedures are tested to determine if they are fit for use”.[1] ![]()
👍
The main objective of unit testing is to isolate parts of a program , and test each section individually to determine which lines of code is correct and which lines of code have errors.👍![]()
🏋️♂️Software unit testing can aid in finding problems prematurely. By writing the unit test code before the main code itself can be a huge advantage and time saver. It is essential to test code before it is shipped off to testers and clients. It would be of better interest to test each section of code as it is made to ensure code is perfect each section, rather than running into hundreds of errors at the final run of the program. Another huge benefit of unit testing is that the programmer can change code later on and the room to facilitate change has improved drastically. The process of regression testing is to create test cases for all methods and snippets of code so that whenever the programmer changes a snippet of code and the program records a fault , it can be spotted quickly.
Unit testing, although has many advantages, also has many disadvantages. According to Cramblitt, Bob (2007) “unit testing by definition only tests the functionality of the units themselves. Therefore, it will not catch integration errors or broader system-level errors (such as functions performed across multiple units, or non-functional test areas such as performance)”[2] ✌️🇲🇩
Unit testing is the main building block to extreme programming. “Extreme programming relies on an automated unit testing framework” Agile Sherpa (2010) .The main reason for the implementation of unit testing in extreme programming is to stop the programmer from haulting and refactoring. Unit testing is 🗑️ extensively exhausted in terms of extreme programming because of its constant and repetitive testing. Agile Sherpa. (2010)[3]
🖕