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

[ISSUE-44] add broken validation #61

Merged
merged 4 commits into from
Feb 12, 2024
Merged

[ISSUE-44] add broken validation #61

merged 4 commits into from
Feb 12, 2024

Conversation

siller174
Copy link
Collaborator

@siller174 siller174 commented Feb 9, 2024

New type of error:

BrokenError is an interface for set errors like Broken errors.
If the function returns an error, which implements this interface, the allure step will has a broken status

type BrokenError interface {
	IsBroken() bool
	SetBroken(bool)
	Error() string
}

New methods for errors:

// WrapOptionalError returns error with an Optional tag for Allure
func WrapOptionalError(err error) error 

// WrapBrokenError returns error with a Broken tag for Allure
func WrapBrokenError(err error) error 

// WrapRequireError returns error with flag for execute t.FailNow() and finish test after this error
func WrapRequireError(err error) error {

Add state in Result of test

Replacement for IsFailed() (deprecated)

	ResultStateSuccess
	ResultStateBroken
	ResultStateFail
func (r *testResults) GetResultState() ResultState 

@siller174 siller174 merged commit 9c6558e into master Feb 12, 2024
2 of 3 checks passed
@siller174 siller174 deleted the issues-44 branch February 14, 2024 13:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant