[erlang-questions] common_test test case documentation

Loïc Hoguin essen@REDACTED
Tue Mar 11 19:43:58 CET 2014


Is there a convenient way to document a test case?

I see a few different things in OTP and in the common_test documentation.

This seems related to test_server but I don't see anything calling or 
using it.

   testcase1(doc) -> ["docs here"];
   testcase1(Config) -> ?TEST_HERE.

This seems to do nothing and isn't documented anywhere.

   testcase2() -> [{doc, "docs here"}].

This is awkward, it only shows up in the HTML if the test succeeds.

   testcase3() -> ?TEST_HERE, {comment, "docs here"}.

Otherwise there's of course ct:print/log/pal but it feels like there 
should be an easier way. Ideally I want the same result as returning a 
comment tuple from the test case, but that works all the time.


Loïc Hoguin

More information about the erlang-questions mailing list