Skip to content

Commit

Permalink
adding custom labels to allure results (#45)
Browse files Browse the repository at this point in the history
* adding custom label to allure results

* typo fix
  • Loading branch information
awiodev authored Apr 29, 2022
1 parent f6f99a0 commit 01224ec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions example/example_parameters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ func TestAllureWithLabels(t *testing.T) {
allure.Feature("feature2"),
allure.Tag("tag1"),
allure.Tags("tag2", "tag3"),
allure.Label("customLabel1", "customLabel1Value"),
allure.Action(func() {}))
}

Expand Down
6 changes: 6 additions & 0 deletions options.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,9 @@ func ParentSuite(parentSuite string) Option {
r.addLabel("parentSuite", parentSuite)
}
}

func Label(labelName string, labelValue string) Option {
return func(r hasOptions) {
r.addLabel(labelName, labelValue)
}
}

0 comments on commit 01224ec

Please sign in to comment.