A branch is the outcome of a decision, so branch coverage simply measures which decision outcomes have been tested. It covers both the true and false conditions unlikely the statement coverage. What is branch coverage?ĭecision Coverage is also known as Branch Coverage or all-edges coverage. Note when it is used in conjuction with the maven-surefire-plugin or maven-failsafe-plugin you must not use a forkCount of 0 or set the forkMode to never as this would prevent the execution of the tests with the javaagent set and no coverage would be recorded. So if you want to have line number information included in the coverage reports or you want source code highlighting the class files of the test target must be compiled with debug information. Additionally, it can measure and report cyclomatic complexity for methods and summarize the complexity for classes and packages. In this post I will show you how to work with Junit code coverage with JaCoCo code coverage library, which is quite a new maven plug-in that provides the JaCoCo runtime agent to your tests and allows basic report creation.Ĭurrently it supports instruction, branch, line, method and class coverage which is pretty enough you can expect from this kind of tool.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |