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

Capture test log output and store as attachment

Open baev opened this issue 8 years ago • 10 comments

baev avatar Mar 01 '17 13:03 baev

Is this feature available?

Karthik-Rangasamy avatar Nov 29 '17 14:11 Karthik-Rangasamy

what's news?

rawqing avatar Jun 20 '18 07:06 rawqing

any updates on this?

dudziakm avatar Oct 17 '19 14:10 dudziakm

nope)

djuise avatar Oct 20 '20 17:10 djuise

Any updates now? I think this feature is very useful

reedchan7 avatar Jan 06 '21 03:01 reedchan7

That feature would be really beneficial, is this planned to be implemented in near future?

mszajowskiwr avatar Mar 26 '21 15:03 mszajowskiwr

I second this! Would be such a nice feature to include console logs.

alenmeister avatar Aug 03 '22 11:08 alenmeister

Still open for 6 years? Is there a way to make this working somehow?

vglushonkov avatar Mar 23 '23 12:03 vglushonkov

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.

msvticket avatar Apr 19 '23 16:04 msvticket