xUnit.net: Move ITestOutputHelper messages from status details to attachments
delatrie opened this issue · 0 comments
delatrie commented
I'm submitting a ...
- bug report
- feature request
- support request => Please do not submit support request here, see note at the top of this template.
What is the current behavior?
Messages logged via ITestOutputHelper are shown as status details in the report. Additionally, messages of failed or broken tests aren't included at all.
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
If we run the following code:
using Xunit;
using Xunit.Abstractions;
public class TestOutput
{
readonly ITestOutputHelper logger;
public TestOutput(ITestOutputHelper logger)
{
this.logger = logger;
}
[Fact]
public void TrueFactWithOutputMessage()
{
this.logger.WriteLine("This message is shown in the status details area.");
}
[Fact]
public void FalseFactWithOutputMessage()
{
this.logger.WriteLine("This message isn't shown.");
Assert.Fail("Failure message");
}
}
The following report is generated:
What is the expected behavior?
Log messages are collected and included in the report as the test's attachment.
What is the motivation / use case for changing the behavior?
This is what users who worked previously with other integrations expect from allure-xunit to begin with.
Using the status details area is also less convenient because there is no way to hide it (only trace could be hidden, but not the message). This becomes an issue as soon as the number of log messages increases.
Please tell us about your environment:
- Allure version: 2.23.1
- Test framework: xUnit.net@2.5.3
- Allure adaptor: Allure.XUnit@2.10.0