[erlang-questions] Getting count of suites/cases from common test hook

Max Lapshin max.lapshin@REDACTED
Fri May 12 20:14:54 CEST 2017


It requires calling functions in each module.

As far as I remember,  ct_hook don't tell it before.


It is easy to add handler:

ct_run ... -event_handler flussonic_ct_handler

in the handler you get:




-module(flussonic_ct_handler).

-record(event, {name, node, data}).

% http://erlang.org/doc/apps/common_test/event_handler_chapter.html

-compile(export_all).




init(_Args) ->
  % io:fwrite(standard_error, "ARGS: ~p\n\n", [Args]),
  {ok, #state{started_at = now_ms()}}.

handle_event(#event{name=start_make}, #state{first_make_at = undefined}
=State) ->
  {ok, State#state{first_make_at = now_ms()}};

.....


But I don't remember there a total count of tests _before_ launching.
However, the progress bar is a cool idea.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170512/5b081b26/attachment.htm>


More information about the erlang-questions mailing list