ru.yandex.qatools.allure.annotations.Issue Java Examples
The following examples show how to use
ru.yandex.qatools.allure.annotations.Issue.
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: Allure1TestCaseAspectsTest.java From allure-java with Apache License 2.0 | 6 votes |
@SuppressWarnings("unchecked") @Issue("206") @ParameterizedTest @MethodSource("testClassesProvider") void shouldProcessParameterAnnotation(final SimpleTest simpleTest) { final AllureResults results = runWithinTestContext( simpleTest::testSomething, Allure1TestCaseAspects::setLifecycle, Allure1ParametersAspects::setLifecycle ); assertThat(results.getTestResults()) .flatExtracting(TestResult::getParameters) .extracting(io.qameta.allure.model.Parameter::getName, io.qameta.allure.model.Parameter::getValue) .containsExactlyInAnyOrder( tuple("parameterWithoutName", "testValue1"), tuple("customParameterName", "testValue2") ); }
Example #2
Source File: AllureReporter.java From allure-cucumberjvm with Apache License 2.0 | 6 votes |
private Issue[] createIssuesArray(List<String> issues) { ArrayList<Issue> values = new ArrayList<>(); for (final String issue : issues) { values.add(new Issue() { @Override public Class<Issue> annotationType() { return Issue.class; } @Override public String value() { return issue; } }); } return values.toArray(new Issue[values.size()]); }
Example #3
Source File: Allure1Annotations.java From allure-java with Apache License 2.0 | 5 votes |
public List<Link> getLinks() { final Method method = getMethod(); final List<Link> links = new ArrayList<>(); links.addAll(Allure1Utils.getLinks(method, TestCaseId.class, Allure1Utils::createLinks)); links.addAll(Allure1Utils.getLinks(method, Issue.class, Allure1Utils::createLinks)); links.addAll(Allure1Utils.getLinks(method, Issues.class, Allure1Utils::createLinks)); return links; }
Example #4
Source File: Allure1TestCaseAspectsTest.java From allure-java with Apache License 2.0 | 5 votes |
@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 #5
Source File: Allure1TestCaseAspectsTest.java From allure-java with Apache License 2.0 | 5 votes |
@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 #6
Source File: AllureReporter.java From allure-cucumberjvm with Apache License 2.0 | 5 votes |
private Issues getIssuesAnnotation(List<String> issues) { final Issue[] values = createIssuesArray(issues); return new Issues() { @Override public Issue[] value() { return values; } @Override public Class<Issues> annotationType() { return Issues.class; } }; }
Example #7
Source File: AnnotationManager.java From allure1 with Apache License 2.0 | 5 votes |
/** * Find {@link ru.yandex.qatools.allure.annotations.Issues} annotation and return respective key * * @return issue keys or empty array if annotation isn't present */ public String[] getIssueKeys() { Issues issues = getAnnotation(Issues.class); if (issues == null) { return new String[0]; } List<String> keys = new ArrayList<>(); for (Issue issue : issues.value()) { keys.add(issue.value()); } return keys.toArray(new String[keys.size()]); }
Example #8
Source File: Allure1Utils.java From allure-java with Apache License 2.0 | 4 votes |
public static List<Link> createLinks(final Issue issue) { return Collections.singletonList(createLink(issue)); }
Example #9
Source File: Allure1Utils.java From allure-java with Apache License 2.0 | 4 votes |
private static Link createLink(final Issue issue) { return ResultsUtils.createIssueLink(issue.value()); }
Example #10
Source File: AnnotationManager.java From allure1 with Apache License 2.0 | 2 votes |
/** * @return true if {@link ru.yandex.qatools.allure.annotations.Issue} * annotation present in {@link #annotations} and false otherwise */ public boolean isIssueAnnotationPresent() { return isAnnotationPresent(Issue.class); }
Example #11
Source File: AnnotationManager.java From allure1 with Apache License 2.0 | 2 votes |
/** * Find first {@link ru.yandex.qatools.allure.annotations.Issue} annotation * * @return issue key or null if annotation is not present */ public String getIssueKey() { Issue issue = getAnnotation(Issue.class); return issue == null ? null : issue.value(); }