- Use `EUnit` for unit tests — suffix test functions with `_test()` or `_test_()` for test generators, place them at the bottom of the module.
- Use `Common Test` for integration and system tests that need setup/teardown across multiple processes or network connections.
- Use `PropEr` with `?FORALL(X, Type, Property)` macros for property-based testing of data transformation and protocol invariants.
- Use `?assertEqual(Expected, Actual)`, `?assertMatch(Pattern, Expr)`, and `?assertException(Class, Reason, Expr)` macros from EUnit for assertions.
- Use Common Test `init_per_suite/1` and `end_per_suite/1` for one-time resource setup and `init_per_testcase/2` for per-test isolation.
- Use `meck` to mock and verify calls to modules that have side effects (network, file system, time) in unit tests.
- Run `rebar3 eunit` and `rebar3 ct` separately in CI — EUnit for fast unit feedback and Common Test for slower integration suites.