When you check coverage of your gen_server behaviour module, it's annoying following 4 callback functions may not be covered. Module:handle_cast/2Module:handle_info/2Module:terminate/2Module:terminate/3You can cover these as follows. for_better_coverage_test() -> process_flag(trap_exit, true), spawn_link(fun() -> {ok, Pid} = your_module:start_link(), c:l(your_module), %% Moduel:code_change/3 cover