erlangeunit

Is there a way of only running unit tests in a single module using Eunit in Erlang/OTP?


I have a number of modules with unit tests. Is there a way of only running unit tests in a single module?

This is what the relevant section of the module looks like:

-export([ ..... ])
-include_lib("eunit/include/eunit.hrl").
...
...
...
first_test() ->
  ...
  ...

second_test() ->
  ...
  ...

Solution

  • eunit:test(yourmodule) or yourmodule:test() should work.