ru.yandex.qatools.allure.annotations.Severity Java Examples

The following examples show how to use ru.yandex.qatools.allure.annotations.Severity. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: Allure1Annotations.java    From allure-java with Apache License 2.0 5 votes vote down vote up
private List<Label> getLabels() {
    final Method method = getMethod();
    final List<Label> labels = new ArrayList<>();
    labels.addAll(Allure1Utils.getLabels(method, Severity.class, Allure1Utils::createLabels));
    labels.addAll(Allure1Utils.getLabels(method, Stories.class, Allure1Utils::createLabels));
    labels.addAll(Allure1Utils.getLabels(method, Features.class, Allure1Utils::createLabels));
    return labels;
}
 
Example #2
Source File: Allure1TestCaseAspectsTest.java    From allure-java with Apache License 2.0 5 votes vote down vote up
@Title("testcase")
@Description("testcase description")
@Issue("ISSUE-2")
@Issues(@Issue("ISSUE-22"))
@TestCaseId("TEST-1")
@Stories("story2")
@Features("feature2")
@Severity(SeverityLevel.CRITICAL)
@org.testng.annotations.Test
public void testSomething() {
    parameterWithoutName = "testValue1";
    parameterWithName = "testValue2";
}
 
Example #3
Source File: Allure1TestCaseAspectsTest.java    From allure-java with Apache License 2.0 5 votes vote down vote up
@Title("testcase")
@Description("testcase description")
@Issue("ISSUE-2")
@Issues(@Issue("ISSUE-22"))
@TestCaseId("TEST-1")
@Stories("story2")
@Features("feature2")
@Severity(SeverityLevel.CRITICAL)
@org.junit.Test
public void testSomething() {
    parameterWithoutName = "testValue1";
    parameterWithName = "testValue2";
}
 
Example #4
Source File: AllureReporter.java    From allure-cucumberjvm with Apache License 2.0 5 votes vote down vote up
private Severity getSeverityAnnotation(final SeverityLevel value) {
    return new Severity() {

        @Override
        public SeverityLevel value() {
            return value;
        }

        @Override
        public Class<Severity> annotationType() {
            return Severity.class;
        }
    };
}
 
Example #5
Source File: Allure1Utils.java    From allure-java with Apache License 2.0 4 votes vote down vote up
public static List<Label> createLabels(final Severity severity) {
    return Collections.singletonList(new Label().setName(SEVERITY_LABEL).setValue(severity.value().value()));
}
 
Example #6
Source File: AnnotationManager.java    From allure1 with Apache License 2.0 2 votes vote down vote up
/**
 * @return true if {@link ru.yandex.qatools.allure.annotations.Severity}
 * annotation present in {@link #annotations} and false otherwise
 */
public boolean isSeverityAnnotationPresent() {
    return isAnnotationPresent(Severity.class);
}
 
Example #7
Source File: AnnotationManager.java    From allure1 with Apache License 2.0 2 votes vote down vote up
/**
 * Find first {@link ru.yandex.qatools.allure.annotations.Severity} annotation
 *
 * @return {@link ru.yandex.qatools.allure.model.SeverityLevel} or null if
 * annotation doesn't present
 */
public SeverityLevel getSeverity() {
    Severity severity = getAnnotation(Severity.class);
    return severity == null ? null : severity.value();
}