ct_cover(3erl)

πŸ“¦
version 25.3.2.8 Β· 4 versions
, in ubuntu noble

πŸ’… ct_cover β€” Common Test’s code coverage bestie πŸ’…

Okay so this is ct_cover from the Erlang Module Definition manual. She is the Common Test framework code coverage support module, and she is literally here to help you do coverage analysis. No cap. ✨

🌸 NAME 🌸

ct_cover β€” Common Test framework code coverage support module. Periodt.

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so ct_cover is the Common Test framework code coverage support module. Yes, same energy as NAME, because that is the whole vibe.

This module exports help functions for performing code coverage analysis. Obsessed. πŸ’–

πŸ”₯ EXPORTS πŸ”₯

Here are the exports, bestie β€” every one, no skipping. 🫢

⭐ 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. So highkey check that vibe first. πŸ‘‘

To have effect, this function is to be called from init_per_suite/1 (see common_test) before any tests are performed. iykyk β€” timing matters. 🌈

πŸŽ€ 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. Slay. πŸ“š

πŸ’œ 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. That is the cleanup era, bestie. 🧹✨


Footer vibes: Ericsson AB, common_test 1.24.0.1, and the page tag ct_cover(3erl) β€” no separate date shown on this footer, bestie. Bye bestie, go get that coverage! πŸ’…πŸ’–

πŸ“¦ where this page comes from