Skip to Content
Jenkins 2权威指南
book

Jenkins 2权威指南

by Brent Laster
April 2019
Intermediate to advanced
566 pages
12h 12m
Chinese
Publishing House of Electronics Industry
Content preview from Jenkins 2权威指南
442
12
集成分析工具
12-17 SonarQube分析页面
代码覆盖率 :与
JaCoCo
集成
通常代码覆盖率分析包含在
SonarQube
等工具中。但是,由于代码覆盖率自身的重要性
不可忽视,因此我们将在此处单独讨论 :如何在你的流水线中单独地使用代码覆盖率程
JaCoCo
。即使你不打算使用
JaCoCo
,此处显示的集成示例在你使用其他工具时也可
能起到参考作用。
关于
JaCoCo
JaCoCo
这个名字是
Java Code Coverage
的缩写。顾名思义,该工具的目的是为
Java
文件提供代码覆盖率的有关信息,实质上,它代表着测试用例运行可以覆盖到的代码量。
其通过检测
Java
类文件来实现。
JaCoCo
可以提供有关覆盖率范围的信息,包括
语句覆盖率
有关已执行的代码量的基本信息。
分支覆盖率
对于
if
switch
语句,将查看所有可能的分支,并找出执行和遗漏分支的数量。
圈复杂度
能够通过一定的方法,生成所有可能路径的最小路径数 ;原则上,可以建议用于完
全覆盖一段代码所需单元测试的数量。
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Jenkins Administrator's Guide

Jenkins Administrator's Guide

Calvin Sangbin Park, Lalit Adithya, Sam Gleske
Kubernetes 实战

Kubernetes 实战

Brendan Burns, Eddie Villalba, Dave Strebel, Lachlan Evenson

Publisher Resources

ISBN: 9787121357633