test_server question - coverage data from remote node?

Reto Kramer <>
Mon Sep 13 17:40:37 CEST 2004

This issue turned out to be a misunderstanding on my part of the  
lifecycle of a node started in a testcase. I used a "conf" case (I  
started the node in the "start" of {conf, start, [func], stop}.  
Coverage was only going to be provided by running func, which never  
happened since the node was killed at the exit of start. I had  
erroneously assumed that in a conf case the node would only be killed  
at the end of stop, but it will be at the end of start.

Of course this is all in the docs, one way or another :-)   
start_node/3, {cleanup, false} Option does the trick, including  
handling distributed coverage data acquisition.

Perhaps in the future the examples section of the docs could be  
extended with a "trivial" test example that involves multiple nodes.

- Reto

On Sep 10, 2004, at 11:06 PM, Reto Kramer wrote:

> I'm a happy new user of the OTP test_server! Thanks for making this  
> available.  Getting detailed coverage information works for simple  
> test cases that run on the node that runs the test_server.
> I've now moved on to start multiple nodes that run my distributed  
> application and left the test_server node to run the client side of my  
> tests, querying the started remote nodes (started with  
> test_server:start_node/3).  The remote nodes start fine and the client  
> node sees the expected test results.
> However, my coverage report is now empty, whereas previously it worked  
> fantastically and was a breeze to setup.
> I realize that there's support for distributed coverage data gathering  
> in OTP itself.
> Can anyone help me understand how to gather coverage data on the  
> remote nodes in the context of the OTP *test_server*?  Is there any  
> additional documentation I can consult?
> What are the magic incantations to capture and ship the coverage data  
> from the started remote nodes (started with test_server/start_node/3)  
> to the test_server node and how do I merge that data with the  
> test_server node coverage data for the test server result report?
> Thanks,
> - Reto
> I start my test suite with:
>   $ erl -pa ../ebin -s ts run all_tests verbose cover_details -s  
> erlang halt
> and in my test suite erlang file, I spawn the remote nodes with:
>     ?line {ok, } = ?t:start_node(test_a, slave,
> 		  [{args,
> 		    "-pa /Users/reto/sdev/discover/src/discover-1.0/ebin"}]),
> Copying the cmd line part that I cut and paste from the startserver  
> (using the verbose option) into the {args, ...} tuple does not help  
> either ( -boot start_sasl -sasl errlog_type error -s test_server_ctrl  
> run_test SPEC current.spec NAME discover COVER discover  
> /Users/reto/sdev/discover/src/discover-1.0/test/discover_test/ 
> discover.cover details).
> All my nodes run on the same filesystem at the moment to simplify  
> things.
> #

More information about the erlang-questions mailing list