Removes attachments that match a regexp from successful tests
- Put
AllureAttachmentsRemover.java
to the project sources - Put a file named
io.qameta.allure.listener.TestLifecycleListener
toresources/META-INF/services/
(this file should contain the qualified name ofAllureAttachmentsRemover.java
(name with package)) - Add
allure.report.remove.attachments
toallure.properties
file (the property value should contain a regexp for attachment names)
I think that method
getSubsteps(StepResult step)
should concat stream of current step and sub-steps.Also, attachment names probably wont match by any regexp, because file extension stored in
attachment.getType()
and usuallyattachment.getName()
will return just a String "Screenshot on fail", "Screen opened page" etc.