Generate Warning

Check report/import-and-dependencies Import And Dependencies for prerequisites. Use warning core method to mark something that needs to be looked at eventually. Groovy warning("warning message") warning("warning message with map", [k1: "v1", k2: "v2"]) warning("another warning message", "k3", "v3", "k4", "v4") Java warning("warning message"); warning("warning message with map", map("k1", "v1", "k2", "v2")); warning("another warning message", "k3", "v3", "k4", "v4"); Let's take a look at the full test file example to see how warnings gets displayed Groovy import static org.testingisdocumenting.webtau.WebTauGroovyDsl.* scenario('warning label') { // warning-label warning("warning message") // warning-label } scenario('warning key values') { // warning-map warning("warning message with map", [k1: "v1", k2: "v2"]) // warning-map // warning-vararg warning("another warning message", "k3", "v3", "k4", "v4") // warning-vararg } scenario warning label (warning.groovy) [warning] warning message [.] warning label (warning.groovy) scenario warning key values (warning.groovy) [warning] warning message with map k1: "v1" k2: "v2" [warning] another warning message k3: "v3" k4: "v4" Java import org.junit.jupiter.api.Test; import org.testingisdocumenting.webtau.junit5.WebTau; import static org.testingisdocumenting.webtau.WebTauDsl.*; @WebTau public class WarningJavaTest { @Test public void warningLabel() { // warning-label warning("warning message"); // warning-label } @Test public void warningKeyValues() { // warning-map warning("warning message with map", map("k1", "v1", "k2", "v2")); // warning-map // warning-vararg warning("another warning message", "k3", "v3", "k4", "v4"); // warning-vararg } } scenario warningLabel (WarningJavaTest) [warning] warning message [.] warningLabel (WarningJavaTest) scenario warningKeyValues (WarningJavaTest) [warning] warning message with map k1: "v1" k2: "v2" [warning] another warning message k3: "v3" k4: "v4"

Web Report

Web Report displays warnings in Steps tab for a specific test, but also displays them at the summary page Groovy Java Summary of warnings will be displayed at the end of the run in the console and present on the generated HTML report summary view. Groovy There are 3 warning(s) in tests * warning message (warning.groovy -> warning label) * warning message with map (warning.groovy -> warning key values) k1: "v1" k2: "v2" * another warning message (warning.groovy -> warning key values) k3: "v3" k4: "v4" Total time: 1ms Total: 2, Passed: 2, Skipped: 0, Failed: 0, Errored: 0 report is generated: /home/runner/work/webtau/webtau/webtau-feature-testing/webtau-reports/scenarios/concept/warning-webtau-report.html Java There are 3 warning(s) in tests * warning message (WarningJavaTest -> warningLabel) * warning message with map (WarningJavaTest -> warningKeyValues) k1: "v1" k2: "v2" * another warning message (WarningJavaTest -> warningKeyValues) k3: "v3" k4: "v4" Total time: 2ms Total: 3, Passed: 3, Skipped: 0, Failed: 0, Errored: 0 report is generated: /home/runner/work/webtau/webtau/webtau-junit5-examples/webtau-reports/com.example.tests.junit5.WarningJavaTest.html