blob: f3d48b2451db05fccf19fa83820144318a2ba1f3 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="" >
<head>
<meta charset="UTF-8">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Code coverage report ยท ActiveMQ Artemis Documentation</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="description" content="">
<meta name="generator" content="GitBook 3.2.3">
<link rel="stylesheet" href="gitbook/style.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-search/search.css">
<link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
<meta name="HandheldFriendly" content="true"/>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
<link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">
<link rel="next" href="formatting.html" />
<link rel="prev" href="tests.html" />
</head>
<body>
<div class="book">
<div class="book-summary">
<div id="book-search-input" role="search">
<input type="text" placeholder="Type to search" />
</div>
<nav role="navigation">
<ul class="summary">
<li class="chapter " data-level="1.1" data-path="./">
<a href="./">
Introduction
</a>
</li>
<li class="chapter " data-level="1.2" data-path="notice.html">
<a href="notice.html">
Legal Notice
</a>
</li>
<li class="chapter " data-level="1.3" data-path="code.html">
<a href="code.html">
Working with the Code
</a>
</li>
<li class="chapter " data-level="1.4" data-path="ide.html">
<a href="ide.html">
IDE Integration
</a>
</li>
<li class="chapter " data-level="1.5" data-path="building.html">
<a href="building.html">
Building
</a>
</li>
<li class="chapter " data-level="1.6" data-path="tests.html">
<a href="tests.html">
Tests
</a>
</li>
<li class="chapter active" data-level="1.7" data-path="code-coverage-report.html">
<a href="code-coverage-report.html">
Code coverage report
</a>
</li>
<li class="chapter " data-level="1.8" data-path="formatting.html">
<a href="formatting.html">
Code Formatting
</a>
</li>
<li class="chapter " data-level="1.9" data-path="validating-releases.html">
<a href="validating-releases.html">
Validating releases
</a>
</li>
<li class="chapter " data-level="1.10" data-path="maintainers.html">
<a href="maintainers.html">
Notes for Maintainers
</a>
</li>
<li class="chapter " data-level="1.11" data-path="history.html">
<a href="history.html">
History
</a>
</li>
<li class="divider"></li>
<li>
<a href="https://www.gitbook.com" target="blank" class="gitbook-link">
Published with GitBook
</a>
</li>
</ul>
</nav>
</div>
<div class="book-body">
<div class="body-inner">
<div class="book-header" role="navigation">
<!-- Title -->
<h1>
<i class="fa fa-circle-o-notch fa-spin"></i>
<a href="." >Code coverage report</a>
</h1>
</div>
<div class="page-wrapper" tabindex="-1" role="main">
<div class="page-inner">
<div id="book-search-results">
<div class="search-noresults">
<section class="normal markdown-section">
<h1 id="code-coverage-report">Code coverage report</h1>
<h2 id="getting-jacoco-exec-files">Getting JaCoCo exec files</h2>
<p>Before you can generate code coverage report by JaCoCo tool,
you need to get data about what lines of code were executed
during testing. These information are collected by JaCoCo
agent and stored in JaCoCo exec files. All you need to do
is run the tests with <code>jacoco</code> maven profile.</p>
<pre><code>mvn test -Ptests,extra-tests,jacoco
</code></pre><h2 id="generate-jacoco-reports">Generate JaCoCo reports</h2>
<pre><code>mvn verify -Pjacoco-generate-report -DskipTests
</code></pre><p>For generating JaCoCo reports only run the maven build
with profile <code>jacoco-generate-report</code> as it is shown
in the example above. After the command was executed,
in directory <code>target/jacoco-report</code> you can find
reports in HTML and XML formats.</p>
<h2 id="merge-jacoco-exec-files-to-one">Merge JaCoCo exec files to one</h2>
<p>Since ActiveMQ Artemis is divided into several modules,
exec files are generated for each module separately.
If you need to merge them together to have all data
in one place, you can do it by command below.</p>
<pre><code>mvn jacoco:merge -N -Pjacoco
</code></pre>
</section>
</div>
<div class="search-results">
<div class="has-results">
<h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
<ul class="search-results-list"></ul>
</div>
<div class="no-results">
<h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
</div>
</div>
</div>
</div>
</div>
</div>
<a href="tests.html" class="navigation navigation-prev " aria-label="Previous page: Tests">
<i class="fa fa-angle-left"></i>
</a>
<a href="formatting.html" class="navigation navigation-next " aria-label="Next page: Code Formatting">
<i class="fa fa-angle-right"></i>
</a>
</div>
<script>
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"Code coverage report","level":"1.7","depth":1,"next":{"title":"Code Formatting","level":"1.8","depth":1,"path":"formatting.md","ref":"formatting.md","articles":[]},"previous":{"title":"Tests","level":"1.6","depth":1,"path":"tests.md","ref":"tests.md","articles":[]},"dir":"ltr"},"config":{"plugins":[],"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"pluginsConfig":{"highlight":{},"search":{},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"github":"apache/activemq-artemis","theme":"default","githubHost":"https://github.com/","pdf":{"pageNumbers":true,"fontSize":12,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":62,"left":62,"top":56,"bottom":56}},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"ActiveMQ Artemis Documentation","links":{"home":"http://activemq.apache.org/artemis","issues":"https://issues.apache.org/jira/browse/ARTEMIS","contribute":"http://activemq.apache.org/contributing.html"},"gitbook":"3.x.x","description":"ActiveMQ Artemis Hacking Guide"},"file":{"path":"code-coverage-report.md","mtime":"2020-01-10T14:13:27.000Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2020-01-10T14:51:15.876Z"},"basePath":".","book":{"language":""}});
});
</script>
</div>
<script src="gitbook/gitbook.js"></script>
<script src="gitbook/theme.js"></script>
<script src="gitbook/gitbook-plugin-search/search-engine.js"></script>
<script src="gitbook/gitbook-plugin-search/search.js"></script>
<script src="gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
<script src="gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
<script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
<script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
</body>
</html>