hexpm/ltest0.14.0ldoc

ltest

Discover and run unit, system, and integration EUnit tests.

--loaded-ltest-macros--/0function

--loaded-ltest-macros--/0

Return ok. This dummy function marks the end of the include so the REPL prints its name as the last function loaded.

--loaded-ltest-records--/0function

--loaded-ltest-records--/0

Return ok. This dummy function marks the end of the include so the REPL prints its name as the last function loaded.

adapt-run-result/1function

adapt-run-result/1

Map EUnit error to {error, tests_failed}; preserve ok and other error tuples.

all/0function

all/0

Run unit, system, then integration in order, even when an earlier group fails, and return the first non-ok result.

all/1function

all/1

Merge OPTS over defaults, force each group type, and run unit, system, then integration in order. Return the first non-ok result after all run.

check-failed-assert/2function

check-failed-assert/2

Unwrap an assertion failure and assert that its embedded failure tag matches expected.

check-skip-funcs/1function

check-skip-funcs/1

Map exported name/arity pairs to themselves when they are nullary _skip functions; map other entries to false.

check-skipped-tests/1function

check-skipped-tests/1

Map exported nullary _skip functions to their name without that suffix; return the name as a character list and map other entries to false.

check-wrong-assert-exception/2function

check-wrong-assert-exception/2

Unwrap an unexpected assertion exception and assert that its failure tag matches expected.

default-opts/0function

default-opts/0

Return defaults: color and suite headers enabled, listener ltest-listener, test type unit, and verbose output enabled.

eunit-opts/1function

eunit-opts/1

Build EUnit options from the required test-listener, verbose, color, and test-type keys. eunit_surefire selects tty output; other listeners use no_tty.

first-non-ok/1function

first-non-ok/1

Return the first non-ok result, or ok when every group succeeded.

get-integration-beams/0function

get-integration-beams/0

Find integration-test BEAM basenames beneath the current project directory.

get-integration-beams/1function

get-integration-beams/1

Return BEAM path roots under PATH whose files declare ltest-integration. PATH must contain the supported BEAM search directories.

get-possible-test-beams/1function

get-possible-test-beams/1

Return discovered BEAM path roots without .beam, suitable for code:load_abs/1.

get-skip-funcs/1function

get-skip-funcs/1

Return nullary _skip exports from a module whose BEAM resolves on the code path, filtering other exports.

get-skipped-tests/1function

get-skipped-tests/1

Return character-list names of nullary _skip exports from a module whose BEAM resolves on the code path, filtering other exports.

get-subdir-beam-files/1function

get-subdir-beam-files/1

Return BEAM paths found under PATH in .eunit/ and _build/*/lib/*/ebin/. Results follow the wildcard order for each directory pattern.

get-system-beams/0function

get-system-beams/0

Find system-test BEAM basenames beneath the current project directory.

get-system-beams/1function

get-system-beams/1

Return BEAM path roots under PATH whose files declare ltest-system. PATH must contain the supported BEAM search directories.

get-unit-beams/0function

get-unit-beams/0

Find unit-test BEAM basenames beneath the current project directory.

get-unit-beams/1function

get-unit-beams/1

Return BEAM path roots under PATH whose files declare ltest-unit. PATH must contain the supported BEAM search directories.

has-behaviour?/2function

has-behaviour?/2

Return whether a readable BEAM file lists TYPE in its behavior attributes.

integration/0function

integration/0

Run the integration group with complete default options and return EUnit's canonical result.

integration/1function

integration/1

Merge OPTS over defaults, force test-type to integration, and return the canonical EUnit result.

integration?/1function

integration?/1

Return whether a BEAM file declares ltest-integration.

ltest-opts/1function

ltest-opts/1

Return listener option tuples for the required color and test-type keys; this helper does not merge defaults.

maybe-suite-footer/2function

maybe-suite-footer/2

Write the outer suite footer when OPTS has Boolean true for suite-headers.

maybe-suite-header/2function

maybe-suite-header/2

Write the outer suite heading when OPTS has Boolean true for suite-headers.

merge-run-opts/2function

merge-run-opts/2

Merge the defaults with OPTS, then replace test-type with TEST-TYPE.

run/0function

run/0

Run the default unit group, then map EUnit error to {error, tests_failed} and preserve other results.

run/1function

run/1

Merge OPTS over the defaults, dispatch the selected group, and map EUnit error to {error, tests_failed}. Preserve other results; unknown types return an explanatory {error, Message}.

run-beams/3function

run-beams/3

Find beams for TEST-TYPE beneath the current working directory and pass the files and translated options to EUnit.

run-group/4function

run-group/4

Run TEST-TYPE with merged defaults, always write its group heading, and write the outer suite headings when enabled; return EUnit's result.

skip-test-group-patt/0function

skip-test-group-patt/0

Return the legacy pattern (.*)(_skip) for grouping a skip name.

skip-test-patt/0function

skip-test-patt/0

Return the legacy pattern .*_skip; skip detection uses skipped?/1.

system/0function

system/0

Run the system group with complete default options and return EUnit's canonical result.

system/1function

system/1

Merge OPTS over defaults, force test-type to system, and return the canonical EUnit result.

system?/1function

system?/1

Return whether a BEAM file declares ltest-system.

unit/0function

unit/0

Run the unit group with complete default options and return EUnit's canonical result.

unit/1function

unit/1

Merge OPTS over defaults, force test-type to unit, and return the canonical EUnit result.

unit?/1function

unit?/1

Return whether a BEAM file declares ltest-unit.