Skip to content
This repository has been archived by the owner on May 2, 2023. It is now read-only.

Available Tests

Gonçalo Tomás edited this page Oct 16, 2018 · 1 revision

Unit Tests

There are several unit tests scattered throughout the code base. You can check if these tests pass using rebar3 eunit.

Cross Reference Checks

Erlang by default does not check at compile time if the functions you are calling are defined. There is a tool called xref that does this analysis and it is available through rebar3. To run this check you can run rebar3 xref.

Type Checker

Erlang has an optional type checker called dialyzer. FMKe uses type definitions throughout the code, so you can run rebar3 dialyzer to run a static type analysis.

Test Suites

FMKe has several test suites, which are implemented using Erlang's Common Test framework. You can run rebar3 ct to run all suites, but since some of them are configurable, you can run a single suite by following this example:

rebar3 ct --suite test/fmke_db_conn_manager_SUITE.erl

Check the testing drivers page for a detailed explanation into how the configurable test suites work and how to use them.

Code Coverage

You can use make coverage to run all test suites, including repeating suites under different configurations. This will then measure code coverage, printing out verbose statistics per module.