Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console logs from OneTimeSetup methods are not displayed in the report #519

Open
2 of 3 tasks
vladdex opened this issue Jun 5, 2024 · 0 comments
Open
2 of 3 tasks
Labels
task:improvement Change that improves some user experience but can't be considered a new feature theme:nunit

Comments

@vladdex
Copy link

vladdex commented Jun 5, 2024

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?

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:

Other information

image
@delatrie delatrie added task:improvement Change that improves some user experience but can't be considered a new feature theme:nunit labels Jun 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task:improvement Change that improves some user experience but can't be considered a new feature theme:nunit
Projects
None yet
Development

No branches or pull requests

2 participants