Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Changelog

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

## [5.3.2]
### Changed
Expand Down
38 changes: 25 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,24 @@ E.G.:

```java
import com.epam.reportportal.karate.ReportPortalHook;
import com.intuit.karate.Results;
import com.intuit.karate.Runner;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

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

```java
import com.epam.reportportal.karate.KarateReportPortalRunner;
import com.intuit.karate.Results;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class KarateRunnerTest {

class ScenarioRunnerTest {
@Test
void testParallel() {
KarateReportPortalRunner
.path("classpath:examples")
.outputCucumberJson(true)
.tags("~@ignore")
.parallel(1);
public void testAll() {
Results results = KarateReportPortalRunner // Our runner with a Karate Publisher
.path("classpath:features") // Path with feature files
.outputCucumberJson(true) // Generate cucumber report
.tags("~@ignore") // Ignore tests marked with the tag
.parallel(2); // Run in 2 Threads
Assertions.assertEquals(0, results.getFailCount(), "Non-zero fail count.\n Errors:\n" + results.getErrorMessages());
}
}
```
Expand Down
38 changes: 25 additions & 13 deletions README_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,17 +103,24 @@ E.G.:

```java
import com.epam.reportportal.karate.ReportPortalHook;
import com.intuit.karate.Results;
import com.intuit.karate.Runner;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

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

```java
import com.epam.reportportal.karate.KarateReportPortalRunner;
import com.intuit.karate.Results;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

public class KarateRunnerTest {

class ScenarioRunnerTest {
@Test
void testParallel() {
KarateReportPortalRunner
.path("classpath:examples")
.outputCucumberJson(true)
.tags("~@ignore")
.parallel(1);
public void testAll() {
Results results = KarateReportPortalRunner // Our runner with a Karate Publisher
.path("classpath:features") // Path with feature files
.outputCucumberJson(true) // Generate cucumber report
.tags("~@ignore") // Ignore tests marked with the tag
.parallel(2); // Run in 2 Threads
Assertions.assertEquals(0, results.getFailCount(), "Non-zero fail count.\n Errors:\n" + results.getErrorMessages());
}
}
```
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dependencies {
api "com.epam.reportportal:client-java:${client_version}"
compileOnly "com.intuit.karate:karate-core:${karate_version}"
implementation "org.slf4j:slf4j-api:${slf4j_api_version}"
implementation "org.apache.commons:commons-lang3:3.18.0"
implementation "org.apache.commons:commons-lang3:3.19.0"

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

test {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ karate_version=1.4.1
junit_version=5.10.1
mockito_version=5.4.0
test_utils_version=0.1.0
client_version=5.4.4
client_version=5.4.6
slf4j_api_version=2.0.7
logger_version=5.4.0
hamcrest_version=2.2
Expand Down