Skip to content

Commit

Permalink
Merge pull request #19 from reportportal/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
HardNorth committed Apr 22, 2022
2 parents 400a2d6 + ee12b95 commit c2ed9f9
Show file tree
Hide file tree
Showing 24 changed files with 115 additions and 13 deletions.
2 changes: 2 additions & 0 deletions agent-allure-cucumber/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Added
- `@Step` annotation templating, by @HardNorth

## [5.1.0-BETA-2]
### Added
Expand Down
5 changes: 4 additions & 1 deletion agent-allure-cucumber/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
*/

dependencies {
api 'com.epam.reportportal:agent-java-cucumber:5.1.2'
api ('com.epam.reportportal:agent-java-cucumber:5.1.2') {
exclude module: 'client-java'
}
api 'com.epam.reportportal:client-java:5.1.10'

testImplementation "io.cucumber:cucumber-java:${project.cucumber_version}"
testImplementation "io.cucumber:cucumber-testng:${project.cucumber_version}"
Expand Down
2 changes: 2 additions & 0 deletions agent-allure-cucumber2/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Added
- `@Step` annotation templating, by @HardNorth

## [5.1.0-BETA-2]
### Added
Expand Down
5 changes: 4 additions & 1 deletion agent-allure-cucumber2/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
*/

dependencies {
api 'com.epam.reportportal:agent-java-cucumber2:5.1.3'
api ('com.epam.reportportal:agent-java-cucumber2:5.1.3') {
exclude module: 'client-java'
}
api 'com.epam.reportportal:client-java:5.1.10'

testImplementation "io.cucumber:cucumber-java:${project.cucumber_version}"
testImplementation "io.cucumber:cucumber-testng:${project.cucumber_version}"
Expand Down
2 changes: 2 additions & 0 deletions agent-allure-cucumber4/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Added
- `@Step` annotation templating, by @HardNorth

## [5.1.0-BETA-2]
### Added
Expand Down
5 changes: 4 additions & 1 deletion agent-allure-cucumber4/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
*/

dependencies {
api 'com.epam.reportportal:agent-java-cucumber4:5.1.2'
api ('com.epam.reportportal:agent-java-cucumber4:5.1.2') {
exclude module: 'client-java'
}
api 'com.epam.reportportal:client-java:5.1.10'

testImplementation "io.cucumber:cucumber-java:${project.cucumber_version}"
testImplementation "io.cucumber:cucumber-testng:${project.cucumber_version}"
Expand Down
2 changes: 2 additions & 0 deletions agent-allure-cucumber5/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Added
- `@Step` annotation templating, by @HardNorth

## [5.1.0-BETA-2]
### Added
Expand Down
5 changes: 4 additions & 1 deletion agent-allure-cucumber5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
*/

dependencies {
api 'com.epam.reportportal:agent-java-cucumber5:5.1.2'
api ('com.epam.reportportal:agent-java-cucumber5:5.1.2') {
exclude module: 'client-java'
}
api 'com.epam.reportportal:client-java:5.1.10'

testImplementation "io.cucumber:cucumber-java:${project.cucumber_version}"
testImplementation "io.cucumber:cucumber-testng:${project.cucumber_version}"
Expand Down
2 changes: 2 additions & 0 deletions agent-allure-cucumber6/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Added
- `@Step` annotation templating, by @HardNorth

## [5.1.0-BETA-3]
### Added
Expand Down
7 changes: 5 additions & 2 deletions agent-allure-cucumber6/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@
*/

dependencies {
api 'com.epam.reportportal:agent-java-cucumber6:5.1.2'
implementation 'io.cucumber:cucumber-gherkin:6.0.0'
api ('com.epam.reportportal:agent-java-cucumber6:5.1.2') {
exclude module: 'client-java'
}
api 'com.epam.reportportal:client-java:5.1.10'
implementation "io.cucumber:cucumber-gherkin:${project.cucumber_version}"

testImplementation "io.cucumber:cucumber-java:${project.cucumber_version}"
testImplementation "io.cucumber:cucumber-testng:${project.cucumber_version}"
Expand Down
2 changes: 1 addition & 1 deletion agent-allure-cucumber6/gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name=agent-allure-cucumber6
version=5.1.0-BETA-4-SNAPSHOT
description=Report Portal - Allure integrations for Cucumber 6
cucumber_version=5.0.0
cucumber_version=7.2.3
2 changes: 2 additions & 0 deletions agent-allure-jbehave/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Added
- `@Step` annotation templating, by @HardNorth

## [5.1.0-BETA-2]
### Added
Expand Down
5 changes: 4 additions & 1 deletion agent-allure-jbehave/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,8 @@
*/

dependencies {
api 'com.epam.reportportal:agent-java-jbehave:5.1.2'
api ('com.epam.reportportal:agent-java-jbehave:5.1.2') {
exclude module: 'client-java'
}
api 'com.epam.reportportal:client-java:5.1.10'
}
2 changes: 2 additions & 0 deletions agent-allure-junit/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Added
- `@Step` annotation templating, by @HardNorth

## [5.1.0-BETA-2]
### Added
Expand Down
5 changes: 4 additions & 1 deletion agent-allure-junit/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
*/

dependencies {
api 'com.epam.reportportal:agent-java-junit:5.1.1'
api ('com.epam.reportportal:agent-java-junit:5.1.1') {
exclude module: 'client-java'
}
api 'com.epam.reportportal:client-java:5.1.10'
}

jar {
Expand Down
2 changes: 2 additions & 0 deletions agent-allure-junit5/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Added
- `@Step` annotation templating, by @HardNorth

## [5.1.0-BETA-2]
### Added
Expand Down
5 changes: 4 additions & 1 deletion agent-allure-junit5/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
*/

dependencies {
api 'com.epam.reportportal:agent-java-junit5:5.1.2'
api ('com.epam.reportportal:agent-java-junit5:5.1.2') {
exclude module: 'client-java'
}
api 'com.epam.reportportal:client-java:5.1.10'
}

jar {
Expand Down
2 changes: 2 additions & 0 deletions agent-allure-spock/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Added
- `@Step` annotation templating, by @HardNorth

## [5.1.0-BETA-2]
### Added
Expand Down
5 changes: 4 additions & 1 deletion agent-allure-spock/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
*/

dependencies {
api 'com.epam.reportportal:agent-java-spock:5.1.0-RC-5'
api ('com.epam.reportportal:agent-java-spock:5.1.0-RC-5') {
exclude module: 'client-java'
}
api 'com.epam.reportportal:client-java:5.1.10'

testImplementation 'org.codehaus.groovy:groovy:2.5.14'
}
Expand Down
2 changes: 2 additions & 0 deletions agent-allure-testng/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

## [Unreleased]
### Added
- `@Step` annotation templating, by @HardNorth

## [5.1.0-BETA-2]
### Added
Expand Down
5 changes: 4 additions & 1 deletion agent-allure-testng/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
*/

dependencies {
api 'com.epam.reportportal:agent-java-testng:5.1.2'
api ('com.epam.reportportal:agent-java-testng:5.1.2') {
exclude module: 'client-java'
}
api 'com.epam.reportportal:client-java:5.1.10'
}

jar {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,4 +203,20 @@ public void test_two_levels_method_step() {
FinishTestItemRQ finishStep2 = finishNestedStepCapture2.getValue();
assertThat(finishStep2.getStatus(), equalTo(ItemStatus.PASSED.name()));
}

@Test
void test_verify_steps_support_templating_with_self_reference() {
mockNestedSteps(client, nestedStepLinks.get(0));
runTests(MethodStepTemplate.class);

ArgumentCaptor<StartTestItemRQ> startNestedStepCapture = ArgumentCaptor.forClass(StartTestItemRQ.class);
verify(client).startTestItem(same(stepUuid), startNestedStepCapture.capture());

StartTestItemRQ startStep = startNestedStepCapture.getValue();
assertThat(
startStep.getName(),
equalTo(MethodStepTemplate.STEP_TEMPLATE_VALUE.replace("{this.FIELD}", MethodStepTemplate.FIELD)
.replace("{0}", MethodStepTemplate.PARAMETER))
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
/*
* Copyright 2022 EPAM Systems
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package com.epam.reportportal.testng.features.steps;

import io.qameta.allure.Step;
import org.testng.annotations.Test;

public class MethodStepTemplate {
public static final String FIELD = "template";
public static final String PARAMETER = "parameter";

public static final String STEP_TEMPLATE_VALUE = "allure-step-{this.FIELD}-{0}";

@Step(STEP_TEMPLATE_VALUE)
public void step(String param) {
}

@Test
void test() {
step(PARAMETER);
}
}
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ configure(allprojects - project('allure-common')) {
targetCompatibility = JavaVersion.VERSION_1_8

dependencies {
implementation 'com.epam.reportportal:allure-common:5.1.0-BETA-4'
implementation 'com.epam.reportportal:allure-common:5.1.0-BETA-5'

testImplementation ('io.qameta.allure:allure-java-commons:2.17.3') {
exclude group: 'org.slf4j'
Expand Down

0 comments on commit c2ed9f9

Please sign in to comment.