allure-framework / allure-framework/allure-csharp
xUnit.net: Move ITestOutputHelper messages from status details to attachments
- Dominant language
- C#
- Stars
- 125
- Forks
- 76
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 18
Description
#### I'm submitting a ...
- [ ] bug report
- [x] 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:
```csharp
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
Contributor guide
Research direction
Start by tracing how Allure.XUnit handles ITestOutputHelper messages for the two-test example in the issue. Verify the current status-details behavior, then confirm that output from passing and failing tests is represented as an attachment and is absent from status details.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100