ct_cover (common_test v1.30)

Copy Markdown View Source

Common Test framework code coverage support module.

This module exports help functions for performing code coverage analysis.

Summary

Functions

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

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

Removes nodes from the current cover test.

Functions

add_nodes(Nodes :: node() | [node()]) -> Result

Types

Result = {ok, StartedNodes} | {error, Reason}
Reason = cover_not_running | term()
StartedNodes = [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 ct_suite) before any tests are performed.

cross_cover_analyse(Level, Tests) -> ok

(since OTP R16B)

Types

Level = overview | details
Tests = [{Tag :: atom(), Dir :: file:name_all()}]

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

remove_nodes(Nodes :: node() | [node()]) -> Result

Types

Result = ok | {error, Reason}
Reason = cover_not_running | not_main_node | term()

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.