allure-csharp
allure-csharp copied to clipboard
Console logs from OneTimeSetup methods are not displayed in the report
I'm submitting a ...
- [x] 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?
Logs from OneTimeSetup methods are not displayed in the report Logs from SetUp methods are displayed in the test body not setup section
If the current behavior is a bug, please provide the steps to reproduce and, if possible, a minimal demo of the problem
[AllureNUnit]
[TestFixture]
public class Test1
{
[OneTimeSetUp]
[AllureBefore]
public void SetupClass()
{
Console.WriteLine("One Time Setup");
Step1();
}
[SetUp]
[AllureBefore]
public void SetupTest()
{
Console.WriteLine("Test Setup");
}
[Test]
public void Test()
{
Console.WriteLine("Test log");
Step1();
}
[AllureStep]
public void Step1()
{
Console.WriteLine("Step Log");
}
}
What is the expected behavior?
Logs from OneTimeSetup should be displayed Logs from Setup should be displayed in the setup sections
What is the motivation / use case for changing the behavior?
There are tools (ex RestAssured) that log valuable information(headers, response content) in case of failures/exceptions or we use to log errors in Setup methods. This information is lost in the case of OneTimeSetup
Please tell us about your environment:
- OS Linux/Windows/Mac OS
- .NET framework .NET 8
- Allure version: 2.27.0
- Test framework: [email protected]
- Allure adapter: [email protected]