ozontech / allure-go

Complete Allure provider in Go which doesn't overload the interface usage
https://t.me/allure_go_chat
Apache License 2.0
306 stars 33 forks source link

Set up/Tear down sections are not displayed in tests without suite #55

Closed nugolnikova closed 3 months ago

nugolnikova commented 1 year ago

Describe the bug Set up/Tear down sections are not displayed in tests without suite

To Reproduce Steps to reproduce the behavior: 1-2. Write simple test with t.WithTestSetup()/t.WithTestTeardown()

func TestSetupTeardown1(t *testing.T) {
    runner.Run(t, "My 1 test", func(t provider.T) {
        t.WithTestSetup(func(t provider.T) {
            t.WithNewStep("My 1 Step!", func(sCtx provider.StepCtx) {
                time.Sleep(1 * time.Second)
            })
        })
        t.WithNewStep("My 2 Step!", func(sCtx provider.StepCtx) {
            time.Sleep(1 * time.Second)
        })
        t.WithTestTeardown(func(t provider.T) {
            t.WithNewStep("My 3 Step!", func(sCtx provider.StepCtx) {
                time.Sleep(1 * time.Second)
            })
        })
    })
}
  1. What has been expected: 't.WithTestSetup()/t.WithTestTeardown() sections are displayed in allure-report'
  2. What you got actual: 't.WithTestSetup()/t.WithTestTeardown() sections are not displayed in allure-report'
  3. Allure-Report screenshot (if any): image

Expected behavior t.WithTestSetup()/t.WithTestTeardown() sections are displayed in allure-report as in the tests with suites

Screenshots image