[erlang-questions] CT Code Coverage on remote nodes?

Roger Lipscombe roger@REDACTED
Sat Apr 4 15:43:03 CEST 2015

Are there any good tutorials showing how to get Common Test to
generate coverage reports for remote nodes?

I'm using ct_run to start my tests; one of my CT hooks starts up an
external Erlang node (packaged as a release using relx) from which I'd
like to get coverage details.

>From what I've found in the CT documentation, it is possible for CT to
collect coverage information from remote nodes, so...

1. In my CTH, I call cover:start() in init/2.
2. Immediately before starting the remote node, I call
cover:compile_beam_directory on the _rel/foo/lib/foo-Vsn/ebin
directory, which returns [{ok,Mod}...].
3. Immediately after starting the remote node (using erlexec --
https://github.com/saleyn/erlexec), I call ct_cover:add_nodes([Node]).

All of this succeeds, but when CT runs the coverage analysis, it
reports zero coverage.

What am I missing?


More information about the erlang-questions mailing list