Sunday, May 24, 2020

Enhance Testability Of The Code With Test Coverage

Enhance Testability of the code with Test Coverage TestNext Symposium 2014 By Vivek Kalidindi vivek.kalidindi@optum.com Optum Global Solutions, HYD-II ` TNS 2014 Page 1 Abstract: In Agile it is vital that testing provide feedback on an ongoing basis about how well the emerging product is meeting the business needs. This can be achieved by designing quality tests. This paper talks about an approach that would help testers to define a right test pyramid and to design better tests based on the code/test coverage measurements that contribute to developing and testing a better quality product for our customers. This shall also enhance the testability of the product code by providing feedback to both testers and developers on the risk of†¦show more content†¦Code coverage framework for program analysis Test (or) Code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test case/suite. In other words, Code coverage is a way of ensuring that your tests are actually testing your code. Coverage acts as an effective approach to determine the efficiency of your test case (or a set of test cases); knowledge of the internals of the object being tested shall be known to (white/black-box) test and helps in test case optimization. There are many different coverage measures. A simple one is to record which lines of code were executed. If a line has never been executed, it s a safe bet you didn t catch any bugs lurking in it. This type of coverage is usually called statement coverage. Other popular coverage measures include branch, method/function, path and condition coverage. 2.1 How Code Coverage works: Code coverage measures are generally implemented by inserting reporting instructions into program. This is called Instrumentation. Instrumentation is all about ` TNS 2014 Page 2 manipulating the application code by injecting reporting code into strategic positions. And the art of instrumentation has two forms: a. Source-code Instrumentation - creates an intermediary version of the sources which are then compiled into the final, source-instrumented compiled files as shown below in Figure 2.1.a b.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.