Define filename of attachment -


i'm attaching screenshots this:

@attachment(value = "screenshot", type = "image/png") public byte[] makescreenshot(bufferedimage image) {     ...     return imageinbyte; } 

the filename beeing generated automatically , looks 4282ae45-5ca1-4621-91c7-ce8a3a2bd58c-attachment.png. there way change filename? i'd refer screenshots in second test , need have specific name "http_www_homepage_html.png".

looking @ method

    public static string generateattachmentname() {        return uuid.randomuuid().tostring() + config.getattachmentfilesuffix();     } 

in ru.yandex.qatools.allure.utils.allureresultsutils, fixed mechanism can't altered without major code changes, guess.

i'm using testsuitereader reader = new testsuitereader(new file(test_folder)); read results of previous test runs path attachments. solved issue.


Comments

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -