Code integrity is a measurement used in software testing. It measures the how high the source code's quality is when it is passed on to the QA, and is affected by how extensively the code was unit tested and integration tested. Code integrity is a combination of code coverage and software quality, and is usually achieved by unit testing your code to reach high code coverage. With code integrity, the developer can be sure that his/her code is written correctly when passed on to QA. This is, in fact, the expected quality level of the code. Code integrity helps companies release betterproducts, with fewer bugs, in a shorter time. Companies who practice code integrity avoid the classic scenario where the development stage is delayed, delaying the QA stage, delaying the release stage. The product is released with more bugs, users report tons of bugs back to the development team, and they start working on version 1.1 shortly after releasing version 1.0, just to fix bugs that could have been avoided. The QA department can’t measure the code’s integrity even after all their tests are run. The only way to measure code integrity, and be sure of your code, is by unit testing your code, and reaching high code coverage. Improve code integrity by:
Shorter development time - bugs that are found during the development stage are fixed faster and easier than bugs found in later stages.
Lower development costs – It's cheaper to fix bugs that are found during the development stage than in later stages.
Confidence in your code's quality – Releasing products with high code integrity means more positive feedback from your customers.
Makes the QA's work much more efficient – The QA concentrates on testing the system, without worrying about bugs that could have been easily found through proper unit testing.
Measuring code integrity:''' To measuring code integrity, use the following formula: 1 − / In words:, the 100% code integrity minus the number of bugs that weren’t covered by unit testing, divided by the total bugs found during the entireproduct cycle., including development is the code not in integrity.