allure-java icon indicating copy to clipboard operation
allure-java copied to clipboard

Add @Attachment byte[] interface

Open theangrydev opened this issue 4 years ago • 0 comments

I'm submitting a ...

  • [x] feature request

What is the current behavior?

Currently @Attachment can only be used with byte[] and String return types.

What is the expected behavior?

I propose adding an interface AttachmentBytes as another return type understood by @Attachment annotation:

public interface AttachmentBytes {
    byte[] attachmentBytes();
}

What is the motivation / use case for changing the behavior?

I would like to use a custom return type other than byte[] and String so that I do not need to convert to a raw type every time I use @Attachment

theangrydev avatar Oct 28 '20 13:10 theangrydev