Skip to content

Commit

Permalink
Support for JaCoCo aggregated report (#45)
Browse files Browse the repository at this point in the history
* Add aggregate report process

* Using groups if at least one is found in report

* Correcting test cases

---------

Co-authored-by: thsaravana <[email protected]>
  • Loading branch information
mavotto and thsaravana authored Jul 22, 2023
1 parent 2e0c7d5 commit 6e2d264
Show file tree
Hide file tree
Showing 5 changed files with 532 additions and 6 deletions.
282 changes: 282 additions & 0 deletions __tests__/__fixtures__/aggregate-report.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,282 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN"
"report.dtd">
<report name="jacoco-aggregate-playground">
<sessioninfo dump="1630475840767" id="FWS-CHE-LT-2648-35e84bdf" start="1630475837836" />
<sessioninfo dump="1630475836741" id="FWS-CHE-LT-2648-dd5996a5" start="1630475831008" />
<sessioninfo dump="1630475844131" id="FWS-CHE-LT-2648-93125f81" start="1630475843423" />
<group name="module-1">
<package name="com/madrapps/text">
<class name="com/madrapps/text/StringOperation" sourcefilename="StringOperation.java" />
<class name="com/madrapps/text/StringOp" sourcefilename="StringOp.java">
<method name="&lt;init&gt;" desc="()V" line="3">
<counter covered="3" missed="0" type="INSTRUCTION" />
<counter covered="1" missed="0" type="LINE" />
<counter covered="1" missed="0" type="COMPLEXITY" />
<counter covered="1" missed="0" type="METHOD" />
</method>
<method name="endsWith" desc="(Ljava/lang/String;Ljava/lang/String;)Z" line="7">
<counter covered="4" missed="0" type="INSTRUCTION" />
<counter covered="1" missed="0" type="LINE" />
<counter covered="1" missed="0" type="COMPLEXITY" />
<counter covered="1" missed="0" type="METHOD" />
</method>
<method name="startsWith" desc="(Ljava/lang/String;Ljava/lang/String;)Z" line="12">
<counter covered="4" missed="0" type="INSTRUCTION" />
<counter covered="1" missed="0" type="LINE" />
<counter covered="1" missed="0" type="COMPLEXITY" />
<counter covered="1" missed="0" type="METHOD" />
</method>
<counter covered="11" missed="0" type="INSTRUCTION" />
<counter covered="3" missed="0" type="LINE" />
<counter covered="3" missed="0" type="COMPLEXITY" />
<counter covered="3" missed="0" type="METHOD" />
<counter covered="1" missed="0" type="CLASS" />
</class>
<sourcefile name="StringOp.java">
<line cb="0" ci="3" mb="0" mi="0" nr="3" />
<line cb="0" ci="4" mb="0" mi="0" nr="7" />
<line cb="0" ci="4" mb="0" mi="0" nr="12" />
<counter covered="11" missed="0" type="INSTRUCTION" />
<counter covered="3" missed="0" type="LINE" />
<counter covered="3" missed="0" type="COMPLEXITY" />
<counter covered="3" missed="0" type="METHOD" />
<counter covered="1" missed="0" type="CLASS" />
</sourcefile>
<sourcefile name="StringOperation.java" />
<counter covered="11" missed="0" type="INSTRUCTION" />
<counter covered="3" missed="0" type="LINE" />
<counter covered="3" missed="0" type="COMPLEXITY" />
<counter covered="3" missed="0" type="METHOD" />
<counter covered="1" missed="0" type="CLASS" />
</package>
<counter covered="11" missed="0" type="INSTRUCTION" />
<counter covered="3" missed="0" type="LINE" />
<counter covered="3" missed="0" type="COMPLEXITY" />
<counter covered="3" missed="0" type="METHOD" />
<counter covered="1" missed="0" type="CLASS" />
</group>
<group name="module-2">
<package name="com/madrapps/math">
<class name="com/madrapps/math/MathOperation$MathOp" sourcefilename="MathOperation.kt" />
<class name="com/madrapps/math/MathOperation" sourcefilename="MathOperation.kt" />
<class name="com/madrapps/math/Arithmetic" sourcefilename="Math.kt">
<method name="&lt;init&gt;" desc="()V" line="3">
<counter covered="3" missed="0" type="INSTRUCTION" />
<counter covered="1" missed="0" type="LINE" />
<counter covered="1" missed="0" type="COMPLEXITY" />
<counter covered="1" missed="0" type="METHOD" />
</method>
<method name="add" desc="(II)I" line="6">
<counter covered="4" missed="0" type="INSTRUCTION" />
<counter covered="1" missed="0" type="LINE" />
<counter covered="1" missed="0" type="COMPLEXITY" />
<counter covered="1" missed="0" type="METHOD" />
</method>
<method name="subtract" desc="(II)I" line="10">
<counter covered="4" missed="0" type="INSTRUCTION" />
<counter covered="1" missed="0" type="LINE" />
<counter covered="1" missed="0" type="COMPLEXITY" />
<counter covered="1" missed="0" type="METHOD" />
</method>
<method name="multiply" desc="(II)I" line="14">
<counter covered="4" missed="0" type="INSTRUCTION" />
<counter covered="1" missed="0" type="LINE" />
<counter covered="1" missed="0" type="COMPLEXITY" />
<counter covered="1" missed="0" type="METHOD" />
</method>
<method name="divide" desc="(II)I" line="18">
<counter covered="4" missed="0" type="INSTRUCTION" />
<counter covered="1" missed="0" type="LINE" />
<counter covered="1" missed="0" type="COMPLEXITY" />
<counter covered="1" missed="0" type="METHOD" />
</method>
<method name="modulo" desc="(II)I" line="22">
<counter covered="0" missed="4" type="INSTRUCTION" />
<counter covered="0" missed="1" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
</method>
<method name="area" desc="(II)I" line="26">
<counter covered="0" missed="4" type="INSTRUCTION" />
<counter covered="0" missed="1" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
</method>
<counter covered="19" missed="8" type="INSTRUCTION" />
<counter covered="5" missed="2" type="LINE" />
<counter covered="5" missed="2" type="COMPLEXITY" />
<counter covered="5" missed="2" type="METHOD" />
<counter covered="1" missed="0" type="CLASS" />
</class>
<sourcefile name="Math.kt">
<line cb="0" ci="3" mb="0" mi="0" nr="3" />
<line cb="0" ci="4" mb="0" mi="0" nr="6" />
<line cb="0" ci="4" mb="0" mi="0" nr="10" />
<line cb="0" ci="4" mb="0" mi="0" nr="14" />
<line cb="0" ci="4" mb="0" mi="0" nr="18" />
<line cb="0" ci="0" mb="0" mi="4" nr="22" />
<line cb="0" ci="0" mb="0" mi="4" nr="26" />
<counter covered="19" missed="8" type="INSTRUCTION" />
<counter covered="5" missed="2" type="LINE" />
<counter covered="5" missed="2" type="COMPLEXITY" />
<counter covered="5" missed="2" type="METHOD" />
<counter covered="1" missed="0" type="CLASS" />
</sourcefile>
<sourcefile name="MathOperation.kt" />
<counter covered="19" missed="8" type="INSTRUCTION" />
<counter covered="5" missed="2" type="LINE" />
<counter covered="5" missed="2" type="COMPLEXITY" />
<counter covered="5" missed="2" type="METHOD" />
<counter covered="1" missed="0" type="CLASS" />
</package>
<counter covered="19" missed="8" type="INSTRUCTION" />
<counter covered="5" missed="2" type="LINE" />
<counter covered="5" missed="2" type="COMPLEXITY" />
<counter covered="5" missed="2" type="METHOD" />
<counter covered="1" missed="0" type="CLASS" />
</group>
<group name="module-3">
<package name="com/madrapps/playground">
<class name="com/madrapps/playground/MainViewModel" sourcefilename="MainViewModel.kt">
<method name="&lt;init&gt;" desc="()V" line="5">
<counter covered="3" missed="0" type="INSTRUCTION" />
<counter covered="1" missed="0" type="LINE" />
<counter covered="1" missed="0" type="COMPLEXITY" />
<counter covered="1" missed="0" type="METHOD" />
</method>
<method name="validate" desc="(Ljava/lang/String;)Z" line="8">
<counter covered="7" missed="0" type="INSTRUCTION" />
<counter covered="1" missed="0" type="LINE" />
<counter covered="1" missed="0" type="COMPLEXITY" />
<counter covered="1" missed="0" type="METHOD" />
</method>
<method name="verifyAccess" desc="(Ljava/lang/String;)Z" line="12">
<counter covered="0" missed="7" type="INSTRUCTION" />
<counter covered="0" missed="1" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
</method>
<counter covered="10" missed="7" type="INSTRUCTION" />
<counter covered="2" missed="1" type="LINE" />
<counter covered="2" missed="1" type="COMPLEXITY" />
<counter covered="2" missed="1" type="METHOD" />
<counter covered="1" missed="0" type="CLASS" />
</class>
<class name="com/madrapps/playground/MainActivity$onCreate$$inlined$viewModels$default$2"
sourcefilename="ActivityViewModelLazy.kt">
<method name="invoke" desc="()Landroidx/lifecycle/ViewModelStore;" line="47">
<counter covered="0" missed="9" type="INSTRUCTION" />
<counter covered="0" missed="1" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
</method>
<counter covered="0" missed="9" type="INSTRUCTION" />
<counter covered="0" missed="1" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
<counter covered="0" missed="1" type="CLASS" />
</class>
<class name="com/madrapps/playground/MainActivity$onCreate$$inlined$viewModels$default$1"
sourcefilename="ActivityViewModelLazy.kt">
<method name="invoke" desc="()Landroidx/lifecycle/ViewModelProvider$Factory;" line="44">
<counter covered="0" missed="9" type="INSTRUCTION" />
<counter covered="0" missed="1" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
</method>
<counter covered="0" missed="9" type="INSTRUCTION" />
<counter covered="0" missed="1" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
<counter covered="0" missed="1" type="CLASS" />
</class>
<class name="com/madrapps/playground/MainActivity" sourcefilename="MainActivity.kt">
<method name="&lt;init&gt;" desc="()V" line="10">
<counter covered="0" missed="3" type="INSTRUCTION" />
<counter covered="0" missed="1" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
</method>
<method name="onCreate" desc="(Landroid/os/Bundle;)V" line="13">
<counter covered="0" missed="71" type="INSTRUCTION" />
<counter covered="0" missed="12" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
</method>
<method name="onCreate$lambda-0"
desc="(Lkotlin/Lazy;)Lcom/madrapps/playground/MainViewModel;" line="18">
<counter covered="0" missed="10" type="INSTRUCTION" />
<counter covered="0" missed="1" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
</method>
<method name="&lt;clinit&gt;" desc="()V" line="18">
<counter covered="0" missed="1" type="INSTRUCTION" />
<counter covered="0" missed="1" type="LINE" />
<counter covered="0" missed="1" type="COMPLEXITY" />
<counter covered="0" missed="1" type="METHOD" />
</method>
<counter covered="0" missed="85" type="INSTRUCTION" />
<counter covered="0" missed="13" type="LINE" />
<counter covered="0" missed="4" type="COMPLEXITY" />
<counter covered="0" missed="4" type="METHOD" />
<counter covered="0" missed="1" type="CLASS" />
</class>
<sourcefile name="ActivityViewModelLazy.kt">
<line cb="0" ci="0" mb="0" mi="9" nr="44" />
<line cb="0" ci="0" mb="0" mi="9" nr="47" />
<counter covered="0" missed="18" type="INSTRUCTION" />
<counter covered="0" missed="2" type="LINE" />
<counter covered="0" missed="2" type="COMPLEXITY" />
<counter covered="0" missed="2" type="METHOD" />
<counter covered="0" missed="2" type="CLASS" />
</sourcefile>
<sourcefile name="MainActivity.kt">
<line cb="0" ci="0" mb="0" mi="3" nr="10" />
<line cb="0" ci="0" mb="0" mi="3" nr="13" />
<line cb="0" ci="0" mb="0" mi="3" nr="14" />
<line cb="0" ci="0" mb="0" mi="2" nr="17" />
<line cb="0" ci="0" mb="0" mi="15" nr="18" />
<line cb="0" ci="0" mb="0" mi="10" nr="19" />
<line cb="0" ci="0" mb="0" mi="10" nr="20" />
<line cb="0" ci="0" mb="0" mi="4" nr="23" />
<line cb="0" ci="0" mb="0" mi="10" nr="24" />
<line cb="0" ci="0" mb="0" mi="10" nr="25" />
<line cb="0" ci="0" mb="0" mi="4" nr="28" />
<line cb="0" ci="0" mb="0" mi="10" nr="29" />
<line cb="0" ci="0" mb="0" mi="1" nr="30" />
<counter covered="0" missed="85" type="INSTRUCTION" />
<counter covered="0" missed="13" type="LINE" />
<counter covered="0" missed="4" type="COMPLEXITY" />
<counter covered="0" missed="4" type="METHOD" />
<counter covered="0" missed="1" type="CLASS" />
</sourcefile>
<sourcefile name="MainViewModel.kt">
<line cb="0" ci="3" mb="0" mi="0" nr="5" />
<line cb="0" ci="4" mb="0" mi="0" nr="8" />
<line cb="0" ci="0" mb="0" mi="4" nr="12" />
<counter covered="10" missed="7" type="INSTRUCTION" />
<counter covered="2" missed="1" type="LINE" />
<counter covered="2" missed="1" type="COMPLEXITY" />
<counter covered="2" missed="1" type="METHOD" />
<counter covered="1" missed="0" type="CLASS" />
</sourcefile>
<counter covered="10" missed="110" type="INSTRUCTION" />
<counter covered="2" missed="16" type="LINE" />
<counter covered="2" missed="7" type="COMPLEXITY" />
<counter covered="2" missed="7" type="METHOD" />
<counter covered="1" missed="3" type="CLASS" />
</package>
<counter covered="10" missed="110" type="INSTRUCTION" />
<counter covered="2" missed="16" type="LINE" />
<counter covered="2" missed="7" type="COMPLEXITY" />
<counter covered="2" missed="7" type="METHOD" />
<counter covered="1" missed="3" type="CLASS" />
</group>
<counter type="INSTRUCTION" missed="8754" covered="28212"/>
<counter type="BRANCH" missed="798" covered="1268"/>
<counter type="LINE" missed="2230" covered="7593"/>
<counter type="COMPLEXITY" missed="1271" covered="2645"/>
<counter type="METHOD" missed="683" covered="2194"/>
<counter type="CLASS" missed="40" covered="353"/>
</report>
Loading

0 comments on commit 6e2d264

Please sign in to comment.