Class SHAFT.Report
java.lang.Object
com.shaft.driver.SHAFT.Report
- Enclosing class:
SHAFT
Utility class for emitting log messages and attaching artifacts to
the Allure execution report.
Usage example:
SHAFT.Report.report("Step completed successfully");
SHAFT.Report.attach("text/plain", "response.json", responseBody);
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidattach(String attachmentType, String attachmentName, InputStream attachmentContent) Attaches a binary artifact (e.g., an image) to the Allure report.static voidAttaches a string artifact to the Allure report.static voidLogs a message discretely (visible in the execution log file but not as a report step).static voidLogs a message as a visible step in the Allure execution report.
-
Method Details
-
log
Logs a message discretely (visible in the execution log file but not as a report step).- Parameters:
message- the message to log
-
report
Logs a message as a visible step in the Allure execution report.- Parameters:
message- the message to report
-
attach
Attaches a string artifact to the Allure report.- Parameters:
attachmentType- the MIME type of the attachment (e.g.,"text/plain")attachmentName- a human-readable name for the attachmentattachmentContent- the content to attach
-
attach
public static void attach(String attachmentType, String attachmentName, InputStream attachmentContent) Attaches a binary artifact (e.g., an image) to the Allure report.- Parameters:
attachmentType- the MIME type of the attachment (e.g.,"image/png")attachmentName- a human-readable name for the attachmentattachmentContent- anInputStreamproviding the binary content
-