{"id":29334566,"url":"https://github.com/reportportal/agent-java-karate","last_synced_at":"2026-03-17T11:14:09.434Z","repository":{"id":38418360,"uuid":"181873316","full_name":"reportportal/agent-java-karate","owner":"reportportal","description":"Karate integration for ReportPortal","archived":false,"fork":false,"pushed_at":"2026-03-16T21:07:10.000Z","size":4928,"stargazers_count":9,"open_issues_count":1,"forks_count":15,"subscribers_count":9,"default_branch":"develop","last_synced_at":"2026-03-17T03:21:54.059Z","etag":null,"topics":["java","karate","karate-framework","karate-tests","reportportal","test-automation","testing","testing-framework","testing-tools","tests"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/reportportal.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2019-04-17T10:59:32.000Z","updated_at":"2026-03-16T21:07:15.000Z","dependencies_parsed_at":"2023-12-25T22:25:13.869Z","dependency_job_id":"82764577-7399-4374-bad3-22fb9b42a730","html_url":"https://github.com/reportportal/agent-java-karate","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/reportportal/agent-java-karate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reportportal%2Fagent-java-karate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reportportal%2Fagent-java-karate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reportportal%2Fagent-java-karate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reportportal%2Fagent-java-karate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reportportal","download_url":"https://codeload.github.com/reportportal/agent-java-karate/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reportportal%2Fagent-java-karate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30622482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T08:10:05.930Z","status":"ssl_error","status_checked_at":"2026-03-17T08:10:04.972Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java","karate","karate-framework","karate-tests","reportportal","test-automation","testing","testing-framework","testing-tools","tests"],"created_at":"2025-07-08T04:19:25.413Z","updated_at":"2026-03-17T11:14:09.423Z","avatar_url":"https://github.com/reportportal.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReportPortal runtime Hook for Karate tests\n\nKarate reporters which uploads the results to a ReportPortal server.\n\n\u003e **DISCLAIMER**: We use Google Analytics for sending anonymous usage information such as agent's and client's names, and their versions\n\u003e after a successful launch start. This information might help us to improve both ReportPortal backend and client sides. It is used by the\n\u003e ReportPortal team only and is not supposed for sharing with 3rd parties.\n\n[![Maven Central](https://img.shields.io/maven-central/v/com.epam.reportportal/agent-java-karate.svg?label=Maven%20Central)](https://central.sonatype.com/artifact/com.epam.reportportal/agent-java-karate)\n[![CI Build](https://github.com/reportportal/agent-java-karate/actions/workflows/ci.yml/badge.svg)](https://github.com/reportportal/agent-java-karate/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/github/reportportal/agent-java-karate/graph/badge.svg?token=wJr9F6hZln)](https://codecov.io/github/reportportal/agent-java-karate)\n[![Join Slack chat!](https://img.shields.io/badge/slack-join-brightgreen.svg)](https://slack.epmrpp.reportportal.io/)\n[![stackoverflow](https://img.shields.io/badge/reportportal-stackoverflow-orange.svg?style=flat)](http://stackoverflow.com/questions/tagged/reportportal)\n[![Build with Love](https://img.shields.io/badge/build%20with-❤%EF%B8%8F%E2%80%8D-lightgrey.svg)](http://reportportal.io?style=flat)\n\nThe latest version: 5.3.6. Please use `Maven Central` link above to get the agent.\n\n## Overview: How to Add ReportPortal Logging to Your Project\n\nTo start using ReportPortal with Karate framework please do the following steps:\n\n1. [Configuration](#configuration)\n    * Create/update the `reportportal.properties` configuration file\n    * Build system configuration\n    * Add Listener\n        * Runtime\n        * Post-running\n2. [Logging configuration](#logging)\n    * Loggers and their types\n3. [Running tests](#running-tests)\n    * Build system commands\n\n## Configuration\n\n### 'reportportal.properties' configuration file\n\nAs the first step you need to create a file named `reportportal.properties` in your Java project in a source\nfolder `src/main/resources` or `src/test/resources` (depending on where your tests are located):\n\n**reportportal.properties**\n\n```\nrp.endpoint = http://localhost:8080\nrp.api.key = test_YIvQraKKSquDZqrA6JLCWCX5qwmMZBk_7tTm_fkN44AHCi18Ze0RtYqxWNYKxk5p\nrp.launch = Karate Tests\nrp.project = default_personal\n```\n\n**Property description**\n\n* `rp.endpoint` - the URL for the ReportPortal server (actual link).\n* `rp.api.key` - an access token for ReportPortal which is used for user identification. It can be found on your report\n  portal user profile page.\n* `rp.project` - a project ID on which the agent will report test launches. Must be set to one of your assigned\n  projects.\n* `rp.launch` - a user-selected identifier of test launches.\n\nThe full list of supported properties is located here in client-java library documentation (a common library for all\nJava agents): https://github.com/reportportal/client-java\n\n## Build system configuration\n\n### Maven\n\nIf your project is Maven-based you need to add dependencies to `pom.xml` file:\n\n```xml\n\n\u003cproject\u003e\n    \u003c!-- project declaration omitted --\u003e\n\n    \u003cdependency\u003e\n        \u003cgroupId\u003ecom.epam.reportportal\u003c/groupId\u003e\n        \u003cartifactId\u003eagent-java-karate\u003c/artifactId\u003e\n        \u003cversion\u003e5.3.6\u003c/version\u003e\n        \u003cscope\u003etest\u003c/scope\u003e\n    \u003c/dependency\u003e\n\n    \u003c!-- build config omitted --\u003e\n\u003c/project\u003e\n```\n\nYou are free to use you own version of Karate, but not earlier than 1.0.0. If you leave just Agent dependency it will\nbe still OK, it will use transitive Karate version.\n\n### Gradle\n\nFor Gradle-based projects please update dependencies section in `build.gradle` file:\n\n```groovy\ndependencies {\n    testImplementation 'com.epam.reportportal:agent-java-karate:5.3.6'\n}\n```\n\n## Listener configuration\n\n### Runtime\n\nRuntime publisher uploads Karate tests on ReportPortal during the test execution, providing real-time monitoring capabilities. To publish\ntest results in this case, the test project should use by `ReportPortalHook` class, an instance of which you should pass to Karate runner.\nE.G.:\n\n```java\nimport com.epam.reportportal.karate.ReportPortalHook;\nimport com.intuit.karate.Results;\nimport com.intuit.karate.Runner;\nimport org.junit.jupiter.api.Assertions;\nimport org.junit.jupiter.api.Test;\n\nclass ScenarioRunnerTest {\n\t@Test\n\tvoid testParallel() {\n\t\tReportPortalHook karateRuntimeHook = new ReportPortalHook(); // Initialize ReportPortal runtime Karate hook\n\t\tResults results = Runner // Regular Karate runner\n\t\t\t\t.path(\"classpath:features\") // Path with feature files\n\t\t\t\t.hook(karateRuntimeHook) // Add Karate hook\n\t\t\t\t.outputCucumberJson(true) // Generate cucumber report\n\t\t\t\t.tags(\"~@ignore\") // Ignore tests marked with the tag\n\t\t\t\t.parallel(2); // Run in 2 Threads\n\t\t// Here you can additionally run tests, retries, etc.\n\t\tkarateRuntimeHook.finishLaunch(); // Finish execution on ReportPortal\n\t\tAssertions.assertEquals(0, results.getFailCount(), \"Non-zero fail count.\\n Errors:\\n\" + results.getErrorMessages());\n\t}\n}\n```\n\n### Post-running\n\nPost-running publisher uploads Karate tests on ReportPortal after the test execution. It uses Karate result object to get data about tests.\nIt might be useful if your tests make heavy load both on ReportPortal server or on the running node. To publish test results in this case,\nthe test project should run by `KarateReportPortalRunner` instead of Karate runner.\nE.G.:\n\n```java\nimport com.epam.reportportal.karate.KarateReportPortalRunner;\nimport com.intuit.karate.Results;\nimport org.junit.jupiter.api.Assertions;\nimport org.junit.jupiter.api.Test;\n\npublic class KarateRunnerTest {\n\n\t@Test\n\tpublic void testAll() {\n\t\tResults results = KarateReportPortalRunner // Our runner with a Karate Publisher\n\t\t\t\t.path(\"classpath:features\") // Path with feature files\n\t\t\t\t.outputCucumberJson(true) // Generate cucumber report\n\t\t\t\t.tags(\"~@ignore\") // Ignore tests marked with the tag\n\t\t\t\t.parallel(2); // Run in 2 Threads\n\t\tAssertions.assertEquals(0, results.getFailCount(), \"Non-zero fail count.\\n Errors:\\n\" + results.getErrorMessages());\n\t}\n}\n```\n\n## Logging\n\nKarate uses `slf4j` as Logging library, so you are free to choose any Logging Framework.\n\nReportPortal provides its own logger implementations for major logging frameworks like *Log4j* and *Logback*. It also\nprovides additional formatting features for popular client and test libraries like: *Selenide*, *Apache HttpComponents*,\n*Rest Assured*, etc.\n\nHere is the list of supported loggers and setup documentation links.\n\n**Logging frameworks:**\n\n| **Library name** | **Documentation link**                              |\n|------------------|-----------------------------------------------------|\n| Log4j            | https://github.com/reportportal/logger-java-log4j   |\n| Logback          | https://github.com/reportportal/logger-java-logback |\n\n**HTTP clients:**\n\n| **Library name**      | **Documentation link**                                     |\n|-----------------------|------------------------------------------------------------|\n| OkHttp3               | https://github.com/reportportal/logger-java-okhttp3        |\n| Apache HttpComponents | https://github.com/reportportal/logger-java-httpcomponents |\n\n## Running tests\n\nWe are set. To run tests we just need to execute corresponding command in our build system.\n\n#### Maven\n\n`mvn test` or `mvnw test` if you are using Maven wrapper\n\n#### Gradle\n\n`gradle test` or `gradlew test` if you are using Gradle wrapper\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freportportal%2Fagent-java-karate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freportportal%2Fagent-java-karate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freportportal%2Fagent-java-karate/lists"}