Tips and Tricks - epam/Gepard GitHub Wiki

Using logComment in @BeforeClass and @AfterCLass methods

When you need to add Gepard comment before/after a test class execution, use the following approach:

    @BeforeClass
    public static void beforeClass() {
        TestClassExecutionData classData = TestClassExecutionThread.CLASS_DATA_IN_CONTEXT.get();
        HtmlRunReporter reporter = classData.getHtmlRunReporter();
        reporter.beforeClassLogComment("We started the BeforeClass method.");
        ...
    }

You may use the afterClassLogComment method in @AfterClass methds in the similar way.