Forum Discussion
Test Coverage Definition - Unit Testing
Well! I was having an argument on test coverage for a project with a friend and below are the points that I stick to. As am a novice in this area, would expect few clarifications on the points that I am up to and if these are valid.
Test Coverage, Define minimum, optimal and overkill percentage with pros and cons.
Test Coverage: Test coverage is a technique where our test cases cover application code and on specific conditions those test cases are met.
Minimum Test Coverage Rate: Keeping it between 60 - 70%.
Pros: 1) The good thing here is we are sure our minimum requirements are met and there are scopes for improvement 2) Gives us the option to explore a bit more for better system design
Cons: 1) The remaining 30 - 40% area to explore 2) Changes for future unexpected errors or modifications
Optimal Test Coverage Rate: Keeping it between 70 - 80%.
Pros: 1) We can define it as a standard with respect to minimum and overkill criteria 2) Depending upon requirements or situations, options could be created to fill the rest of the percentage
Cons: 1) Despite defining it as a standard, we require to keep in mind depending upon specific scenarios, future assumptions should be kept for analysis later
Overkill Test Coverage Rate: Keeping it between 80 - 100%.
Pros: 1) We can assure all requirements for test cases are filled up for the time being
Cons: 1) Future measures may require to be taken up for specific situations and in a matter of time
N.B: The above are my personal opinion and it may vary depending upon specific system design or requirements. What I tried is to provide a rough percentage that'll have an impact for test cases.