Skip to content
This repository has been archived by the owner on Jan 14, 2019. It is now read-only.

Attach Issue, Issues, Severity, TestCaseId in runing test #764

Closed
jalona opened this issue Mar 24, 2016 · 2 comments
Closed

Attach Issue, Issues, Severity, TestCaseId in runing test #764

jalona opened this issue Mar 24, 2016 · 2 comments
Assignees

Comments

@jalona
Copy link

jalona commented Mar 24, 2016

Было бы замечательно привязывать Issue, Issues, Severity, TestCaseId во время работы теста, так же как сделано со скриншотами.

Например:

@Issue(value="{0}")
private static Issue createIssue(String value) {
        // return issue 
}

@Override
public void testFailure(Failure failure) {
    super.testFailure(failure);
    createIssue("http://jira.****.ru/browse/TEST-45689");
}
@baev
Copy link
Member

baev commented Mar 24, 2016

@jalona you can use the following code:

public static void createIssue(final String issue) {
    Allure.LIFECYCLE.fire(new TestCaseEvent() {

        @Override
        public void process(TestCaseResult context) {
            context.getLabels().add(AllureModelUtils.createIssueLabel(issue));
        }
    });
}

The same for severity (createSeverityLabel) and test id (createTestLabel).

@baev baev added the question label Mar 24, 2016
@baev baev self-assigned this Mar 24, 2016
@jalona
Copy link
Author

jalona commented Mar 24, 2016

@baev great.
Working your solution 👍 Thanks

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants