Closed SayyedaNousheen closed 3 months ago
If you want to show any custom information like screenshots, html attachment, messages, you need to attach it to the current Cucumber scenario.
For example, if you use Cucumber JVM, you can use the attach
method in two "flavors":
public void attach(byte[] data, String mediaType, String name) {
this.delegate.attach(data, mediaType, name);
}
public void attach(String data, String mediaType, String name) {
this.delegate.attach(data, mediaType, name);
}
Please keep in mind that Cluecumber relies on data that is included in the Cucumber JSON files, so there is no way to attach something to Cluecumber only. It has to come from Cucumber.
I need to add custom logs, like mention the step failed or print in the report custom element name which was not found which is understandable by all. As of now we have the error stack trace which is very technical.
Solution
Alternates tried