1

I'm using common_test and just want to log values to stdout or stderr.

How????

I've tried:

  • ct:comment
  • ct:log
  • io:format

The state of the art seems to be manually combing through html files. But I'm on a server and I don't care about anything except my log line, I only want stdout. And I never want to look at an HTML file when writing tests, so advice on how to avoid that generally would be really helpful.

Max Heiber
  • 14,346
  • 12
  • 59
  • 97

1 Answers1

4

You should use ct:print or ct:pal (print and log), I'd recommend using the later, though.

(You can always use erlang:display, which is a low-level access to stdout)

Keep in mind that if you use Rebar3 with the default configuration and ct values. ct:print is only shown with --verbose, whereas, ct:pal is only shown if the test fails.

José M
  • 3,294
  • 1
  • 14
  • 16