{"id":27054738,"url":"https://github.com/guidewire-oss/fern-junit-gradle-plugin","last_synced_at":"2026-04-14T15:32:35.849Z","repository":{"id":284222561,"uuid":"954221846","full_name":"guidewire-oss/fern-junit-gradle-plugin","owner":"guidewire-oss","description":"Gradle plugin to upload JUnit test files to a Fern test reporting server","archived":false,"fork":false,"pushed_at":"2025-07-21T03:53:43.000Z","size":120,"stargazers_count":4,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-21T05:31:48.168Z","etag":null,"topics":["fern","gradle","gradle-plugin","groovy","java","junit","jvm","kotlin","reporter","test-reporter","testing","testing-tools"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/guidewire-oss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-24T18:41:27.000Z","updated_at":"2025-07-21T03:36:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"cc9979fb-b34f-4480-9cf2-1791dc9e0468","html_url":"https://github.com/guidewire-oss/fern-junit-gradle-plugin","commit_stats":null,"previous_names":["guidewire-oss/fern-junit-gradle-plugin"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/guidewire-oss/fern-junit-gradle-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidewire-oss%2Ffern-junit-gradle-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidewire-oss%2Ffern-junit-gradle-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidewire-oss%2Ffern-junit-gradle-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidewire-oss%2Ffern-junit-gradle-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guidewire-oss","download_url":"https://codeload.github.com/guidewire-oss/fern-junit-gradle-plugin/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guidewire-oss%2Ffern-junit-gradle-plugin/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31803306,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["fern","gradle","gradle-plugin","groovy","java","junit","jvm","kotlin","reporter","test-reporter","testing","testing-tools"],"created_at":"2025-04-05T09:16:43.966Z","updated_at":"2026-04-14T15:32:35.844Z","avatar_url":"https://github.com/guidewire-oss.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fern JUnit Gradle Plugin\n\nA Gradle plugin and CLI for publishing JUnit test results to a Fern test reporting instance.\n\n![example workflow](https://github.com/guidewire-oss/fern-junit-gradle-plugin/actions/workflows/gradle.yml/badge.svg?event=push)\n![plugin](https://img.shields.io/gradle-plugin-portal/v/io.github.guidewire-oss.fern-publisher?label=Gradle%20Plugins%20Portal\u0026color=blue)\n\n## Overview\n\nThis plugin simplifies the process of collecting JUnit XML test reports and publishing them to a Fern test reporting\nservice. It parses JUnit XML reports, converts them to Fern's data model, and sends them to your Fern instance through\nits API.\n\nTo learn more about Fern, check out [its repository](https://github.com/guidewire-oss/fern-reporter)\n\n## Features\n\n- Parse JUnit XML test reports in various formats\n- Group test suites and test cases into a cohesive test run\n- Track test execution time and status\n- Support for test tags\n- Configurable verbosity for debugging\n\n## Installation\n\nAdd the plugin to your `build.gradle.kts` file:\n\n```kotlin\nplugins {\n  id(\"io.github.guidewire-oss.fern-publisher\") version \"1.0.0\"\n}\n```\n\nOr in `build.gradle`:\n\n```groovy\nplugins {\n  id 'io.github.guidewire-oss.fern-publisher' version '1.0.0'\n}\n```\n\n## Configuration\n\n### Register your application with fern\n\nNewer versions of the Fern Reporter server require you to pre-register your application to receive a UUID (your project id)\n\n1. To register your project send a `POST` request to `\u003cyourFernUrl\u003e/api/project` with JSON body of\n\n```json\n{\n  \"name\": \"my-project\",\n  \"team_name\": \"Dev Team\",\n  \"comment\": \"Initial project registration\"\n}\n```\n\nHere is an example curl command for ease of use:\n\n```shell\ncurl -X POST \"https://yourFernUrl.com/api/project\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"name\": \"my-project\",\n    \"team_name\": \"Dev Team\",\n    \"comment\": \"Initial project registration\"\n  }'\n```\n\n2. You will receive a successful response that looks like:\n\n```json\n{\n  \"uuid\": \"59e06cf8-f390-5093-af2e-3685be593a25\",\n  \"name\": \"my-project\",\n  \"team_name\": \"Dev Team\",\n  \"comment\": \"Initial project registration\",\n  \"created_at\": \"2025-06-06T15:00:28.403029Z\",\n  \"updated_at\": \"2025-06-06T15:00:28.403682Z\"\n}\n```\n\nYou will need to take note of the returned `ProjectID` UUID for use in configuring the plugin, as described below\n\n### Plugin Setup\n\nConfigure the plugin in your build script:\n\n```kotlin\nfernPublisher {\n  fernUrl.set(\"https://your-fern-instance.example.com\")\n  projectId.set(\"6ba7b812-9dad-11d1-80b4-00c04fd430c8\")\n  projectName.set(\"my-project\")\n  reportPaths.set(listOf(\"build/test-results/test/*.xml\"))\n  fernTags.set(listOf(\"automated\", \"integration\"))\n  verbose.set(false)\n  failOnError.set(false)\n}\n```\n\n### Parameters\n\n| Property    | Description                                                                                                                                                               | Required | Default    |\n|-------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|------------|\n| fernUrl     | URL of your Fern instance                                                                                                                                                 | Yes      | -          |\n| projectId   | The id of your project supplied by registering a project in Fern.                                                                                                         | No*      | \"\"         |\n| projectName | Name of your project in Fern                                                                                                                                              | No*      | \"\"         |\n|             | * **NOTE:** you must include a projectName or a projectID (or both). Newer versions of the Fern Reporting server require you to pre-register your project to obtain an ID |          |            |\n| reportPaths | Glob patterns for locating JUnit XML reports                                                                                                                              | Yes      | -          |\n| fernTags    | Tags to apply to all tests                                                                                                                                                | No       | empty list |\n| verbose     | Enable verbose logging                                                                                                                                                    | No       | false      |\n| failOnError | When true, will fail when error is thrown. Errors will always log.                                                                                                        | No       | false      |\n\n## Usage\n\nRun the task to publish test results:\n\n```\n./gradlew publishToFern\n```\n\nYou can also make it run automatically after your tests:\n\n```kotlin\ntasks.named(\"test\") {\n  finalizedBy(\"publishToFern\")\n}\n```\n\n## Examples\n\n### Basic Configuration\n\n```kotlin\nfernPublisher {\n  fernUrl.set(\"https://fern.example.com\")\n  projectName.set(\"backend-api\")\n  reportPaths.set(listOf(\"build/test-results/test/*.xml\"))\n}\n```\n\n### Multiple Report Sources\n\n```kotlin\nfernPublisher {\n  fernUrl.set(\"https://fern.example.com\")\n  projectName.set(\"full-stack\")\n  reportPaths.set(\n    listOf(\n      \"${project.buildDir}/test-results/test/*.xml\",\n      \"frontend/build/test-results/test/*.xml\"\n    )\n  )\n  fernTags.set(listOf(\"ci\", \"nightly\"))\n}\n```\n\n## Compatibility\n\n- Gradle 6.1 or later\n- Kotlin 1.4 or later\n- JUnit 4 and JUnit 5 XML report formats\n\n## Command-Line Interface (CLI)\n\nThis project also provides a CLI tool, `fern-junit-client`, for collecting and publishing JUnit XML test reports to a Fern Reporter instance. It is designed to work the same way as the Gradle plugin, but can be used independently of Gradle and Java.\n\nBuilds of the CLI binary are available for Linux, macOS, and Windows on the [Releases page](https://github.com/guidewire-oss/fern-junit-gradle-plugin/releases).\n\n### Usage\n\n```sh\nfern-junit-client send \\\n  --fern-url \u003cFERN_URL\u003e \\\n  --project-name \u003cPROJECT_NAME\u003e \\\n  --project-id \u003cPROJECT_ID\u003e \\\n  --file-pattern \u003cREPORT_PATTERN\u003e \\\n  [--tags \u003cTAGS\u003e] \\\n  [--verbose]\n```\n\n#### Options\n\n- `--fern-url` (`-u`): Base URL of the Fern Reporter instance to send test reports to (required)\n- `--project-name` (`-n`): Name of the project to associate test reports with (required)\n- `--project-id` (`-i`): Project ID to associate test reports with (required)\n- `--file-pattern` (`-f`): Glob pattern(s) for JUnit XML reports (can be repeated, required)\n- `--tags` (`-t`): (Optional) Comma-separated tags to include on the test run\n- `--verbose` (`-v`): (Optional) Enable verbose output for debugging\n\n### Example\n\n```sh\nfern-junit-client send \\\n  --fern-url https://fern.example.com \\\n  --project-name my-service \\\n  --project-id 1234 \\\n  --file-pattern \"build/test-results/**/*.xml\" \\\n  --tags \"ci,nightly\" \\\n  --verbose\n```\n\n## Building from Source\n\n```bash\ngit clone https://github.com/your-org/fern-junit-publisher.git\ncd fern-junit-publisher\n./gradlew build\n```\n\n## Development\n\nYou can build and publish this plugin for use locally with the command\n\n```bash\n./gradlew publishToMavenLocal\n```\n\nYou should see the plugin in your local `.m2` repository.\n\nFrom there you can set up a test project to use the plugin. Make sure to edit your `settings.gradle` file to use plugins\nfound in your local m2 repository.\n\n```gradle\npluginManagement {\n    repositories {\n        mavenLocal()\n        mavenCentral()\n    }\n}\n```\n### Building the CLI\nNative CLI binaries are built using GraalVM's native-image tool. This allows the CLI to run without requiring a Java runtime, making it lightweight and portable.\n\nFor building the CLI, you will need to have GraalVM installed and set the environment variable `GRAALVM_HOME` as your GraalVM install location.\n\nOnce that is set up, run the following command in the project root:\n\n```bash\n./gradlew nativeImage -Pversion=\"1.0.0-SNAPSHOT\" \n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidewire-oss%2Ffern-junit-gradle-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguidewire-oss%2Ffern-junit-gradle-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguidewire-oss%2Ffern-junit-gradle-plugin/lists"}