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

Error is not included in the allure report if it is in the BeforeAll hook. #6

Closed
AleksandrGurkin opened this issue May 26, 2022 · 5 comments · Fixed by #10
Closed
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@AleksandrGurkin
Copy link

AleksandrGurkin commented May 26, 2022

Describe the bug
If during the initialization of the suite you add a step with a check that will fall, the entire suite in the allure report is simply ignored. The information in the console is displayed correctly

To Reproduce

import (
	"testing"

	"github.com/ozontech/allure-go/pkg/framework/provider"
	"github.com/ozontech/allure-go/pkg/framework/suite"
)

type BeforeAfterDemoSuite struct {
	suite.Suite
}

func (s *BeforeAfterDemoSuite) BeforeAll(t provider.T) {
	t.WithNewStep("Before suite Step", func(sCtx provider.StepCtx) {
		sCtx.Require().Equal(1, 2, "lol")
	})
}

func (s *BeforeAfterDemoSuite) TestBeforeAfterTest(t provider.T) {
	t.Epic("Demo")
	t.Feature("BeforeAfter")
	t.Title("Test wrapped with SetUp & TearDown")
	t.Description(`
		This test wrapped with SetUp and TearDown containert.`)

	t.Tags("BeforeAfter")
}

func TestBeforesAfters(t *testing.T) {
	t.Parallel()
	suite.RunSuite(t, new(BeforeAfterDemoSuite))
}

Expected behavior
Display the suite in the report, with an error in the setup and a skipped body of tests.

@koodeex
Copy link
Collaborator

koodeex commented May 26, 2022

Hello!

We already working on that issue.
It will be fixed in the closest release.

@koodeex koodeex self-assigned this May 26, 2022
@koodeex koodeex added bug Something isn't working good first issue Good for newcomers labels May 26, 2022
@koodeex koodeex linked a pull request Jun 1, 2022 that will close this issue
@koodeex
Copy link
Collaborator

koodeex commented Jun 3, 2022

@AleksandrGurkin , FYI

issue can be tested at v0.6.6 tag (beta)

It will be a great pleasure to get your feed back

Also, I will be really happy if you could review PR

@koodeex
Copy link
Collaborator

koodeex commented Jun 6, 2022

@AleksandrGurkin , FYI

New beta tag v0.6.7 released

@koodeex
Copy link
Collaborator

koodeex commented Jun 8, 2022

@AleksandrGurkin , FYI

New beta tag v0.6.9 released

@koodeex
Copy link
Collaborator

koodeex commented Jul 6, 2022

@AleksandrGurkin , FYI release v0.6.11 add this feature. You are welcome to try :)

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

Successfully merging a pull request may close this issue.

2 participants