---
name: "ct_cover"
section: "3erl"
platform: "linux"
package: "erlang-manpages"
version: "1:25.2.3+dfsg-1+deb12u4"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/ct_cover"
---

# ct\_cover(3erl)

Common Test framework code coverage support module.

## NAME

ct\_cover - Common Test framework code coverage support module.

## DESCRIPTION

*Common Test* framework code coverage support module.

This module exports help functions for performing code coverage analysis.

## EXPORTS

**add\_nodes(Nodes) -\> {ok, StartedNodes} \| {error, Reason}**\

Types:

Nodes = \[atom()\]\
 StartedNodes = \[atom()\]\
 Reason = cover\_not\_running \| not\_main\_node\

Adds nodes to current cover test. Notice that this only works if cover support is active.

To have effect, this function is to be called from *init\_per\_suite/1* (see *common\_test*) before any tests are performed.

**cross\_cover\_analyse(Level, Tests) -\> ok**\

Types:

Level = overview \| details\
 Tests = \[{Tag, Dir}\]\
 Tag = atom()\
 Dir = string()\

Accumulates cover results over multiple tests. See section Cross Cover Analysis in the Users's Guide.

**remove\_nodes(Nodes) -\> ok \| {error, Reason}**\

Types:

Nodes = \[atom()\]\
 Reason = cover\_not\_running \| not\_main\_node\

Removes nodes from the current cover test.

Call this function to stop cover test on nodes previously added with *ct\_cover:add\_nodes/1*. Results on the remote node are transferred to the *Common Test* node.
