Customize Common Test Reports?
Mon Jan 11 10:00:57 CET 2021
The code that generates the result HTML is in
lib/common_test/src/test_server_ctrl.erl; the HTML is *very*
hard-coded. I found it by looking in the OTP source code for the
string "Unexpected I/O log", which appears in the CT index and seemed
As I see it, your simplest option is to write your own CT hook that
generates your own HTML report and writes it to a separate file. If I
were doing this, I'd look at mustache/handlebars libraries for Erlang,
so as to decouple the HTML from the data.
That assumes that userData is available to CT hooks -- I haven't checked.
On Mon, 11 Jan 2021 at 08:22, Vance Shipley <vances@REDACTED> wrote:
> On Mon, Jan 11, 2021 at 3:59 PM Loïc Hoguin <essen@REDACTED> wrote:
> > You probably want ct:comment/1?
> That seems to be the only mechanism available but it adds a comment to
> the existing Comment column.
> > Otherwise there's ct_run -label $LABEL.
> This provides a label for the test run which appears in the existing
> Label column of the Test Results page.
> On 11/01/2021 03:29, Vance Shipley wrote:
> > Is there a way to add a column to the common_test HTML reports?
> What I would really like is to add columns to the Test Suite Results page.
> We can annotate test cases with userData and I'd like to use that in reports.
More information about the erlang-questions