So I read through the common test userguide again and also I noticed that scalaris uses common_test for its test suites. Equipped with some realistic testing and more insight to common_test I just threw myself into using ct for running my unit-tests.
The most essential part is that you have to install common_test. It is not difficult or anything. See my short summary:
cp -acommon_test and test_server from your erlang source dir.
Common test will be storing reports and test-run logs in this directory.
The simple suite i wrote was this (common_test looks for *_SUITE to find tests):
-module(iserve_master_SUITE). -compile(export_all). all() -> [unittest]. unittest(_Config) -> eunit:test(iserve_master_test), ok.
Then I ran
$SOMEWHERE/priv/bin/run_test -dir ~/src/gits/iserve/test (it is the dir where my iserve_master_SUITE.erl reside). A quick execution later and I could find a @$SOMEWHERE/index.html$ file where i could easily browse the generated report. Running the test suite several times and common_test accumulates historical test results.
It is a bit annoying that I had to do all these things to start, but in retrospect it did not hurt that much. The important thing is that it did work.
I’m not quite there with coverage reports yet, nor happy-happy-fun-fun single-command-run-all-tests setup. I feel much more likely that I will get there though.