Search in sources :

Example 1 with WriteEvent

use of io.cucumber.plugin.event.WriteEvent in project cucumber-jvm by cucumber.

the class TestCaseState method log.

@Override
public void log(String text) {
    requireActiveTestStep();
    bus.send(new WriteEvent(bus.getInstant(), testCase, text));
    Attachment attachment = createAttachment();
    attachment.setBody(text);
    attachment.setContentEncoding(ContentEncoding.IDENTITY);
    attachment.setMediaType("text/x.cucumber.log+plain");
    bus.send(createEnvelope(attachment));
}
Also used : WriteEvent(io.cucumber.plugin.event.WriteEvent) Attachment(io.cucumber.messages.types.Attachment)

Aggregations

Attachment (io.cucumber.messages.types.Attachment)1 WriteEvent (io.cucumber.plugin.event.WriteEvent)1