JUnit Reports — Test Method Descriptions

后端 未结 4 876
盖世英雄少女心
盖世英雄少女心 2021-02-05 04:03

I am trying to see if there is a way to include \"descriptive text\" in my junit reports by way of javadocs. JUnit 4 doesnt seem to support the \'description\' attribute for the

4条回答
  •  余生分开走
    2021-02-05 04:58

    There's also rather recent solution called Allure. That's a Java-based test execution report mainly based on adding supplementary annotations to the code. Existing annotations include:

    • custom description: @Description("A cool test")
    • grouping by features or stories: @Features({"feature1", "feature2"}), @Stories({"story1", "story2" })
    • marking methods executed inside test case as steps: @Step (works even for private methods)
    • attachments: @Attachment(name = "Page screenshot", type = "image/png")

    See their wiki and example project for more details.

提交回复
热议问题