diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 39db74ac..ccee3a38 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,6 +1,10 @@ # Release Notes ## Release 0.3.8 (NOT RELEASED YET) + +* [Fixed Issue 252][issue-252] + + Splitting fix made for jacoco reports from Jenkins #98. * [Fixed Issue 222][issue-222] diff --git a/jenkins-client/src/main/java/com/offbytwo/jenkins/model/JacocoCoverageReport.java b/jenkins-client/src/main/java/com/offbytwo/jenkins/model/JacocoCoverageReport.java new file mode 100644 index 00000000..ed623aa1 --- /dev/null +++ b/jenkins-client/src/main/java/com/offbytwo/jenkins/model/JacocoCoverageReport.java @@ -0,0 +1,42 @@ +package com.offbytwo.jenkins.model; + +public class JacocoCoverageReport extends BaseModel { + + private JacocoCoverageResult lineCoverage; + private JacocoCoverageResult classCoverage; + private JacocoCoverageResult complexityScore; + private JacocoCoverageResult instructionCoverage; + private JacocoCoverageResult branchCoverage; + + public JacocoCoverageResult getLineCoverage() { + return lineCoverage; + } + public void setLineCoverage(JacocoCoverageResult lineCoverage) { + this.lineCoverage = lineCoverage; + } + public JacocoCoverageResult getClassCoverage() { + return classCoverage; + } + public void setClassCoverage(JacocoCoverageResult classCoverage) { + this.classCoverage = classCoverage; + } + public JacocoCoverageResult getComplexityScore() { + return complexityScore; + } + public void setComplexityScore(JacocoCoverageResult complexityScore) { + this.complexityScore = complexityScore; + } + public JacocoCoverageResult getInstructionCoverage() { + return instructionCoverage; + } + public void setInstructionCoverage(JacocoCoverageResult instructionCoverage) { + this.instructionCoverage = instructionCoverage; + } + public JacocoCoverageResult getBranchCoverage() { + return branchCoverage; + } + public void setBranchCoverage(JacocoCoverageResult branchCoverage) { + this.branchCoverage = branchCoverage; + } + +} \ No newline at end of file diff --git a/jenkins-client/src/main/java/com/offbytwo/jenkins/model/JacocoCoverageResult.java b/jenkins-client/src/main/java/com/offbytwo/jenkins/model/JacocoCoverageResult.java new file mode 100644 index 00000000..760bb610 --- /dev/null +++ b/jenkins-client/src/main/java/com/offbytwo/jenkins/model/JacocoCoverageResult.java @@ -0,0 +1,44 @@ +package com.offbytwo.jenkins.model; + +public class JacocoCoverageResult { + + private int covered; + private int missed; + private int percentage; + private int percentageFloat; + private int total; + + public int getCovered() { + return covered; + } + public void setCovered(int covered) { + this.covered = covered; + } + public int getMissed() { + return missed; + } + public void setMissed(int missed) { + this.missed = missed; + } + public int getPercentage() { + return percentage; + } + public void setPercentage(int percentage) { + this.percentage = percentage; + } + public int getPercentageFloat() { + return percentageFloat; + } + public void setPercentageFloat(int percentageFloat) { + this.percentageFloat = percentageFloat; + } + public int getTotal() { + return total; + } + public void setTotal(int total) { + this.total = total; + } + + + +} \ No newline at end of file diff --git a/jenkins-client/src/main/java/com/offbytwo/jenkins/model/MavenBuild.java b/jenkins-client/src/main/java/com/offbytwo/jenkins/model/MavenBuild.java index e8cd5c1f..2ab8de4b 100644 --- a/jenkins-client/src/main/java/com/offbytwo/jenkins/model/MavenBuild.java +++ b/jenkins-client/src/main/java/com/offbytwo/jenkins/model/MavenBuild.java @@ -30,4 +30,8 @@ public MavenBuild(int number, String url) { public MavenModule getMavenModule() throws IOException { return client.get(this.getUrl() + "/mavenArtifacts/", MavenModule.class); } + + public JacocoCoverageReport getJacocoCodeCoverageReport() throws IOException { + return client.get(this.getUrl() + "/jacoco/", JacocoCoverageReport.class); + } }