allure-java
allure-java copied to clipboard
Capture test log output and store as attachment
Is this feature available?
what's news?
any updates on this?
nope)
Any updates now? I think this feature is very useful
That feature would be really beneficial, is this planned to be implemented in near future?
I second this! Would be such a nice feature to include console logs.
Still open for 6 years? Is there a way to make this working somehow?
I have a solution that works pretty nicely in our setup.
The main problem is that the log frameworks don't support gathering logs for tests, at least not when the tests are executed in parallel.
So capturing the logs is something that would need different solutions for different log methods. Typically a value would need to be added to the MDC to mark the log as belonging to a test case (using the MDC class from slf4j for this should cover most cases and could be done centrally in Allure).
This can then be used by some extension to the logging solution to create an attachment to the allure test report, gather the log entries and make a file when test has finished. I could contribute this for log4j2.