Specifying Test Metadata

To attach custom metadata to a test use metadata from WebTauGroovyDsl package scenarios.concept import static org.testingisdocumenting.webtau.WebTauGroovyDsl.* metadata([owner: "team A"]) // setting owner for all the scenarios below scenario("one") { } scenario("two") { } scenario("three") { metadata([owner: "team B"]) // owner is overridden for scenario "three" } scenario("four") { } metadata can be called multiple times outside of scenario . It will be applied to all the scenarios below. package scenarios.concept import static org.testingisdocumenting.webtau.WebTauGroovyDsl.* metadata([owner: "team A"]) // setting owner for scenarios "one" and "two" scenario("one") { } scenario("two") { } metadata([owner: "team B"]) // setting owner for scenarios "three" and "four" scenario("three") { } scenario("four") { } Unlike previous example, "team B" will be set for scenario "three" and "four".

Metadata Encapsulation

You can encapsulate repeated metadata into a separate file. package scenarios.concept import static org.testingisdocumenting.webtau.WebTauGroovyDsl.* Support.teamA() scenario("one") { } scenario("two") { } scenario("three") { Support.teamB() } scenario("four") { } package scenarios.concept import static org.testingisdocumenting.webtau.WebTauGroovyDsl.* class Support { static void owner(String name) { metadata([owner: name]) } static void severity(int level) { metadata([severity: level]) } static void teamA() { owner("team A") } static void teamB() { owner("team B") } static void critical() { severity(100) } static void low() { severity(1) } }

Report

Test metadata will be available in a generated report as well as in test listeners.If metadata is present, it will be displayed at the test summary page