kalai selvan
kalai selvan

Reputation: 15

Where can i see the log written by uisng Gauge.writemessage()?

Just now i am started switching from testNg to Gauge framework for many reasons, now my question is where i can find the log which was written by using Gauge.writemessage inbuilt method. Or else is there any way to customize the location for the sam.?

Upvotes: 0

Views: 830

Answers (2)

TDub
TDub

Reputation: 23

That message will be in the Gauge report under the step it was executed in. I personally look at the html reports, but I would assume it is in the xml option as well.

If you want something instantaneous you can write to the console where real time messages are output. This also helps if some sort of bug in the code prevents the reports from being written (like an infinite loop that keeps the report from being written at the end of the full execution).

Here is what it would look like. The gray box is the GaugeMessage.

Simple Step and GaugeMessage

Upvotes: 1

Srikanth Venugopalan
Srikanth Venugopalan

Reputation: 9049

Gauge.writeMessage api allows you to push messages to the reports at logical points.

For example, the step implementation below

    @Step("Vowels in English language are <vowelString>.")
    public void setLanguageVowels(String vowelString) {
    Gauge.writeMessage("Setting vowels to " + vowelString);
        vowels = new HashSet<>();
        for (char ch : vowelString.toCharArray()) {
            vowels.add(ch);
        }
    }


yields this html report:

Gauge html report with message

Upvotes: 0

Related Questions