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

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

Closed
nugolnikova opened this issue Feb 5, 2023 · 0 comments · Fixed by #94
Closed

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

nugolnikova opened this issue Feb 5, 2023 · 0 comments · Fixed by #94
Assignees
Labels
bug Something isn't working

Comments

@nugolnikova
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants