Skip to content

Commit 8104963

Browse files
authored
Merge pull request #50 from reportportal/develop
Release
2 parents 197e2fb + e9516d4 commit 8104963

File tree

5 files changed

+55
-29
lines changed

5 files changed

+55
-29
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Changelog
22

33
## [Unreleased]
4+
### Changed
5+
- Client version updated to [5.4.6](https://github.com/reportportal/client-java/releases/tag/5.4.6), by @HardNorth
46

57
## [5.3.2]
68
### Changed

README.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,24 @@ E.G.:
103103

104104
```java
105105
import com.epam.reportportal.karate.ReportPortalHook;
106+
import com.intuit.karate.Results;
106107
import com.intuit.karate.Runner;
108+
import org.junit.jupiter.api.Assertions;
109+
import org.junit.jupiter.api.Test;
107110

108111
class ScenarioRunnerTest {
109112
@Test
110113
void testParallel() {
111-
return Runner
112-
.path("classpath:examples")
113-
.hook(new ReportPortalHook())
114-
.outputCucumberJson(true)
115-
.tags("~@ignore")
116-
.parallel(1);
114+
ReportPortalHook karateRuntimeHook = new ReportPortalHook(); // Initialize ReportPortal runtime Karate hook
115+
Results results = Runner // Regular Karate runner
116+
.path("classpath:features") // Path with feature files
117+
.hook(karateRuntimeHook) // Add Karate hook
118+
.outputCucumberJson(true) // Generate cucumber report
119+
.tags("~@ignore") // Ignore tests marked with the tag
120+
.parallel(2); // Run in 2 Threads
121+
// Here you can additionally run tests, retries, etc.
122+
karateRuntimeHook.finishLaunch(); // Finish execution on ReportPortal
123+
Assertions.assertEquals(0, results.getFailCount(), "Non-zero fail count.\n Errors:\n" + results.getErrorMessages());
117124
}
118125
}
119126
```
@@ -127,15 +134,20 @@ E.G.:
127134

128135
```java
129136
import com.epam.reportportal.karate.KarateReportPortalRunner;
137+
import com.intuit.karate.Results;
138+
import org.junit.jupiter.api.Assertions;
139+
import org.junit.jupiter.api.Test;
140+
141+
public class KarateRunnerTest {
130142

131-
class ScenarioRunnerTest {
132143
@Test
133-
void testParallel() {
134-
KarateReportPortalRunner
135-
.path("classpath:examples")
136-
.outputCucumberJson(true)
137-
.tags("~@ignore")
138-
.parallel(1);
144+
public void testAll() {
145+
Results results = KarateReportPortalRunner // Our runner with a Karate Publisher
146+
.path("classpath:features") // Path with feature files
147+
.outputCucumberJson(true) // Generate cucumber report
148+
.tags("~@ignore") // Ignore tests marked with the tag
149+
.parallel(2); // Run in 2 Threads
150+
Assertions.assertEquals(0, results.getFailCount(), "Non-zero fail count.\n Errors:\n" + results.getErrorMessages());
139151
}
140152
}
141153
```

README_TEMPLATE.md

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,24 @@ E.G.:
103103

104104
```java
105105
import com.epam.reportportal.karate.ReportPortalHook;
106+
import com.intuit.karate.Results;
106107
import com.intuit.karate.Runner;
108+
import org.junit.jupiter.api.Assertions;
109+
import org.junit.jupiter.api.Test;
107110

108111
class ScenarioRunnerTest {
109112
@Test
110113
void testParallel() {
111-
return Runner
112-
.path("classpath:examples")
113-
.hook(new ReportPortalHook())
114-
.outputCucumberJson(true)
115-
.tags("~@ignore")
116-
.parallel(1);
114+
ReportPortalHook karateRuntimeHook = new ReportPortalHook(); // Initialize ReportPortal runtime Karate hook
115+
Results results = Runner // Regular Karate runner
116+
.path("classpath:features") // Path with feature files
117+
.hook(karateRuntimeHook) // Add Karate hook
118+
.outputCucumberJson(true) // Generate cucumber report
119+
.tags("~@ignore") // Ignore tests marked with the tag
120+
.parallel(2); // Run in 2 Threads
121+
// Here you can additionally run tests, retries, etc.
122+
karateRuntimeHook.finishLaunch(); // Finish execution on ReportPortal
123+
Assertions.assertEquals(0, results.getFailCount(), "Non-zero fail count.\n Errors:\n" + results.getErrorMessages());
117124
}
118125
}
119126
```
@@ -127,15 +134,20 @@ E.G.:
127134

128135
```java
129136
import com.epam.reportportal.karate.KarateReportPortalRunner;
137+
import com.intuit.karate.Results;
138+
import org.junit.jupiter.api.Assertions;
139+
import org.junit.jupiter.api.Test;
140+
141+
public class KarateRunnerTest {
130142

131-
class ScenarioRunnerTest {
132143
@Test
133-
void testParallel() {
134-
KarateReportPortalRunner
135-
.path("classpath:examples")
136-
.outputCucumberJson(true)
137-
.tags("~@ignore")
138-
.parallel(1);
144+
public void testAll() {
145+
Results results = KarateReportPortalRunner // Our runner with a Karate Publisher
146+
.path("classpath:features") // Path with feature files
147+
.outputCucumberJson(true) // Generate cucumber report
148+
.tags("~@ignore") // Ignore tests marked with the tag
149+
.parallel(2); // Run in 2 Threads
150+
Assertions.assertEquals(0, results.getFailCount(), "Non-zero fail count.\n Errors:\n" + results.getErrorMessages());
139151
}
140152
}
141153
```

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ dependencies {
4444
api "com.epam.reportportal:client-java:${client_version}"
4545
compileOnly "com.intuit.karate:karate-core:${karate_version}"
4646
implementation "org.slf4j:slf4j-api:${slf4j_api_version}"
47-
implementation "org.apache.commons:commons-lang3:3.18.0"
47+
implementation "org.apache.commons:commons-lang3:3.19.0"
4848

4949
testImplementation "com.intuit.karate:karate-core:${karate_version}"
5050
testImplementation "com.epam.reportportal:logger-java-logback:${logger_version}"
@@ -56,7 +56,7 @@ dependencies {
5656
testImplementation "org.mockito:mockito-junit-jupiter:${mockito_version}"
5757
testImplementation "org.hamcrest:hamcrest-core:${hamcrest_version}"
5858
testImplementation "com.squareup.okhttp3:okhttp:${okhttp_version}"
59-
testImplementation "org.apache.commons:commons-lang3:3.18.0"
59+
testImplementation "org.apache.commons:commons-lang3:3.19.0"
6060
}
6161

6262
test {

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ karate_version=1.4.1
66
junit_version=5.10.1
77
mockito_version=5.4.0
88
test_utils_version=0.1.0
9-
client_version=5.4.4
9+
client_version=5.4.6
1010
slf4j_api_version=2.0.7
1111
logger_version=5.4.0
1212
hamcrest_version=2.2

0 commit comments

Comments
 (0)