Skip to content

Commit

Permalink
Merge pull request #74 from reportportal/develop
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
HardNorth committed Jan 30, 2024
2 parents c2df415 + 44915ab commit 765eb0e
Show file tree
Hide file tree
Showing 17 changed files with 255 additions and 193 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Changelog
### Changed
- Examples are not reported in their own separate suite now, they are reported as separate scenarios instead, to conform other BDD framework implementation, by @HardNorth
- Client version updated on [5.2.2](https://github.com/reportportal/client-java/releases/tag/5.2.2), by @HardNorth
- JBehave dependency marked as `implementation` to force users specify their own versions, by @HardNorth

## [Unreleased]
### Changed
- Client version updated on [5.1.24](https://github.com/reportportal/client-java/releases/tag/5.1.24), by @HardNorth

## [5.2.2]
### Changed
Expand Down
11 changes: 7 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
> and their versions after a successful launch start. This information might help us to improve both ReportPortal
> backend and client sides. It is used by the ReportPortal team only and is not supposed for sharing with 3rd parties.
[![Maven Central](https://img.shields.io/maven-central/v/com.epam.reportportal/agent-java-jbehave.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.epam.reportportal%22%20AND%20a:%22agent-java-jbehave%22)
[![Maven Central](https://img.shields.io/maven-central/v/com.epam.reportportal/agent-java-jbehave.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/com.epam.reportportal/agent-java-jbehave)
[![CI Build](https://github.com/reportportal/agent-java-jbehave/actions/workflows/ci.yml/badge.svg)](https://github.com/reportportal/agent-java-jbehave/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/reportportal/agent-java-jbehave/branch/develop/graph/badge.svg?token=BCglguEcoR)](https://codecov.io/gh/reportportal/agent-java-jbehave)
[![Join Slack chat!](https://slack.epmrpp.reportportal.io/badge.svg)](https://slack.epmrpp.reportportal.io/)
Expand Down Expand Up @@ -44,7 +44,7 @@ folder `src/main/resources` or `src/test/resources` (depending on where your tes

```
rp.endpoint = http://localhost:8080
rp.uuid = e0e541d8-b1cd-426a-ae18-b771173c545a
rp.api.key = e0e541d8-b1cd-426a-ae18-b771173c545a
rp.launch = JBehave Tests
rp.project = default_personal
```
Expand All @@ -58,6 +58,9 @@ rp.project = default_personal
projects.
* `rp.launch` - a user-selected identifier of test launches.

The full list of supported properties is located here in client-java library documentation (a common library for all
Java agents): https://github.com/reportportal/client-java

### Build system configuration

#### Maven
Expand All @@ -73,7 +76,7 @@ rp.project = default_personal
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<jbehave.core.version>4.8.1</jbehave.core.version> <!-- JBehave binaries version -->
<jbehave.core.version>5.1.1</jbehave.core.version> <!-- JBehave binaries version -->
<embeddables>**/*Stories.java</embeddables> <!-- JBehave story filter -->
<meta.filter>-skip</meta.filter> <!-- Skip tests tagged with '@skip' tag -->
</properties>
Expand Down Expand Up @@ -151,7 +154,7 @@ repositories {
mavenCentral()
}
def jbehaveVersion = '4.8.1'
def jbehaveVersion = '5.1.1'
dependencies {
testCompile "org.jbehave:jbehave-core:${jbehaveVersion}"
testCompile "org.jbehave:jbehave-navigator:${jbehaveVersion}"
Expand Down
12 changes: 8 additions & 4 deletions README_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
> and their versions after a successful launch start. This information might help us to improve both ReportPortal
> backend and client sides. It is used by the ReportPortal team only and is not supposed for sharing with 3rd parties.
[![Maven Central](https://img.shields.io/maven-central/v/com.epam.reportportal/agent-java-jbehave.svg?label=Maven%20Central)](https://search.maven.org/search?q=g:%22com.epam.reportportal%22%20AND%20a:%22agent-java-jbehave%22)
[![Maven Central](https://img.shields.io/maven-central/v/com.epam.reportportal/agent-java-jbehave.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/com.epam.reportportal/agent-java-jbehave)
[![CI Build](https://github.com/reportportal/agent-java-jbehave/actions/workflows/ci.yml/badge.svg)](https://github.com/reportportal/agent-java-jbehave/actions/workflows/ci.yml)
[![codecov](https://codecov.io/gh/reportportal/agent-java-jbehave/branch/develop/graph/badge.svg?token=BCglguEcoR)](https://codecov.io/gh/reportportal/agent-java-jbehave)
[![Join Slack chat!](https://slack.epmrpp.reportportal.io/badge.svg)](https://slack.epmrpp.reportportal.io/)
Expand Down Expand Up @@ -44,7 +44,7 @@ folder `src/main/resources` or `src/test/resources` (depending on where your tes

```
rp.endpoint = http://localhost:8080
rp.uuid = e0e541d8-b1cd-426a-ae18-b771173c545a
rp.api.key = e0e541d8-b1cd-426a-ae18-b771173c545a
rp.launch = JBehave Tests
rp.project = default_personal
```
Expand All @@ -58,6 +58,10 @@ rp.project = default_personal
projects.
* `rp.launch` - a user-selected identifier of test launches.

The full list of supported properties is located here in client-java library documentation (a common library for all
Java agents): https://github.com/reportportal/client-java


### Build system configuration

#### Maven
Expand All @@ -73,7 +77,7 @@ rp.project = default_personal
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.target>1.8</maven.compiler.target>
<maven.compiler.source>1.8</maven.compiler.source>
<jbehave.core.version>4.8.1</jbehave.core.version> <!-- JBehave binaries version -->
<jbehave.core.version>5.1.1</jbehave.core.version> <!-- JBehave binaries version -->
<embeddables>**/*Stories.java</embeddables> <!-- JBehave story filter -->
<meta.filter>-skip</meta.filter> <!-- Skip tests tagged with '@skip' tag -->
</properties>
Expand Down Expand Up @@ -151,7 +155,7 @@ repositories {
mavenCentral()
}
def jbehaveVersion = '4.8.1'
def jbehaveVersion = '5.1.1'
dependencies {
testCompile "org.jbehave:jbehave-core:${jbehaveVersion}"
testCompile "org.jbehave:jbehave-navigator:${jbehaveVersion}"
Expand Down
12 changes: 7 additions & 5 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -34,26 +34,27 @@ sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

repositories {
mavenLocal()
mavenCentral()
}

dependencies {
api 'com.epam.reportportal:client-java:5.1.22'
api 'com.epam.reportportal:client-java:5.2.2'
api 'com.epam.reportportal:commons-model:5.0.0'
api ("org.jbehave:jbehave-core:${project.jbehave_version}") {
api 'com.google.code.findbugs:jsr305:3.0.2'
implementation ("org.jbehave:jbehave-core:${project.jbehave_version}") {
exclude group: 'junit'
exclude group: 'org.junit.vintage'
}
api 'com.google.code.findbugs:jsr305:3.0.2'
implementation 'org.slf4j:slf4j-api:2.0.7'

testImplementation 'com.epam.reportportal:agent-java-test-utils:0.0.2'
testImplementation 'org.aspectj:aspectjweaver:1.9.19'
testImplementation 'org.hamcrest:hamcrest-core:2.2'
testImplementation "org.mockito:mockito-core:${project.mockito_version}"
testImplementation "org.mockito:mockito-junit-jupiter:${project.mockito_version}"
testImplementation 'ch.qos.logback:logback-classic:1.3.8'
testImplementation 'com.epam.reportportal:logger-java-logback:5.1.6'
testImplementation 'ch.qos.logback:logback-classic:1.3.12'
testImplementation 'com.epam.reportportal:logger-java-logback:5.2.0'
testImplementation ("org.junit.platform:junit-platform-runner:${project.junit5_launcher_version}") {
exclude group: 'junit'
}
Expand All @@ -65,6 +66,7 @@ dependencies {
exclude group: 'junit'
exclude group: 'org.junit.vintage'
}
testImplementation 'com.squareup.okhttp3:okhttp:4.12.0'
}

test {
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
version=5.2.3-SNAPSHOT
version=5.3.0-SNAPSHOT
description=JBehave reporters for Report Portal
jbehave_version=5.1.1
jbehave_version=5.2.0
junit5_version=5.8.2
junit5_launcher_version=1.8.2
mockito_version=3.3.3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/**
* JBehave Reporter for reporting results into ReportPortal. Reports each Story Scenario as a separate test. That means each Scenario
* has it's own statistic and each Scenario Step is reported as nested step and does not add test count.
* has its own statistic and each Scenario Step is reported as nested step and does not add test count.
*
* @author Vadzim Hushchanskou
*/
Expand All @@ -46,9 +46,9 @@ public ReportPortalScenarioStoryReporter(final Supplier<Launch> launchSupplier,
* {@inheritDoc}
*/
@Nonnull
protected StartTestItemRQ buildStartExampleRq(@Nonnull final Map<String, String> example, @Nonnull String codeRef,
protected StartTestItemRQ buildStartExampleRq(@Nonnull Scenario scenario, @Nonnull Map<String, String> example, @Nonnull String codeRef,
@Nullable final Date startTime) {
StartTestItemRQ rq = super.buildStartExampleRq(example, codeRef, startTime);
StartTestItemRQ rq = super.buildStartExampleRq(scenario, example, codeRef, startTime);
rq.setType(ItemType.STEP.name());
rq.setTestCaseId(ofNullable(getTestCaseId(codeRef, null)).map(TestCaseIdEntry::getId).orElse(null));
return rq;
Expand All @@ -61,10 +61,8 @@ protected StartTestItemRQ buildStartExampleRq(@Nonnull final Map<String, String>
@Nonnull
protected StartTestItemRQ buildStartScenarioRq(@Nonnull Scenario scenario, @Nonnull String codeRef, @Nullable final Date startTime) {
StartTestItemRQ rq = super.buildStartScenarioRq(scenario, codeRef, startTime);
if (!scenario.hasExamplesTable() || scenario.getExamplesTable().getRows().isEmpty()) {
rq.setTestCaseId(ofNullable(getTestCaseId(codeRef, null)).map(TestCaseIdEntry::getId).orElse(null));
rq.setType(ItemType.STEP.name());
}
rq.setTestCaseId(ofNullable(getTestCaseId(codeRef, null)).map(TestCaseIdEntry::getId).orElse(null));
rq.setType(ItemType.STEP.name());
return rq;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@
* Scenarios will not have it.
*
* @author Vadzim Hushchanskou
* @deprecated Use {@link ReportPortalScenarioFormat}, since the semantic of this class is completely broken and will be removed
*/
@Deprecated
public class ReportPortalStepFormat extends ReportPortalFormat {
public static final ReportPortalStepFormat INSTANCE = new ReportPortalStepFormat();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
* statistic.
*
* @author Vadzim Hushchanskou
* @deprecated Use {@link ReportPortalScenarioStoryReporter}, since the semantic of this class is completely broken and will be removed
*/
@Deprecated
public class ReportPortalStepStoryReporter extends ReportPortalStoryReporter {
public ReportPortalStepStoryReporter(final Supplier<Launch> launchSupplier, TestItemTree testItemTree) {
super(launchSupplier, testItemTree);
Expand Down
Loading

0 comments on commit 765eb0e

Please sign in to comment.