.. index:: single: cobertura_report
.. _cobertura_report/0:

.. rst-class:: right

**object**

``cobertura_report``
====================

Intercepts unit test execution messages and generates a ``cobertura.xml`` file with code coverage results.

| **Availability:** 
|    ``logtalk_load(lgtunit(loader))``

| **Author:** Paulo Moura
| **Version:** 1:0:0
| **Date:** 2026-03-13

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Provides:**
|    :ref:`logtalk::message_hook/4 <logtalk/0::message_hook/4>`
| **Uses:**
|    :ref:`logtalk <logtalk/0>`

| **Remarks:**

   - Usage: Simply load this object before running your tests using the goal ``logtalk_load(lgtunit(cobertura_report))``.

| **Inherited public predicates:**
|    (none)

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

(no local declarations; see entity ancestors if any)

Protected predicates
--------------------

(no local declarations; see entity ancestors if any)

Private predicates
------------------

.. index:: timestamp_/6
.. _cobertura_report/0::timestamp_/6:

``timestamp_/6``
^^^^^^^^^^^^^^^^

Test start date and time.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``timestamp_(Year,Month,Day,Hours,Minutes,Seconds)``
| **Mode and number of proofs:**
|    ``timestamp_(?integer,?integer,?integer,?integer,?integer,?integer)`` - ``zero_or_one``


------------

.. index:: class_/5
.. _cobertura_report/0::class_/5:

``class_/5``
^^^^^^^^^^^^

Table of entity coverage data.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``class_(Entity,File,Line,Covered,Total)``
| **Mode and number of proofs:**
|    ``class_(?entity_identifier,?atom,?integer,?integer,?integer)`` - ``zero_or_more``


------------

.. index:: method_/7
.. _cobertura_report/0::method_/7:

``method_/7``
^^^^^^^^^^^^^

Table of predicate coverage data.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``method_(Entity,Predicate,Line,Covered,Total,Percentage,Clauses)``
| **Mode and number of proofs:**
|    ``method_(?entity_identifier,?predicate_indicator,?integer,?integer,?integer,?float,?list)`` - ``zero_or_more``


------------

.. index:: lines_covered_/1
.. _cobertura_report/0::lines_covered_/1:

``lines_covered_/1``
^^^^^^^^^^^^^^^^^^^^

Counter for total covered lines.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``lines_covered_(Covered)``
| **Mode and number of proofs:**
|    ``lines_covered_(?integer)`` - ``zero_or_one``


------------

.. index:: lines_total_/1
.. _cobertura_report/0::lines_total_/1:

``lines_total_/1``
^^^^^^^^^^^^^^^^^^

Counter for total lines.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``lines_total_(Total)``
| **Mode and number of proofs:**
|    ``lines_total_(?integer)`` - ``zero_or_one``


------------

.. index:: summary_/2
.. _cobertura_report/0::summary_/2:

``summary_/2``
^^^^^^^^^^^^^^

Coverage summary with covered and total entity counts.

| **Compilation flags:**
|    ``dynamic``

| **Template:**
|    ``summary_(Covered,Total)``
| **Mode and number of proofs:**
|    ``summary_(?integer,?integer)`` - ``zero_or_one``


------------

Operators
---------

(none)

