[erlang-questions] CT take a long time to warm up

Tim Watson watson.timothy@REDACTED
Mon Sep 24 10:38:45 CEST 2012


I find common test very slow to start as well, so I'd be interested to find out why. Have you tried running this via ct:run_test/1 with profiling turned on?

On 24 Sep 2012, at 02:01, Roberto Ostinelli <roberto@REDACTED> wrote:

> Hi all,
> 
> a very simple CT test takes forever to boot.
> 
> 
> %%%%%% Module %%%%%%%%%
> 
> -module(mymodule).
> -export([greetings/1]).
> 
> greetings(Text) ->
> 	lists:flatten(io_lib:format("~s world!", [Text])).
> 
> %%%%%%%%%%%%%%%%%%%%%%%
> 
> 
> %%%%%% CT test %%%%%%%%
> 
> -module(mymodule_SUITE).
> -include_lib("common_test/include/ct.hrl").
> -export([all/0]).
> -export([greetings_test/1]).
> 
> all() ->
> 	[greetings_test].
> 
> greetings_test(_Config) ->
> 	"hello world!" = mymodule:greetings("hello"),
> 	"goodbye world!" = mymodule:greetings("goodbye").
> 
> %%%%%%%%%%%%%%%%%%%%%%%
> 
> 
> Here's the log:
> 
> ==================
> === Suite started at 2012-09-23 17:22:24
> === Starting test, 1 test cases
> =cases         1
> =user          roberto
> =host          robertos-MacBook-Pro.local
> =hosts         robertos-MacBook-Pro.local 
> =emulator_vsn  5.9.1
> =emulator      beam
> =otp_release   R15B01
> =started       2012-09-23 17:22:24
> =case          ct_framework:init_per_suite
> =logfile       ct_framework.init_per_suite.html
> =group_props   [{suite,mymodule_SUITE}]
> =started       2012-09-23 17:22:44
> =ended         2012-09-23 17:22:44
> =result        ok
> =elapsed       1.0e-6
> =case          mymodule_SUITE:greetings_test
> =logfile       mymodule_suite.greetings_test.html
> =started       2012-09-23 17:22:44
> =ended         2012-09-23 17:22:44
> =result        ok
> =elapsed       3.1e-4
> =case          ct_framework:end_per_suite
> =logfile       ct_framework.end_per_suite.html
> =group_props   [{suite,mymodule_SUITE}]
> =started       2012-09-23 17:22:44
> =ended         2012-09-23 17:22:44
> =result        ok
> =elapsed       1.0e-6
> =group_time    0.054s
> === TEST COMPLETE, 1 ok, 0 failed of 1 test cases
> 
> =finished      2012-09-23 17:22:44
> =failed        0
> =successful    1
> =user_skipped  0
> =auto_skipped  0
> ==================
> 
> it literally takes 20 seconds before the first (and only) test is run. Any ideas why?
> 
> Thank you,
> 
> r.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20120924/3154626d/attachment.htm>


More information about the erlang-questions mailing list